-
Notifications
You must be signed in to change notification settings - Fork 7
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
Refacto parameters #736
Refacto parameters #736
Conversation
…ty/farao-core into refacto_parameters
...mmunity/farao/rao_api/json/deserializers/RangeActionsOptimizationParametersDeserializer.java
Outdated
Show resolved
Hide resolved
...com/farao_community/farao/rao_api/json/extensions/LoopFlowParametersExtensionSerializer.java
Outdated
Show resolved
Hide resolved
...com/farao_community/farao/rao_api/json/extensions/LoopFlowParametersExtensionSerializer.java
Outdated
Show resolved
Hide resolved
...ava/com/farao_community/farao/rao_api/json/extensions/MnecParametersExtensionSerializer.java
Outdated
Show resolved
Hide resolved
...ava/com/farao_community/farao/rao_api/json/extensions/MnecParametersExtensionSerializer.java
Outdated
Show resolved
Hide resolved
import com.farao_community.farao.rao_api.parameters.extensions.LoopFlowParametersExtension; | ||
import com.farao_community.farao.rao_api.parameters.extensions.LoopFlowParametersExtension.*; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author Joris Mancini {@literal <joris.mancini at rte-france.com>} | ||
*/ | ||
public class LoopFlowParameters { |
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.
is this class still necessary ? can't we replace its usages with LoopFlowParametersExtension ?
if (Objects.isNull(relativeMarginParameters)) { | ||
throw new FaraoException("No relative margins parameters were defined with objective function " + raoParameters.getObjectiveFunctionParameters().getObjectiveFunctionType()); | ||
} | ||
return new MaxMinRelativeMarginParameters(relativeMarginParameters.getPtdfSumLowerBound()); |
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.
same for this class
|
||
/** | ||
* @author Joris Mancini {@literal <joris.mancini at rte-france.com>} | ||
*/ | ||
// TODO : classe doublon par rapport à la classe parametre ? |
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.
I agree
raoParameters.getPstPenaltyCost(), | ||
raoParameters.getHvdcPenaltyCost(), | ||
raoParameters.getInjectionRaPenaltyCost()); | ||
return new RangeActionParameters(raoParameters.getRangeActionsOptimizationParameters().getPstModel(), |
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.
same, class is redundant
return new SolverParameters(raoParameters.getSolver(), | ||
raoParameters.getRelativeMipGap(), | ||
raoParameters.getSolverSpecificParameters()); | ||
return new SolverParameters(raoParameters.getRangeActionsOptimizationParameters().getLinearOptimizationSolver().getSolver(), |
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.
same
you have to remove sensi fallback mode from SystematicSensitivityInterface & SystematicSensitivityResult. |
@@ -96,6 +96,10 @@ public LoadFlowAndSensitivityParameters getLoadFlowAndSensitivityParameters() { | |||
return loadFlowAndSensitivityParameters; | |||
} | |||
|
|||
public boolean hasExtension(RaoParameters raoParameters, Class classType) { |
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.
you don't need the raoParameters argument, use "this"
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restWhat kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Refacto parameter handling in RAO : parameters are reorganized, optional/ not optional parameters are redefined. This induces profound changes in json serializer/deserializer classes. In addition to these changes, all parameters can now be loaded from a yaml file.
!! DO NOT DELETE BRANCH FOR THE MOMENT TO KEEP CONVERTER !!
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Rao parameters must be refactored according to new organisation
Other information:
(if any of the questions/checkboxes don't apply, please delete them entirely)