algo_lib module¶
Base class for algorithm libraries.
- class gemseo.algos.algo_lib.AlgoLib[source]¶
Bases:
object
Abstract class for algorithms libraries interfaces.
An algorithm library solves a numerical problem (optim, doe, linear problem) using a particular algorithm from a particular family of numerical methods.
Provide the available methods in the library for the proposed problem to be solved.
To integrate an optimization package, inherit from this class and put your module in gemseo.algos.doe or gemseo.algo.opt, or gemseo.algos.linear_solver packages.
- Return type
None
- init_options_grammar(algo_name)[source]¶
Initialize the options grammar.
- Parameters
algo_name (str) – The name of the algorithm.
- Return type
- static is_algorithm_suited(algorithm_description, problem)[source]¶
Check if the algorithm is suited to the problem according to its description.
- Parameters
algorithm_description (gemseo.algos.algo_lib.AlgorithmDescription) – The description of the algorithm.
problem (Any) – The problem to be solved.
- Returns
Whether the algorithm is suited to the problem.
- Return type
- OPTIONS_DIR: Final[str] = 'options'¶
The name of the directory containing the files of the grammars of the options.
- OPTIONS_MAP: dict[str, str] = {}¶
The names of the options in GEMSEO mapping to those in the wrapped library.
- descriptions: dict[str, AlgorithmDescription]¶
The description of the algorithms contained in the library.
- internal_algo_name: str | None¶
The internal name of the algorithm used currently.
It typically corresponds to the name of the algorithm in the wrapped library if any.
- opt_grammar: JSONGrammar | None¶
The grammar defining the options of the current algorithm.