Summary
Investment effect fields (effects_per_size, effects_fixed, effects_per_size_periodic, effects_fixed_periodic) currently support an optional period dimension (added in #94). Per the design decision in #88 and the target in #92, they should also support a build_period axis to enable period-dependent construction costs.
Target dimensions
| Field |
Current |
Target |
Investment.effects_per_size |
(invest_flow, effect, period?) |
(invest_flow, effect, period?, build_period?) |
Investment.effects_fixed |
(invest_flow, effect, period?) |
(invest_flow, effect, period?, build_period?) |
Investment.effects_per_size_periodic |
(invest_flow, effect, period?) |
(invest_flow, effect, period?, build_period?) |
Investment.effects_fixed_periodic |
(invest_flow, effect, period?) |
(invest_flow, effect, period?, build_period?) |
Construction rule (from design decision)
- Scalar → constant across all periods → diagonal
- 1D
(build_period,) → diagonal (cost charged in the period when built)
- 2D
(period, build_period) → as-is (construction spread, learning curves, decommissioning costs)
Diagonal means: effects[p, bp] = value[bp] only where p == bp.
Scope
model_data.py: _InvestmentArrays.build must accept and expand build_period-indexed inputs via the diagonal rule
model.py: consumption multiplies invest_size_at_build[flow, build_period] by the 2D effect matrix and sums over build_period
elements.py: type hints already accept TimeSeries (which includes xr.DataArray), so no change needed
- Tests: add cases for scalar, 1D
(build_period,), and 2D (period, build_period) inputs
Context
Separated from #92 (period-aware effects) and #94 (implementation). The _EffectTemplate helper introduced in #95 can be extended to support this.
Summary
Investment effect fields (
effects_per_size,effects_fixed,effects_per_size_periodic,effects_fixed_periodic) currently support an optionalperioddimension (added in #94). Per the design decision in #88 and the target in #92, they should also support abuild_periodaxis to enable period-dependent construction costs.Target dimensions
Investment.effects_per_size(invest_flow, effect, period?)(invest_flow, effect, period?, build_period?)Investment.effects_fixed(invest_flow, effect, period?)(invest_flow, effect, period?, build_period?)Investment.effects_per_size_periodic(invest_flow, effect, period?)(invest_flow, effect, period?, build_period?)Investment.effects_fixed_periodic(invest_flow, effect, period?)(invest_flow, effect, period?, build_period?)Construction rule (from design decision)
(build_period,)→ diagonal (cost charged in the period when built)(period, build_period)→ as-is (construction spread, learning curves, decommissioning costs)Diagonal means:
effects[p, bp] = value[bp]only wherep == bp.Scope
model_data.py:_InvestmentArrays.buildmust accept and expandbuild_period-indexed inputs via the diagonal rulemodel.py: consumption multipliesinvest_size_at_build[flow, build_period]by the 2D effect matrix and sums overbuild_periodelements.py: type hints already acceptTimeSeries(which includesxr.DataArray), so no change needed(build_period,), and 2D(period, build_period)inputsContext
Separated from #92 (period-aware effects) and #94 (implementation). The
_EffectTemplatehelper introduced in #95 can be extended to support this.