Skip to content

Commit

Permalink
[IMG-2474] abs test corrections
Browse files Browse the repository at this point in the history
Signed-off-by: marifunf <marianne.funfrock@rte-france.com>
  • Loading branch information
marifunf committed Dec 17, 2024
1 parent 931740f commit c0d0dcd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ private void verifyGeneratorPostProcessing(String generatorName,
NodeCalc tsRedispatchingDownCosts) {
NodeCalc metrixOutputNode = new TimeSeriesNameNodeCalc(metrixOutputPrefix + generatorName);

NodeCalc expectedRedispatchingUp = UnaryOperation.abs(BinaryOperation.multiply(metrixOutputNode, BinaryOperation.greaterThan(metrixOutputNode, new IntegerNodeCalc(0))));
NodeCalc expectedRedispatchingUp = BinaryOperation.multiply(metrixOutputNode, BinaryOperation.greaterThan(metrixOutputNode, new IntegerNodeCalc(0)));
verifyRedispatching(generatorName, expectedRedispatchingUp, postProcessingPrefixContainer.redispatchingUpPrefix());

NodeCalc expectedRedispatchingDown = UnaryOperation.abs(BinaryOperation.multiply(metrixOutputNode, BinaryOperation.lessThan(metrixOutputNode, new IntegerNodeCalc(0))));
NodeCalc expectedRedispatchingDown = BinaryOperation.multiply(metrixOutputNode, BinaryOperation.lessThan(metrixOutputNode, new IntegerNodeCalc(0)));
verifyRedispatching(generatorName, expectedRedispatchingDown, postProcessingPrefixContainer.redispatchingDownPrefix());

NodeCalc expectedRedispatchingUpCost = UnaryOperation.abs(BinaryOperation.multiply(expectedRedispatchingUp, tsRedispatchingUpCosts));
NodeCalc expectedRedispatchingUpCost = BinaryOperation.multiply(expectedRedispatchingUp, UnaryOperation.abs(tsRedispatchingUpCosts));
verifyRedispatchingCost(generatorName, expectedRedispatchingUpCost, postProcessingPrefixContainer.redispatchingUpCostPrefix());

NodeCalc expectedRedispatchingDownCost = UnaryOperation.abs(BinaryOperation.multiply(expectedRedispatchingDown, tsRedispatchingDownCosts));
NodeCalc expectedRedispatchingDownCost = BinaryOperation.multiply(expectedRedispatchingDown, UnaryOperation.abs(tsRedispatchingDownCosts));
verifyRedispatchingCost(generatorName, expectedRedispatchingDownCost, postProcessingPrefixContainer.redispatchingDownCostPrefix());

NodeCalc expectedRedispatchingCost = BinaryOperation.plus(expectedRedispatchingUpCost, expectedRedispatchingDownCost);
Expand Down

0 comments on commit c0d0dcd

Please sign in to comment.