Flows¶
A flow represents energy transfer on a bus. Each flow \(f\) has a non-negative rate variable \(P_{f,t}\) bounded by an optional nominal capacity \(\bar{\mathrm{P}}_f\).
Bounds¶
When Flow.size is set, the rate is bounded by relative minimum and maximum
profiles:
By default \(\underline{\mathrm{p}}_{f,t} = 0\) and \(\bar{\mathrm{p}}_{f,t} = 1\), so the bounds simplify to \(0 \leq P_{f,t} \leq \bar{\mathrm{P}}_f\). With no capacity (\(\bar{\mathrm{P}}_f = \infty\)) the flow is just \(P_{f,t} \geq 0\).
Fixed Profile¶
When Flow.fixed_relative_profile (\(\pi_{f,t}\)) is set, the rate is pinned
to a profile scaled by the capacity:
Implemented by setting both bounds equal to the profile value.
Aggregate Bounds¶
Aggregate bounds constrain the flow-hours \(H_{f,p}\) — the flow rate summed over the horizon — within each period independently:
Flow-hour bounds (flow_hours_min / flow_hours_max) — absolute [MWh]:
Load factor bounds (load_factor_min / load_factor_max) — utilization
relative to capacity, with \(T = \sum_t \Delta t_t\) the period duration:
When Flow.size is a Sizing or Investment object,
\(\bar{\mathrm{P}}_f\) is the size variable \(S_{f,p}\) and the products
stay linear (constant \(\lambda \cdot T\) times a variable). Load factor
bounds therefore require a size; flow-hour bounds do not.
Cross-period budgets are not expressed here — route them through an
effect with total_min / total_max.
Ramp Limits¶
Ramp limits (ramp_up_per_hour / ramp_down_per_hour) cap the rate change
between consecutive timesteps, as a fraction of capacity per hour:
Constraints apply from the second timestep onward; periods are independent
(no ramp coupling across period boundaries). Like load factors, ramps are
relative to size — when Flow.size is a Sizing or Investment
object, \(\bar{\mathrm{P}}_f\) is the size variable and the constraint
stays linear.
Interaction with Status
For flows with status, the ramp does not bind across on/off transitions: the startup (shutdown) binary relaxes the ramp-up (ramp-down) constraint in the transition step, so a unit may always jump to its semi-continuous minimum and drop back to zero:
Transitions are pinned to actual state changes (status|exclusive),
so the relaxation cannot be exploited between running steps.
Component-status flows relax via their component's transition
binaries. Custom (tighter) startup/shutdown ramp rates are future
work.
Effect Contributions¶
Each flow contributes to tracked effects (cost, emissions, …). Per-timestep:
\(\mathrm{c}_{f,k,t}\) is the per-flow-hour coefficient (Flow.effects_per_flow_hour).
Units cancel: e.g. €/MWh × MW × h = €. Contributions feed into the
effect tracking equations.
See also¶
- Sizing — when
Flow.sizeis aSizingobject instead of a fixed value. - Status — when
Flow.statusis set, the flow becomes semi-continuous \(\{0\} \cup [\underline{\mathrm{P}}, \bar{\mathrm{P}}]\). - Carrier Balance — Multi-Node — when
Flow.nodetargets a specific node.
Parameters¶
| Symbol | Description | API |
|---|---|---|
| \(P_{f,t}\) | Flow rate variable | flow--rate[flow, time] |
| \(\bar{\mathrm{P}}_f\) | Nominal capacity | Flow.size |
| \(\underline{\mathrm{p}}_{f,t}\) | Relative lower bound | Flow.relative_rate_min |
| \(\bar{\mathrm{p}}_{f,t}\) | Relative upper bound | Flow.relative_rate_max |
| \(\pi_{f,t}\) | Fixed relative profile | Flow.fixed_relative_profile |
| \(\mathrm{c}_{f,k,t}\) | Effect coefficient per flow-hour | Flow.effects_per_flow_hour |
| \(\underline{\mathrm{H}}_f\) | Minimum flow-hours per period | Flow.flow_hours_min |
| \(\bar{\mathrm{H}}_f\) | Maximum flow-hours per period | Flow.flow_hours_max |
| \(\underline{\lambda}_f\) | Minimum load factor per period | Flow.load_factor_min |
| \(\bar{\lambda}_f\) | Maximum load factor per period | Flow.load_factor_max |
| \(\mathrm{r}^{+}_{f,t}\) | Max ramp up, fraction of size per hour | Flow.ramp_up_per_hour |
| \(\mathrm{r}^{-}_{f,t}\) | Max ramp down, fraction of size per hour | Flow.ramp_down_per_hour |
| \(\Delta t_t\) | Timestep duration (h) | dt |
See Notation for the full symbol table and Indexing Convention for how indices broadcast.