create_algorithm#

OptimizationOnMOPTemplate.create_algorithm(parent_system: ParametricSystem, parameters: Iterable[Parameter], criteria: Iterable[Criterion], responses: Iterable[Response], algorithm_type: nt.NodeType, solver_type: nt.NodeType, algorithm_name: str | None = None, algorithm_settings: GeneralAlgorithmSettings | None = None, solver_name: str | None = None, solver_settings: GeneralNodeSettings | None = None, start_designs: Iterable[Design] | None = None, connections_algorithm: Iterable[Tuple[OutputSlot, str]] | None = None, connections_solver: Iterable[Tuple[OutputSlot, str]] | None = None) Tuple[ParametricSystem, IntegrationNode]#

Create an algorithm system with solver node and append to managed algorithms.

Parameters:
parent_systemParametricSystem

Parent system to create the algorithm in.

parametersIterable[Parameter]

Parameters to be included in the algorithm.

criteriaIterable[Criterion]

Criteria to be included in the algorithm.

responsesIterable[Response]

Responses to be included in the algorithm.

algorithm_typeNodeType

The type of algorithm to generate.

solver_typeNodeType

The type of solver node to generate.

algorithm_nameOptional[str], optional

Optional name or ID for the algorithm.

algorithm_settingsOptional[GeneralAlgorithmSettings] , optional

Additional settings for the algorithm. Settings must be compatible with the selected algorithm type.

solver_nameOptional[str], optional

Name for the solver node.

solver_settingsOptional[GeneralNodeSettings], optional

Additional settings for the solver node.

start_designsOptional[Iterable[Design]], optional

Designs to be used as start designs for the algorithm.

connections_algorithm: Optional[Iterable[Tuple[OutputSlot, str]]]

Iterable of tuples specifying the connection from each predecessor node to the new algorithm.

connections_solver: Optional[Iterable[Tuple[OutputSlot, str]]]

Iterable of tuples specifying the connection from each predecessor node to the new solver node.

Returns:
ParametricSystem, IntegrationNode

The created algorithm system and the created solver node.