Types
Info
Constraints need a rework, to be done.
Constraints
¶
Bases: Enum
Represents a collection of constraints that can be applied to a model in the context of optimization problems. These constraints encompass various types of bounds and limits, allowing the user to define investments, flow restrictions, and active flow management to match specific use cases or requirements effectively.
Attributes:
Name | Type | Description |
---|---|---|
shared_limit |
Adds a constraint to the given model that restricts the weighted sum of variables to a corridor. |
|
investment_limit |
Sets an absolute limit for the total investment costs of an investment optimization problem. |
|
additional_investment_flow_limit |
Global limit for investment flows weighted by an attribute keyword. This constraint is only valid for Flows, not for components such as an investment storage. The attribute named by the keyword must be added to every Investment attribute of the flow to be considered. The total value of keyword attributes after optimization can be retrieved by calling |
|
generic_integral_limit |
Sets a global limit for flows weighted by an attribute called a keyword. The attribute named by the keyword must be added to every flow considered. |
|
emission_limit |
Short handle for |
|
limit_active_flow_count |
Sets limits (lower and/or upper) for the number of concurrently active NonConvex flows. The flows are provided as a list. |
|
limit_active_flow_count_by_keyword |
Wrapper for |
|
equate_variables |
Ensures that specified variables within the optimization problem are treated as equivalent. |
Source code in backend/app/ensys/common/types.py
Interval
¶
Bases: Enum
Represents various fixed time intervals available for use.
This class is an enumeration that defines specific time intervals as constants, describing their corresponding durations in hours. The intervals are represented as descriptive names and associated with their numerical values (in fractional hours). These values can be leveraged to standardize time-related calculations.
Attributes:
Name | Type | Description |
---|---|---|
quarter_hourly |
Represents a timestep of 15 minutes. |
|
half_hourly |
Represents a timestep of 30 minutes. |
|
hourly |
Represents a timestep of 60 minutes. |
Source code in backend/app/ensys/common/types.py
Solver
¶
Bases: Enum
Represents enumeration of different solvers available for mathematical programming.
The class provides a list of solvers used in optimization problems. These include different solvers for linear programming and mixed-integer linear programming. It allows explicit references to specific solvers and can be helpful for choosing the most compatible solver for a given optimization task.
Attributes:
Name | Type | Description |
---|---|---|
cbc |
COIN-OR Branch-and-Cut Solver. |
|
gurobi |
Gurobi MILP Solver. |
|
gurobi_direct |
Gurobi MILP Solver (Direct interface). |
|
gurobi_persistent |
Gurobi MILP Solver (Persistent interface). |
|
glpk |
GNU Linear Programming Kit Solver. |
|
cplex |
IBM ILOG CPLEX Optimization Solver. |
|
kiwi |
Kiwisolver from PyPI. |