Flow
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.
Mathematical Patterns Used
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
Implementation
Python Class: 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
API documentation for complete parameter list and usage examples.
See Also
- 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