Skip to content
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

getSpecificParameters methods for analyses providers #3175

Open
olperr1 opened this issue Oct 8, 2024 · 1 comment
Open

getSpecificParameters methods for analyses providers #3175

olperr1 opened this issue Oct 8, 2024 · 1 comment

Comments

@olperr1
Copy link
Member

olperr1 commented Oct 8, 2024

Describe the current behavior

The following providers have methods allowing to retrieve the specific parameters' description:

  • LoadFlowProvider
  • ShortCircuitAnalysisProvider

Describe the expected behavior

The other providers could also expose methods allowing to retrieve this description:

  • SecurityAnalysisProvider
  • SensitivityAnalysisProvider

And maybe:

  • DynamicSecurityAnalysisProvider
  • DynamicSimulationProvider

(These need to be checked.)

Describe the motivation

For now, the motivation is only to have consistency between the providers.

Extra Information

The methods to add are:

  • List<Parameter> getSpecificParameters()
  • List<Parameter> getSpecificParameters(PlatformConfig platformConfigConfig)
@antoinebhs
Copy link
Contributor

antoinebhs commented Oct 9, 2024

I was thinking of a common interface for computation providers to avoid similar problems in the future. There is a lot in common but also some differences:

SensitivityAnalysisProvider SecurityAnalysisProvider DynamicSecurityAnalysisProvider DynamicSimulationProvider LoadFlowProvider ShortCircuitAnalysisProvider
Common methods findAll findAll findAll findAll findAll findAll
run run run run run run
Common to most provider methods getSpecificParametersSerializer getSpecificParametersSerializer getSpecificParametersSerializer getSpecificParametersSerializer getSpecificParametersSerializer
loadSpecificParameters loadSpecificParameters loadSpecificParameters loadSpecificParameters loadSpecificParameters
loadSpecificParameters loadSpecificParameters loadSpecificParameters loadSpecificParameters loadSpecificParameters
updateSpecificParameters updateSpecificParameters updateSpecificParameters updateSpecificParameters updateSpecificParameters
Should be common to providers getModuleConfig getModuleConfig
getSpecificParameters getSpecificParameters
getSpecificParameters getSpecificParameters
Specific methods getSpecificParametersNames getSpecificParametersNames getSpecificParametersNames createMapFromSpecificParameters
getLoadFlowProviderName getLoadFlowProviderName getDynamicSimulationProviderName getSpecificParametersClass

Giving this, I would suggest a common interface for all computation providers mentioned (SpecificParametersProvider?) to also add other missing methods.
It would include:

  • getSpecificParametersSerializer
  • loadSpecificParameters
  • loadSpecificParameters
  • updateSpecificParameters
  • getModuleConfig
  • getSpecificParameters
  • getSpecificParameters

and it looks like we often either need the class or name for specific parameters but I haven't checked where these methods are used/if it's meaningful for all providers:

  • getSpecificParametersClass
  • getSpecificParametersNames

It would make the code more consistent for all the providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants