discipline module¶
Scalable discipline¶
The discipline
implements the concept of scalable discipline.
This is a particular discipline
built from a input-output learning dataset associated with a function
and generalizing its behavior to a new user-defined problem dimension,
that is to say new used-defined input and output dimensions.
Alone or in interaction with other objects of the same type, a scalable discipline can be used to compare the efficiency of an algorithm applying to disciplines with respect to the problem dimension, e.g. optimization algorithm, surrogate model, MDO formulation, MDA, …
The ScalableDiscipline
class implements this concept.
It inherits from the MDODiscipline
class
in such a way that it can easily be used in a Scenario
.
It is composed of a ScalableModel
.
The user only needs to provide:
the name of a class overloading
ScalableModel
,a dataset as an
AbstractFullCache
variables sizes as a dictionary whose keys are the names of inputs and outputs and values are their new sizes. If a variable is missing, its original size is considered.
The ScalableModel
parameters can also be filled in,
otherwise the model uses default values.
-
class
gemseo.problems.scalable.discipline.
ScalableDiscipline
(name, data, sizes=None, **parameters)[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
Scalable discipline
Constructor.
- Parameters
name (str) – scalable model class name.
data (AbstractFullCache) – learning dataset.
sizes (dict) – sizes of input and output variables. If None, use the original sizes. Default: None.
parameters – model parameters
-
initialize_grammars
(data)[source]¶ Initialize input and output grammars from data names.
- Parameters
data (AbstractFullCache) – learning dataset.