The flow_rate is the main optimization variable of the Flow. It's limited by the size of the Flow and relative bounds \eqref{eq:flow_rate}.
With:
-
$\text P$ being the size of the Flow - $p(\text{t}{i})$ being the flow-rate at time $\text{t}{i}$
- $\text p^{\text{L}}{\text{rel}}(\text{t}{i})$ being the relative lower bound (typically 0)
- $\text p^{\text{U}}{\text{rel}}(\text{t}{i})$ being the relative upper bound (typically 1)
With $\text p^{\text{L}}{\text{rel}}(\text{t}{i}) = 0$ and $\text p^{\text{U}}{\text{rel}}(\text{t}{i}) = 1$, equation \eqref{eq:flow_rate} simplifies to
This mathematical formulation can be extended by using OnOffParameters to define the on/off state of the Flow, or by using InvestParameters to change the size of the Flow from a constant to an optimization variable.
Flow formulation uses the following modeling patterns:
-
Scaled Bounds - Basic flow rate bounds (equation
$\eqref{eq:flow_rate}$ ) - Scaled Bounds with State - When combined with OnOffParameters
- Bounds with State - Investment decisions with InvestParameters
Python Class: [Flow][flixopt.elements.Flow]
Key Parameters:
-
size: Flow size$\text{P}$ (can be fixed or variable with InvestParameters) -
relative_minimum,relative_maximum: Relative bounds $\text{p}^{\text{L}}{\text{rel}}, \text{p}^{\text{U}}{\text{rel}}$ -
effects_per_flow_hour: Operational effects (costs, emissions, etc.) -
invest_parameters: Optional investment modeling (see InvestParameters) -
on_off_parameters: Optional on/off operation (see OnOffParameters)
See the [Flow][flixopt.elements.Flow] API documentation for complete parameter list and usage examples.
- OnOffParameters - Binary on/off operation
- InvestParameters - Variable flow sizing
- Bus - Flow balance constraints
- LinearConverter - Flow ratio constraints
- Storage - Flow integration over time
- Modeling Patterns - Mathematical building blocks