Disciplines¶
Warning
Some capabilities may require the installation of GEMSEO with all its features and some others may depend on plugins.
Note
All the features of the wrapped libraries may not be exposed through GEMSEO.
Aerodynamics¶
AnalyticDiscipline¶
Module: gemseo.disciplines.analytic
- Required parameters
expressions : Mapping[str, str | Expr]
The outputs expressed as functions of the inputs.
- Optional parameters
fast_evaluation : bool, optional
Whether to apply
sympy.lambdify
to the expressions in order to accelerate their numerical evaluation; otherwise the expressions are evaluated withsympy.Expr.evalf
.By default it is set to True.
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
AutoPyDiscipline¶
Module: gemseo.disciplines.auto_py
- Required parameters
py_func : Callable
The Python function to compute the outputs from the inputs.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
name : str | None, optional
The name of the discipline. If
None
, use the name of the Python function.By default it is set to None.
py_jac : Callable | None, optional
The Python function to compute the Jacobian from the inputs; its output value must be a 2D NumPy array with rows corresponding to the outputs and columns to the inputs.
By default it is set to None.
use_arrays : bool, optional
Whether the function is expected to take arrays as inputs and give outputs as arrays.
By default it is set to False.
BaseDiscipline¶
Module: gemseo.problems.scalable.parametric.disciplines.base_discipline
- Required parameters
core_discipline_parameters : Any
The parameters to instantiate the core discipline as
CoreDiscipline(*core_discipline_parameters)
.
- Optional parameters
**default_input_values : Any
The default values of the input variables.
CalibrationScenario¶
Note
The plugin gemseo_calibration is required.
Module: gemseo_calibration.scenario
- Required parameters
calibration_space : DesignSpace
The space of the parameters to be calibrated, whose current values are consider as a prior for calibration.
control_outputs : CalibrationMeasure | Sequence[CalibrationMeasure]
The names of the outputs used to calibrate the disciplines with the name of the calibration measure and the corresponding weight comprised between 0 and 1 (the weights must sum to 1). When the output is a 1D function discretized over an irregular mesh, the name of the mesh can be provided. E.g.
CalibrationMeasure(output="z", measure="MSE")
CalibrationMeasure(output="z", measure="MSE", weight=0.3)
orCalibrationMeasure(output="z", measure="MSE", mesh="z_mesh")
Lastly,CalibrationMeasure
can be imported fromgemseo-calibration.scenario
.disciplines : MDODiscipline | list[MDODiscipline]
The disciplines whose parameters must be calibrated from the reference data.
input_names : str | Iterable[str]
The names of the inputs to be considered for the calibration.
name : str
A name for this calibration scenario. If empty, use the name of the class.
- Optional parameters
formulation : str, optional
The name of a formulation to manage the multidisciplinary coupling.
By default it is set to MDF.
**formulation_options : Any
The options of the formulation.
Calibrator¶
Note
The plugin gemseo_calibration is required.
Module: gemseo_calibration.calibrator
- Required parameters
control_outputs : CalibrationMeasure | Sequence[CalibrationMeasure]
The names of the outputs used to calibrate the disciplines with the name of the calibration measure and the corresponding weight comprised between 0 and 1 (the weights must sum to 1). When the output is a 1D function discretized over an irregular mesh, the name of the mesh can be provided. E.g.
CalibrationMeasure(output="z", measure="MSE")
CalibrationMeasure(output="z", measure="MSE", weight=0.3)
orCalibrationMeasure(output="z", measure="MSE", mesh="z_mesh")
Lastly,CalibrationMeasure
can be imported fromgemseo-calibration.scenario
.disciplines : MDODiscipline | list[MDODiscipline]
The disciplines whose parameters must be calibrated from the reference data.
input_names : str | Iterable[str]
The names of the inputs to be considered for the calibration.
parameter_names : str | Iterable[str]
The names of the parameters to be calibrated.
- Optional parameters
formulation : str, optional
The name of a formulation to manage the multidisciplinary coupling.
By default it is set to MDF.
**formulation_options : Any
The options of the formulation.
Concatenater¶
Module: gemseo.disciplines.concatenater
- Required parameters
input_variables : Sequence[str]
The input variables to concatenate.
output_variable : str
The output variable name.
- Optional parameters
input_coefficients : dict[str, float] | None, optional
The coefficients related to the different input variables.
By default it is set to None.
ConstraintAggregation¶
Module: gemseo.disciplines.constraint_aggregation
- Required parameters
aggregation_function : EvaluationFunction
The aggregation function or its name, e.g. IKS, lower_bound_KS,upper_bound_KS, POS_SUM and SUM.
constraint_names : Sequence[str]
The names of the constraints to aggregate, which must be discipline outputs.
- Optional parameters
name : str | None, optional
The name of the discipline.
By default it is set to None.
**options : Any
The options for the aggregation method.
DOEScenario¶
Module: gemseo.core.doe_scenario
- Required parameters
design_space : DesignSpace
The search space including at least the design variables (some formulations requires additional variables, e.g.
IDF
with the coupling variables).disciplines : Sequence[MDODiscipline]
The disciplines used to compute the objective, constraints and observables from the design variables.
formulation : str
The class name of the
MDOFormulation
, e.g."MDF"
,"IDF"
or"BiLevel"
.objective_name : str | Sequence[str]
The name(s) of the discipline output(s) used as objective. If multiple names are passed, the objective will be a vector.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The grammar for the scenario and the MDO formulation.
By default it is set to JSONGrammar.
maximize_objective : bool, optional
Whether to maximize the objective.
By default it is set to False.
name : str | None, optional
The name to be given to this scenario. If
None
, use the name of the class.By default it is set to None.
**formulation_options : Any
The options of the
MDOFormulation
.
DensityFilter¶
Module: gemseo.problems.topo_opt.density_filter_disc
- Optional parameters
min_member_size : float, optional
The minimum structural member size.
By default it is set to 1.5.
n_x : int, optional
The number of elements in the x-direction.
By default it is set to 100.
n_y : int, optional
The number of elements in the y-direction.
By default it is set to 100.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
DiscFromExe¶
Module: gemseo.wrappers.disc_from_exe
- Required parameters
executable_command : str
The command to run the executable. E.g.
python my_script.py -i input.txt -o output.txt
input_filename : str | Path
The name of the input file to be generated in the output folder. E.g.
"input.txt"
.input_template : str | Path
The path to the input template file. The input locations in the file are marked by
GEMSEO_INPUT{input_name::1.0}
, whereinput_name
is the name of the input variable, and1.0
is its default value.output_filename : str | Path
The name of the output file to be generated in the output folder. E.g.
"output.txt"
.output_folder_basepath : str | Path
The base path of the execution directories.
output_template : str | Path
The path to the output template file. The output locations in the file are marked by
GEMSEO_OUTPUT{output_name::1.0}
, whereoutput_name
is the name of the output variable, and1.0
is its default value.
- Optional parameters
clean_after_execution : bool, optional
Whether to clean the last created directory after execution.
By default it is set to False.
folders_iter : DirectoryNamingMethod, optional
The method to create the execution directories.
By default it is set to NUMBERED.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
parse_out_separator : str, optional
The separator used for the
KEY_VALUE
output parser.By default it is set to =.
parse_outfile_method : Parser | OutputParser, optional
The optional method that can be provided by the user to parse the output template file. If the
KEY_VALUE
is used as output parser, the user may specify the separator key.By default it is set to TEMPLATE.
use_shell : bool, optional
This argument is ignored and will be removed, the shell is not used.
By default it is set to True.
write_input_file_method : InputWriter | None, optional
The method to write the input data file. If
None
, usewrite_input_file()
.By default it is set to None.
FilteringDiscipline¶
Module: gemseo.wrappers.filtering_discipline
- Required parameters
discipline : MDODiscipline
The original discipline.
- Optional parameters
input_names : Iterable[str] | None, optional
The names of the inputs of interest. If
None
, use all the inputs.By default it is set to None.
keep_in : bool, optional
Whether to the inputs of interest. Otherwise, remove them.
By default it is set to True.
keep_out : bool, optional
Whether to the outputs of interest. Otherwise, remove them.
By default it is set to True.
output_names : Iterable[str] | None, optional
The names of the outputs of interest. If
None
, use all the outputs.By default it is set to None.
FininiteElementAnalysis¶
Module: gemseo.problems.topo_opt.fea_disc
- Optional parameters
f_amplitude : int | Sequence[int], optional
The force amplitude for each pair
(f_node, f_direction)
.By default it is set to -1.
f_direction : int | Sequence[int], optional
The force direction for each
f_node
, either 0 for x or 1 for y.By default it is set to 1.
f_node : int | Sequence[int], optional
The indices of the nodes where the forces are applied.
By default it is set to 10200.
fixed_dir : int | Sequence[int] | None, optional
The clamped direction for each node, encode 0 for x and 1 for y. If
None
, a default value is used.By default it is set to None.
fixed_nodes : int | Sequence[int] | None, optional
The indices of the nodes where the structure is clamped. If
None
, a default value is used.By default it is set to None.
n_x : int, optional
The number of elements in the x-direction.
By default it is set to 100.
n_y : int, optional
The number of elements in the y-direction.
By default it is set to 100.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
nu : float, optional
The material Poisson’s ratio.
By default it is set to 0.3.
JEPJavaDiscipline¶
Note
The plugin gemseo_java is required.
Module: gemseo_java.jep_java_discipline
JavaDiscipline¶
Note
The plugin gemseo_java is required.
JobSchedulerDisciplineWrapper¶
Module: gemseo.wrappers.job_schedulers.scheduler_wrapped_disc
- Required parameters
discipline : MDODiscipline
The discipline to wrap in the job scheduler.
setup_cmd : str
The command used before running the executable.
workdir_path : Path
The path to the workdir where the files will be generated.
- Optional parameters
job_out_filename : str, optional
The output job file name.
By default it is set to batch.srun.
job_template_path : Path | str | None, optional
The path to the template to be used to make a submission to the job scheduler command.
By default it is set to None.
scheduler_run_command : str, optional
The command to call the job scheduler and submit the generated script.
By default it is set to sbatch –wait.
use_template : bool, optional
whether to use template based interface to the job scheduler.
By default it is set to True.
LSF¶
Module: gemseo.wrappers.job_schedulers.lsf
- Required parameters
discipline : MDODiscipline
The discipline to wrap in the job scheduler.
setup_cmd : str
The command used before running the executable.
user_email : str
The user email to send the run status.
workdir_path : Path
The path to the workdir where the files will be generated.
- Optional parameters
job_out_filename : str, optional
The output job file name.
By default it is set to batch.sh.
job_template_path : Path | str | None, optional
The path to the template to be used to make a submission to the job scheduler command.
By default it is set to None.
mem_per_cpu : str, optional
The memory per CPU.
By default it is set to 1G.
ntasks : int, optional
The number of tasks.
By default it is set to 1.
ntasks_per_node : int, optional
The number of tasks per node.
By default it is set to 1.
scheduler_run_command : str, optional
The command to call the job scheduler and submit the generated script.
By default it is set to bsub -K.
wall_time : str, optional
The wall time.
By default it is set to 24:00:00.
**options : dict[str:Any]
The job scheduler specific options to be used in the template.
LinearCombination¶
Module: gemseo.disciplines.linear_combination
- Required parameters
input_names : Iterable[str]
The names of input variables.
output_name : str
The name of the output variable.
- Optional parameters
input_coefficients : dict[str, float] | None, optional
The coefficients related to the input variables. If
None
, use 1 for all the input variables.By default it is set to None.
input_size : int | None, optional
The size of the inputs. If
None
, the default inputs are initialized with size 1 arrays.By default it is set to None.
offset : float, optional
The output value when all the input variables are equal to zero.
By default it is set to 0.0.
LinearDiscipline¶
Module: gemseo.problems.scalable.linear.linear_discipline
- Required parameters
input_names : Sequence[str]
The input data names.
name : str
The discipline name.
output_names : Sequence[str]
The output data names.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The type of grammars.
By default it is set to JSONGrammar.
inputs_size : int, optional
The size of input data vectors, each input data is of shape (inputs_size,).
By default it is set to 1.
matrix_density : float, optional
The percentage of non-zero elements when the matrix is sparse.
By default it is set to 0.1.
matrix_format : MatrixFormat, optional
The format of the Jacobian matrix.
By default it is set to dense.
matrix_free_jacobian : bool, optional
Whether the Jacobians are casted as linear operators.
By default it is set to False.
outputs_size : int, optional
The size of output data vectors, each output data is of shape (outputs_size,).
By default it is set to 1.
MDOAdditiveChain¶
Module: gemseo.core.chain
- Required parameters
disciplines : Sequence[MDODiscipline]
The disciplines.
outputs_to_sum : Iterable[str]
The names of the outputs to sum.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
n_processes : int | None, optional
The maximum simultaneous number of threads, if
use_threading
is True, or processes otherwise, used to parallelize the execution. IfNone
, uses the number of disciplines.By default it is set to None.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
use_threading : bool, optional
Whether to use threads instead of processes to parallelize the execution; multiprocessing will copy (serialize) all the disciplines, while threading will share all the memory. This is important to note if you want to execute the same discipline multiple times, you shall use multiprocessing.
By default it is set to True.
MDOChain¶
Module: gemseo.core.chain
- Required parameters
disciplines : Sequence[MDODiscipline]
The disciplines.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
MDODiscipline¶
Module: gemseo.core.discipline
- Optional parameters
auto_detect_grammar_files : bool, optional
Whether to look for
"ClassName_{input,output}.json"
in theGRAMMAR_DIRECTORY
if any or in the directory of the discipline class module when{input,output}_grammar_file
isNone
.By default it is set to False.
cache_file_path : str | Path | None, optional
The HDF file path when
grammar_type
isMDODiscipline.CacheType.HDF5
.By default it is set to None.
cache_type : CacheType, optional
The type of cache.
By default it is set to SimpleCache.
grammar_type : GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
input_grammar_file : str | Path | None, optional
The input grammar file path. If
None
andauto_detect_grammar_files=True
, look for"ClassName_input.json"
in theGRAMMAR_DIRECTORY
if any or in the directory of the discipline class module. IfNone
andauto_detect_grammar_files=False
, do not initialize the input grammar from a schema file.By default it is set to None.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
output_grammar_file : str | Path | None, optional
The output grammar file path. If
None
andauto_detect_grammar_files=True
, look for"ClassName_output.json"
in theGRAMMAR_DIRECTORY
if any or in the directory of the discipline class module. IfNone
andauto_detect_grammar_files=False
, do not initialize the output grammar from a schema file.By default it is set to None.
MDOObjectiveScenarioAdapter¶
Module: gemseo.disciplines.scenario_adapters.mdo_objective_scenario_adapter
- Required parameters
input_names : Sequence[str]
The inputs to overload at sub-scenario execution.
opt_history_file_prefix : str
The base name for the databases to be exported. The full names of the databases are built from the provided base name suffixed by
"_i.h5"
wherei
is replaced by the execution number, i.e the number of stored databases. If empty, the databases are not exported. The databases can be exported only iskeep_opt_history=True
.output_names : Sequence[str]
The outputs to get from the sub-scenario execution.
scenario : Scenario
The scenario to adapt.
- Optional parameters
cache_type : MDODiscipline.CacheType, optional
The type of cache policy.
By default it is set to SimpleCache.
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
keep_opt_history : bool, optional
Whether to keep databases copies after each execution.
By default it is set to False.
name : str | None, optional
The name of the scenario adapter. If
None
, use the name of the scenario adapter suffixed by"_adapter"
.By default it is set to None.
output_multipliers : bool, optional
If
True
, the Lagrange multipliers of the scenario optimal solution are computed and added to the outputs.By default it is set to False.
reset_x0_before_opt : bool, optional
If
True
, reset the initial guess before running the sub optimization.By default it is set to False.
scenario_log_level : int | None, optional
The level of the root logger during the scenario execution. If
None
, do not change the level of the root logger.By default it is set to None.
set_bounds_before_opt : bool, optional
If
True
, set the bounds of the design space. This is useful for trust regions.By default it is set to False.
set_x0_before_opt : bool, optional
If
True
, set the initial guess of the sub-scenario. This is useful for multi-start optimization.By default it is set to False.
MDOParallelChain¶
Module: gemseo.core.chain
- Required parameters
disciplines : Sequence[MDODiscipline]
The disciplines.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
n_processes : int | None, optional
The maximum simultaneous number of threads, if
use_threading
is True, or processes otherwise, used to parallelize the execution. IfNone
, uses the number of disciplines.By default it is set to None.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
use_deep_copy : bool, optional
Whether to deepcopy the discipline input data.
By default it is set to False.
use_threading : bool, optional
Whether to use threads instead of processes to parallelize the execution; multiprocessing will copy (serialize) all the disciplines, while threading will share all the memory. This is important to note if you want to execute the same discipline multiple times, you shall use multiprocessing.
By default it is set to True.
MDOScenario¶
Module: gemseo.core.mdo_scenario
- Required parameters
design_space : DesignSpace
The search space including at least the design variables (some formulations requires additional variables, e.g.
IDF
with the coupling variables).disciplines : Sequence[MDODiscipline]
The disciplines used to compute the objective, constraints and observables from the design variables.
formulation : str
The class name of the
MDOFormulation
, e.g."MDF"
,"IDF"
or"BiLevel"
.objective_name : str | Sequence[str]
The name(s) of the discipline output(s) used as objective. If multiple names are passed, the objective will be a vector.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The grammar for the scenario and the MDO formulation.
By default it is set to JSONGrammar.
maximize_objective : bool, optional
Whether to maximize the objective.
By default it is set to False.
name : str | None, optional
The name to be given to this scenario. If
None
, use the name of the class.By default it is set to None.
**formulation_options : Any
The options of the
MDOFormulation
.
MDOScenarioAdapter¶
Module: gemseo.disciplines.scenario_adapters.mdo_scenario_adapter
- Required parameters
input_names : Sequence[str]
The inputs to overload at sub-scenario execution.
opt_history_file_prefix : str
The base name for the databases to be exported. The full names of the databases are built from the provided base name suffixed by
"_i.h5"
wherei
is replaced by the execution number, i.e the number of stored databases. If empty, the databases are not exported. The databases can be exported only iskeep_opt_history=True
.output_names : Sequence[str]
The outputs to get from the sub-scenario execution.
scenario : Scenario
The scenario to adapt.
- Optional parameters
cache_type : MDODiscipline.CacheType, optional
The type of cache policy.
By default it is set to SimpleCache.
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
keep_opt_history : bool, optional
Whether to keep databases copies after each execution.
By default it is set to False.
name : str | None, optional
The name of the scenario adapter. If
None
, use the name of the scenario adapter suffixed by"_adapter"
.By default it is set to None.
output_multipliers : bool, optional
If
True
, the Lagrange multipliers of the scenario optimal solution are computed and added to the outputs.By default it is set to False.
reset_x0_before_opt : bool, optional
If
True
, reset the initial guess before running the sub optimization.By default it is set to False.
scenario_log_level : int | None, optional
The level of the root logger during the scenario execution. If
None
, do not change the level of the root logger.By default it is set to None.
set_bounds_before_opt : bool, optional
If
True
, set the bounds of the design space. This is useful for trust regions.By default it is set to False.
set_x0_before_opt : bool, optional
If
True
, set the initial guess of the sub-scenario. This is useful for multi-start optimization.By default it is set to False.
MDOWarmStartedChain¶
Module: gemseo.core.chain
- Required parameters
disciplines : Sequence[MDODiscipline]
The disciplines.
variable_names_to_warm_start : Sequence[str]
The names of the variables to be warm started. These names must be outputs of the disciplines in the chain. If the list is empty, no variables are warm started.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
MainDiscipline¶
Module: gemseo.problems.scalable.parametric.disciplines.main_discipline
- Required parameters
t_i : NDArray[float]
The threshold vectors \(t_1,\ldots,t_N\).
- Optional parameters
**default_input_values : NDArray[float]
The default values of the input variables.
MaterialModelInterpolation¶
Module: gemseo.problems.topo_opt.material_model_interpolation_disc
- Required parameters
e0 : float
The full material Young modulus.
empty_elements : Sequence[int]
The index of an empty element ids that are not part of the design space.
full_elements : Sequence[int]
The index of full element ids that are not part of the design space.
n_x : int
The number of elements in the x-direction.
n_y : int
The number of elements in the y-direction.
penalty : float
The SIMP penalty coefficient.
- Optional parameters
contrast : float, optional
The ratio between the full material Young’s modulus and void material Young’s modulus.
By default it is set to 1000000000.0.
MatlabDiscipline¶
Note
The plugin gemseo_matlab is required.
Module: gemseo_matlab.matlab_discipline
- Required parameters
matlab_fct : str | Path
The path of the Matlab file or Name of the function.
- Optional parameters
add_subfold_path : bool, optional
Whether to add all sub-folder to matlab engine path.
By default it is set to False.
auto_detect_grammar_files : bool, optional
If no input and output grammar files are provided, auto_detect_grammar_files uses a naming convention to associate a grammar file to a discipline: searches in the “comp_dir” directory containing the discipline source file for files basenames self.name _input.json and self.name _output.json.
By default it is set to False.
cache_file_path : str | None, optional
The file to store the data, mandatory when HDF caching is used.
By default it is set to None.
cache_type : MDODiscipline.CacheType, optional
The type of cache.
By default it is set to SimpleCache.
check_opt_data : bool, optional
Whether to check input and output data of discipline.
By default it is set to True.
clean_cache_each_n : int | None, optional
Iteration interval at which matlab workspace is cleaned.
By default it is set to None.
grammar_type : MDODiscipline.GrammarType, optional
The type of the input and output grammars.
By default it is set to JSONGrammar.
input_grammar_file : str | None, optional
The file for input grammar description, if None, name + “_input.json” is used.
By default it is set to None.
input_names : Sequence[str] | None, optional
The input variables.
By default it is set to None.
is_jac_returned_by_func : bool, optional
If True, the jacobian matrices should be returned of matlab function with standard outputs. Default is False. If True, the conventional name ‘jac_dout_din’ is used as jacobian term of any output ‘out’ with respect to input ‘in’.
By default it is set to False.
matlab_data_file : str | Path | None, optional
The .mat file or path containing default values of data.
By default it is set to None.
matlab_engine_name : str, optional
The name of the singleton used for this discipline.
By default it is set to matlab.
name : str | None, optional
The name of discipline.
By default it is set to None.
output_grammar_file : str | None, optional
The file for output grammar description.
By default it is set to None.
output_names : Sequence[str] | None, optional
The output variables.
By default it is set to None.
search_file : str | None, optional
The root directory to launch the research of matlab file.
By default it is set to None.
Mission¶
Module: gemseo.problems.aerostructure.aerostructure
- Optional parameters
lift_val : float, optional
The threshold to compute the lift constraint.
By default it is set to 0.5.
r_val : float, optional
The threshold to compute the reserve factor constraint.
By default it is set to 0.5.
PropaneComb1¶
Module: gemseo.problems.propane.propane
PropaneComb2¶
Module: gemseo.problems.propane.propane
PropaneComb3¶
Module: gemseo.problems.propane.propane
PropaneReaction¶
Module: gemseo.problems.propane.propane
RemappingDiscipline¶
Module: gemseo.disciplines.remapping
- Required parameters
discipline : MDODiscipline
The original discipline.
input_mapping : NameMapping
The input names to the original input names.
output_mapping : NameMapping
The output names to the original output names.
RosenMF¶
Module: gemseo.problems.analytical.rosenbrock
- Optional parameters
dimension : int, optional
The dimension of the design space.
By default it is set to 2.
SLURM¶
Module: gemseo.wrappers.job_schedulers.slurm
- Required parameters
discipline : MDODiscipline
The discipline to wrap in the job scheduler.
setup_cmd : str
The command used before running the executable.
user_email : str
The user email to send the run status.
workdir_path : Path
The path to the workdir where the files will be generated.
- Optional parameters
cpus_per_task : int, optional
The number of CPUS per task.
By default it is set to 1.
job_out_filename : str, optional
The output job file name.
By default it is set to batch.sh.
job_template_path : Path | str | None, optional
The path to the template to be used to make a submission to the job scheduler command.
By default it is set to None.
mem_per_cpu : str, optional
The memory per CPU.
By default it is set to 1G.
nodes_number : int, optional
The number nodes.
By default it is set to 1.
ntasks : int, optional
The number of tasks.
By default it is set to 1.
ntasks_per_node : int, optional
The number of tasks per node.
By default it is set to 1.
scheduler_run_command : str, optional
The command to call the job scheduler and submit the generated script.
By default it is set to sbatch –wait.
use_template : bool, optional
whether to use template based interface to the job scheduler.
By default it is set to True.
wall_time : str, optional
The wall time.
By default it is set to 24:00:00.
**options : dict[str:Any]
The job scheduler specific options to be used in the template.
ScalableDiscipline¶
Module: gemseo.problems.scalable.parametric.disciplines.scalable_discipline
- Required parameters
a_i : NDArray
The offset vector \(a_i\).
C_ij : Mapping[str, NDArray[float]]
The coefficient matrices \(\left(C_{i,j}\right)_{j=1\atop j\neq i}^N\) where \(C_{i,j}\) is used to multiply the coupling variable \(y_j\).
D_i0 : NDArray
The coefficient matrix \(D_{i,0}\) to multiply the shared design variable \(x_0\).
D_ii : NDArray
The coefficient matrix \(D_{i,i}\) to multiply the local design variable \(x_i\).
index : int
The index \(i\) of the scalable discipline.
- Optional parameters
**default_input_values : NDArray[float]
The default values of the input variables.
Scenario¶
Module: gemseo.core.scenario
- Required parameters
design_space : DesignSpace
The search space including at least the design variables (some formulations requires additional variables, e.g.
IDF
with the coupling variables).disciplines : Sequence[MDODiscipline]
The disciplines used to compute the objective, constraints and observables from the design variables.
formulation : str
The class name of the
MDOFormulation
, e.g."MDF"
,"IDF"
or"BiLevel"
.objective_name : str | Sequence[str]
The name(s) of the discipline output(s) used as objective. If multiple names are passed, the objective will be a vector.
- Optional parameters
grammar_type : MDODiscipline.GrammarType, optional
The grammar for the scenario and the MDO formulation.
By default it is set to JSONGrammar.
maximize_objective : bool, optional
Whether to maximize the objective.
By default it is set to False.
name : str | None, optional
The name to be given to this scenario. If
None
, use the name of the class.By default it is set to None.
**formulation_options : Any
The options of the
MDOFormulation
.
ScilabDiscipline¶
Note
The plugin gemseo_scilab is required.
Module: gemseo_scilab.scilab_discipline
- Required parameters
function_name : str
The name of the scilab function to generate the discipline from.
script_dir_path : str
The path to the directory to scan for .sci files.
Sellar1¶
Module: gemseo.problems.sellar.sellar
Sellar2¶
Module: gemseo.problems.sellar.sellar
SellarSystem¶
Module: gemseo.problems.sellar.sellar
SobieskiAerodynamics¶
Module: gemseo.problems.sobieski.disciplines
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiAerodynamicsSG¶
Module: gemseo.problems.sobieski._disciplines_sg
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiChain¶
Module: gemseo.problems.sobieski.process.mdo_chain
- Optional parameters
dtype : SobieskiBase.DataType, optional
The NumPy type for data arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiDiscipline¶
Module: gemseo.problems.sobieski.disciplines
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiDisciplineWithSimpleGrammar¶
Module: gemseo.problems.sobieski._disciplines_sg
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiMDAGaussSeidel¶
Module: gemseo.problems.sobieski.process.mda_gauss_seidel
- Optional parameters
dtype : SobieskiBase.DataType, optional
The NumPy type for data arrays, either “float64” or “complex128”.
By default it is set to float64.
**mda_options : Any
The options of the MDA.
SobieskiMDAJacobi¶
Module: gemseo.problems.sobieski.process.mda_jacobi
- Optional parameters
dtype : SobieskiBase.DataType, optional
The NumPy type for data arrays, either “float64” or “complex128”.
By default it is set to float64.
n_processes : int, optional
The maximum simultaneous number of threads, if
use_threading
is True, or processes otherwise, used to parallelize the execution.By default it is set to 1.
**mda_options : Any
The options of the MDA.
SobieskiMission¶
Module: gemseo.problems.sobieski.disciplines
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
enable_delay : bool | float, optional
If
True
, wait one second before computation. If a positive number, wait the corresponding number of seconds. IfFalse
, compute directly.By default it is set to False.
SobieskiMissionSG¶
Module: gemseo.problems.sobieski._disciplines_sg
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiPropulsion¶
Module: gemseo.problems.sobieski.disciplines
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiPropulsionSG¶
Module: gemseo.problems.sobieski._disciplines_sg
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiStructure¶
Module: gemseo.problems.sobieski.disciplines
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
SobieskiStructureSG¶
Module: gemseo.problems.sobieski._disciplines_sg
- Optional parameters
dtype : SobieskiBase.DataType, optional
The data type for the NumPy arrays, either “float64” or “complex128”.
By default it is set to float64.
Splitter¶
Module: gemseo.disciplines.splitter
- Required parameters
input_name : str
The name of the input to split.
output_names_to_input_indices : dict[str, Iterable[int] | int]
The input indices associated with the output names.
Structure¶
SurrogateDiscipline¶
Module: gemseo.disciplines.surrogate
- Required parameters
surrogate : str | MLRegressionAlgo
Either the name of a class deriving from
MLRegressionAlgo
or the instance of anMLRegressionAlgo
.
- Optional parameters
data : IODataset | None, optional
The learning dataset to train the regression model. If
None
, the regression model is supposed to be trained.By default it is set to None.
default_inputs : dict[str, ndarray] | None, optional
The default values of the inputs. If
None
, use the center of the learning input space.By default it is set to None.
disc_name : str | None, optional
The name to be given to the surrogate discipline. If
None
, concatenateSHORT_ALGO_NAME
anddata.name
.By default it is set to None.
input_names : Iterable[str] | None, optional
The names of the input variables. If
None
, consider all input variables mentioned in the learning dataset.By default it is set to None.
output_names : Iterable[str] | None, optional
The names of the output variables. If
None
, consider all input variables mentioned in the learning dataset.By default it is set to None.
transformer : TransformerType, optional
The strategies to transform the variables. The values are instances of
Transformer
while the keys are the names of either the variables or the groups of variables, e.g."inputs"
or"outputs"
in the case of the regression algorithms. If a group is specified, theTransformer
will be applied to all the variables of this group. IfThe :attr:
.MLRegressionAlgo.DEFAULT_TRANSFORMER` uses theMinMaxScaler
strategy for both input and output variables.By default it is set to {‘inputs’: <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object at 0x7f2916093ca0>, ‘outputs’: <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object at 0x7f2916093d30>}.
**parameters : MLAlgoParameterType
The parameters of the machine learning algorithm.
TaylorDiscipline¶
Module: gemseo.disciplines.taylor
- Required parameters
discipline : MDODiscipline
The discipline to be approximated by a Taylor polynomial.
name : str
The name of the discipline. If
None
, use the class name.
- Optional parameters
input_data : Mapping[str, NDArray[float]], optional
The point of expansion. If empty, use the default inputs of
discipline
.By default it is set to {}.
VolumeFraction¶
Module: gemseo.problems.topo_opt.volume_fraction_disc
- Optional parameters
empty_elements : Sequence[int] | None, optional
The index of the empty element ids that are not part of the design space.
By default it is set to None.
full_elements : Sequence[int] | None, optional
The index of the full element ids that are not part of the design space.
By default it is set to None.
n_x : int, optional
The number of elements in the x-direction.
By default it is set to 100.
n_y : int, optional
The number of elements in the y-direction.
By default it is set to 100.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
XLSDiscipline¶
Module: gemseo.wrappers.xls_discipline
- Required parameters
xls_file_path : Path | str
The path to the Excel file. If the file is a XLSM, a macro named “execute” must exist and will be called by the
_run()
method before retrieving the outputs.
- Optional parameters
copy_xls_at_setstate : bool, optional
If
True
, create a copy of the original Excel file for each of the pickled parallel processes. This option is required to be set toTrue
for parallelization in Windows platforms.By default it is set to False.
macro_name : str | None, optional
The name of the macro to be executed for a XLSM file. If
None
is provided, do not run a macro.By default it is set to execute.
name : str | None, optional
The name of the discipline. If
None
, use the class name.By default it is set to None.
recreate_book_at_run : bool, optional
Whether to rebuild the xls objects at each
_run
call.By default it is set to False.