-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaning/intertemporal features cleaner #1289
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
…cleaner' into cleaning/intertemporal-features-cleaner
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
/** | ||
* @author Thomas Bouquet {@literal <thomas.bouquet at rte-france.com>} | ||
* @author Roxane Chen {@literal <roxane.chen at rte-france.com>} | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MaxCostEvaluatorResult seems obsolete. AbstractStateWiseCostEvaluatorResult needs to be merged with SumCostEvaluator or adapted to be abstract with SumMaxPerTimestamp
LinearOptimizationResult linearOptimizationResults = optimizeLinearRemedialActions(raoInput, prePerimeterResults, raoParameters, getPreventiveTopologicalActions(raoInput.getRaoInputs().map(RaoInput::getCrac), topologicalOptimizationResults)); | ||
// 4. Build objective function and initial result | ||
ObjectiveFunction objectiveFunction = buildGlobalObjectiveFunction(raoInput.getRaoInputs().map(RaoInput::getCrac), new GlobalFlowResult(prePerimeterResults.map(PrePerimeterResult::getFlowResult)), raoParameters); | ||
TemporalData<NetworkActionsResult> preventiveTopologicalActions = getPreventiveNetworkActions(topologicalOptimizationResults, raoInput.getRaoInputs().map(RaoInput::getCrac)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use getPreventiveTopologicalActions
// 5. Merge topological and linear result | ||
// 5. Create and iteratively solve MIP to find optimal range actions' set-points | ||
OpenRaoLoggerProvider.TECHNICAL_LOGS.info("[MARMOT] ----- Global range actions optimization [start]"); | ||
LinearOptimizationResult linearOptimizationResults = optimizeLinearRemedialActions(raoInput, prePerimeterResults, raoParameters, getPreventiveTopologicalActions(raoInput.getRaoInputs().map(RaoInput::getCrac), topologicalOptimizationResults), objectiveFunction); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use preventiveTopologicalActions
@@ -70,4 +70,8 @@ public Map<PstRangeAction, Integer> getOptimizedTapsOnState(State state) { | |||
public int getTapVariation(PstRangeAction pstRangeAction, State state) { | |||
return MarmotUtils.getDataFromState(rangeActionActivationPerTimestamp, state).getTapVariation(pstRangeAction, state); | |||
} | |||
|
|||
public TemporalData<RangeActionActivationResult> getRangeActionActivationPerTimestamp() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this used ?
} | ||
|
||
@Test | ||
public void testEvaluator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add comments detailing expected results
@@ -27,14 +27,15 @@ | |||
import java.util.Set; | |||
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals; | |||
import static org.junit.jupiter.api.Assertions.assertTrue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add asserts on cost
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
What kind of change does this PR introduce?
Does this PR introduce a new Powsybl Action implying to be implemented in simulators or pypowsybl?
What is the current behavior?
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: