Put the scenario adapters in a sub-package, with one adapter per module
Summary
MDOScenarioAdapter
is located in the module gemseo.core.scenario_adapter
. This module contains also MDOObjScenarioAdapter
which is not used in GEMSEO and hidden in the module (around the 600th line).
MDOScenarioAdapter
is not a simple MDODiscipline
but an essential element of the BiLevel
formulation. However, it is often difficult to understand not only by new users, but also new developers.
Improvements
We could:
- create a sub-package
gemseo.disciplines.scenario_adapters
(orgemseo.scenario_adapters
), - document the notion of
MDOScenarioAdapter
ingemseo.disciplines.scenario_adapters.__init__
, - split the module
gemseo.core.scenario_adapter
intogemseo.disciplines.scenario_adapters.base_adapter
, - split the module
gemseo.core.scenario_adapter
intogemseo.disciplines.scenario_adapters.obj_adapter
.
Concerning the first point,
-
gemseo.disciplines.scenario_adapters
can be justified by the fact thatMDOScenarioAdapter
is aMDODiscipline
; but the resulting paths are long (e.g.gemseo.disciplines.scenario_adapters.base_adapter
) -
gemseo.scenario_adapters
can be justified by the fact thatMDOScenarioAdapter
are key elements in GEMSEO, for bilevel formulations, multistart optimization, ... Moreover, aMDOScenarioAdapter
is a very specificMDODiscipline
in the sense that it does not wrap a numerical simulator or basic mathematical operations but a disciplinary process, itself based on more classicalMDODiscipline
objects.
Risks
All plugins with modules importing MDOScenarioAdapter
or MDOObjScenarioAdapter
.
Solution: import MDOScenarioAdapter
and MDOObjScenarioAdapter
in gemseo.core.scenario_adapter
Involved components
All files importing MDOScenarioAdapter
or MDOScenarioAdapter
.