Sizing (Investment Optimization)¶
Overview¶
Sizing introduces a capacity decision variable \(S\) that replaces the fixed nominal capacity \(\bar{\mathrm{P}}_f\). The solver optimizes both the capacity and the dispatch simultaneously.
Variables¶
| Symbol | Code | Domain | Description |
|---|---|---|---|
| \(S_f\) | flow--size[flow] |
\(\geq 0\) | Invested flow capacity |
| \(y_f\) | flow--size_indicator[flow] |
\(\{0, 1\}\) | Binary: invest yes/no (optional only) |
| \(S_s\) | storage--capacity[storage] |
\(\geq 0\) | Invested storage capacity |
| \(y_s\) | storage--size_indicator[storage] |
\(\{0, 1\}\) | Binary: invest yes/no (optional only) |
Mandatory Sizing¶
When mandatory=True, the component must be built. The capacity is continuous:
where \(\mathrm{S}^-\) = min_size and \(\mathrm{S}^+\) = max_size. No binary variable is needed,
so the problem is faster to solve:
Optional Sizing¶
When mandatory=False, a binary indicator \(y_f\) gates the capacity:
When \(y_f = 0\): \(S_f = 0\) (not built). When \(y_f = 1\): \(S_f \in [\mathrm{S}^-, \mathrm{S}^+]\).
Use this when you need effects_fixed (one-time costs gated by the indicator)
or when min_size > 0 must be enforced only if built:
Binary Invest¶
When \(\mathrm{S}^- = \mathrm{S}^+\), the sizing reduces to a binary yes/no decision at exactly that capacity:
Flow Rate Bounds with Sizing¶
With sizing, the fixed capacity \(\bar{\mathrm{P}}_f\) is replaced by the variable \(S_f\). The relative bounds scale by the invested size:
Similarly for fixed profiles:
Storage Sizing¶
The same pattern applies to storage capacity. The charge state bounds become:
Investment Effects¶
Investment costs contribute to effect totals. For each effect \(k\):
Per-Size¶
Cost proportional to the invested size (e.g. €/MW):
where \(\gamma_{f,k}\) is Sizing.effects_per_size[k].
Fixed¶
One-time cost charged when the component is built, gated by the binary indicator:
where \(\phi_{f,k}\) is Sizing.effects_fixed[k]. Only applies when
mandatory=False (binary indicator exists).
Total¶
The direct investment contribution to effect \(k\) is:
This feeds into the effect total equation and can be further weighted by cross-effect contributions.
Interaction with Other Features¶
With Bounds¶
Relative bounds (relative_minimum, relative_maximum) are fractions of the
optimized size variable, not a fixed number. If the solver picks 80 MW and
relative_minimum=0.3, the minimum flow rate is 24 MW.
With Status¶
When a flow has both Sizing and Status, a big-M formulation decouples the
binary on/off from the continuous size. See Status — Interaction with Sizing
for the constraints.
Parameters¶
| Symbol | Description | Reference |
|---|---|---|
| \(S_f\) | Flow capacity variable | flow--size[flow] |
| \(S_s\) | Storage capacity variable | storage--capacity[storage] |
| \(y_f\), \(y_s\) | Binary invest indicator | flow--size_indicator, storage--size_indicator |
| \(\mathrm{S}^-\) | Minimum size | Sizing.min_size |
| \(\mathrm{S}^+\) | Maximum size | Sizing.max_size |
| \(\gamma_{f,k}\) | Per-size investment cost | Sizing.effects_per_size |
| \(\phi_{f,k}\) | Fixed investment cost | Sizing.effects_fixed |
See Notation for the full symbol table.