Objective Function¶
Formulation¶
The model minimizes the total value of the designated objective effect \(k^*\)
(the one with is_objective=True).
Single-period¶
Without periods, the objective is simply:
Multi-period¶
With periods \(p \in \mathcal{P}\), the objective separates recurring and one-time domains with independent per-effect weights:
- \(\omega^{\text{periodic}}_{k,p}\) defaults to the global
period_weights(inferred from gaps between period labels, or explicit). Override per effect viaEffect.period_weights_periodic. - \(\omega^{\text{once}}_{k,p}\) defaults to 1 (no scaling). Override per effect via
Effect.period_weights_once.
This allows different weighting strategies per effect (e.g., NPV discounting for costs, flat weights for emissions).
Total effect¶
The total effect per period combines all three domains:
The temporal domain accumulates flow contributions, running costs, startup costs, and cross-effect contributions per timestep:
The periodic domain accumulates recurring sizing costs, fixed costs, and cross-effect contributions:
The once domain is reserved for one-time costs (e.g., investment CAPEX) that should not be scaled by period weights. Currently constrained to zero.
See Sizing, Status, and Effects for full formulations of each term.
Parameters¶
| Symbol | Description | Reference |
|---|---|---|
| \(k^*\) | Objective effect | Effect.is_objective = True |
| \(c_{f,k,t}\) | Effect coefficient per flow-hour | Flow.effects_per_flow_hour |
| \(P_{f,t}\) | Flow rate variable | flow--rate[flow, time] |
| \(\Delta t_t\) | Timestep duration | dt |
| \(w_t\) | Timestep weight | weights |
| \(\omega^{\text{periodic}}_{k,p}\) | Period weight for recurring domain | Effect.period_weights_periodic (fallback: Dims.period_weights) |
| \(\omega^{\text{once}}_{k,p}\) | Period weight for one-time domain | Effect.period_weights_once (default: 1) |
| \(\Phi_{k,t(,p)}^{\text{temporal}}\) | Temporal (per-timestep) effect variable | effect--temporal[effect, time(, period)] |
| \(\Phi_{k(,p)}^{\text{periodic}}\) | Periodic effect variable (recurring costs) | effect--periodic[effect(, period)] |
| \(\Phi_{k(,p)}^{\text{once}}\) | One-time effect variable | effect--once[effect(, period)] |
| \(\Phi_{k(,p)}\) | Total effect variable | effect--total[effect(, period)] |
See Notation for the full symbol table.
Examples¶
Single-period¶
Consider a gas boiler over 3 timesteps (\(\Delta t = 1\,\text{h}\), \(w = 1\)):
| \(t\) | \(P_{\text{gas},t}\) (MW) | \(c_{\text{gas,cost}}\) (€/MWh) | \(\Phi_{\text{cost},t}^{\text{temporal}}\) (€) |
|---|---|---|---|
| 1 | 2.0 | 30 | \(30 \times 2.0 \times 1 = 60\) |
| 2 | 3.0 | 30 | \(30 \times 3.0 \times 1 = 90\) |
| 3 | 1.5 | 30 | \(30 \times 1.5 \times 1 = 45\) |
Total cost: \(\Phi_{\text{cost}} = \sum_t \Phi_{\text{cost},t}^{\text{temporal}} = 60 + 90 + 45 = 195\,\text{€}\)
Multi-period¶
Same system with periods=[2020, 2025], period_weights=[5, 5].
Each period has the same 3 timesteps with per-period cost = 30 €. The objective becomes:
The optimizer finds the \(P_{f,t(,p)}\) values that minimize the (period-weighted) \(\Phi_{k^*}\) subject to all constraints.