flixopt.solvers ¶
This module contains the solvers of the flixopt framework, making them available to the end user in a compact way.
Classes¶
GurobiSolver dataclass ¶
Python
GurobiSolver(mip_gap: float = (lambda: CONFIG.Solving.mip_gap)(), time_limit_seconds: int = (lambda: CONFIG.Solving.time_limit_seconds)(), log_to_console: bool = (lambda: CONFIG.Solving.log_to_console)(), extra_options: dict[str, Any] = dict())
Bases: _Solver
Gurobi solver configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mip_gap | float | Acceptable relative optimality gap in [0.0, 1.0]; mapped to Gurobi | (lambda: mip_gap)() |
time_limit_seconds | int | Time limit in seconds; mapped to Gurobi | (lambda: time_limit_seconds)() |
log_to_console | bool | If False, no output to console. | (lambda: log_to_console)() |
extra_options | dict[str, Any] | Additional solver options merged into | dict() |
HighsSolver dataclass ¶
Python
HighsSolver(mip_gap: float = (lambda: CONFIG.Solving.mip_gap)(), time_limit_seconds: int = (lambda: CONFIG.Solving.time_limit_seconds)(), log_to_console: bool = (lambda: CONFIG.Solving.log_to_console)(), extra_options: dict[str, Any] = dict())
Bases: _Solver
HiGHS solver configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
mip_gap | float | Acceptable relative optimality gap in [0.0, 1.0]; mapped to HiGHS |
time_limit_seconds | int | Time limit in seconds; mapped to HiGHS |
log_to_console | bool | If False, no output to console. |
extra_options | dict[str, Any] | Additional solver options merged into |
threads | int | None | Number of threads to use. If None, HiGHS chooses. |