gemseo.algos.opt.scipy_milp.scipy_milp module#
SciPy linear programming library wrapper.
- class ScipyMILP(algo_name='Scipy_MILP')[source]#
Bases:
BaseOptimizationLibrary
SciPy Mixed Integer Linear Programming library interface.
See BaseOptimizationLibrary.
With respect to scipy milp function, this wrapper only allows continuous or integer variables.
Notes
The missing current values of the
DesignSpace
attached to theOptimizationProblem
are automatically initialized with the methodDesignSpace.initialize_missing_current_values()
.- Parameters:
algo_name (str) --
The algorithm name.
By default it is set to "Scipy_MILP".
- Raises:
KeyError -- When the algorithm is not in the library.
- ALGORITHM_INFOS: ClassVar[dict[str, ScipyMILPAlgorithmDescription]] = {'Scipy_MILP': ScipyMILPAlgorithmDescription(algorithm_name='Branch & Cut algorithm', internal_algorithm_name='milp', library_name='SciPy Mixed-Integer Linear Programming', description='Mixed-integer linear programming', website='https://docs.scipy.org/doc/scipy/reference/scipy.optimize.milp.html', Settings=<class 'gemseo.algos.opt.scipy_milp.settings.scipy_milp_settings.SciPyMILP_Settings'>, handle_integer_variables=True, handle_equality_constraints=True, handle_inequality_constraints=True, handle_multiobjective=False, positive_constraints=False, for_linear_problems=False, require_gradient=False)}#
The description of the algorithms contained in the library.
- class ScipyMILPAlgorithmDescription(algorithm_name, internal_algorithm_name, library_name='SciPy Mixed-Integer Linear Programming', description='', website='', Settings=<class 'gemseo.algos.opt.scipy_milp.settings.scipy_milp_settings.SciPyMILP_Settings'>, handle_integer_variables=True, handle_equality_constraints=True, handle_inequality_constraints=True, handle_multiobjective=False, positive_constraints=False, for_linear_problems=False, require_gradient=False)[source]#
Bases:
OptimizationAlgorithmDescription
The description of a the SciPy mixed-integer linear programming library.
- Parameters:
algorithm_name (str)
internal_algorithm_name (str)
library_name (str) --
By default it is set to "SciPy Mixed-Integer Linear Programming".
description (str) --
By default it is set to "".
website (str) --
By default it is set to "".
Settings (type[SciPyMILP_Settings]) --
By default it is set to <class 'gemseo.algos.opt.scipy_milp.settings.scipy_milp_settings.SciPyMILP_Settings'>.
handle_integer_variables (bool) --
By default it is set to True.
handle_equality_constraints (bool) --
By default it is set to True.
handle_inequality_constraints (bool) --
By default it is set to True.
handle_multiobjective (bool) --
By default it is set to False.
positive_constraints (bool) --
By default it is set to False.
for_linear_problems (bool) --
By default it is set to False.
require_gradient (bool) --
By default it is set to False.
- Settings#
The option validation model for SciPy linear programming library.
alias of
SciPyMILP_Settings
- handle_equality_constraints: bool = True#
Whether the optimization algorithm handles equality constraints.
- handle_inequality_constraints: bool = True#
Whether the optimization algorithm handles inequality constraints.