Problem
compute_effect_contributions() in contributions.py does not correctly handle:
-
Investment costs (effect_once domain): CAPEX from Investment.effects_per_size and Investment.effects_fixed are charged in the effect_once domain, but contributions only tracks temporal and periodic — it has no once domain.
-
Period dimension: When multi-period optimization is used, contributions should decompose per-period. Currently periodic contributions have no period dimension, and total validation fails because solver effect--total has a period dim while computed total does not.
-
Investment recurring costs: invest_effects_per_size_periodic and invest_effects_fixed_periodic are not accounted for in the periodic contribution computation.
Impact
Tests using optimize->save->reload->validate pipeline xfail when investment costs are present, because the contribution validation check computed == solver_total fails.
Expected behavior
compute_effect_contributions() should return contributions split by effect domain (temporal, periodic, once) with a period dimension when multi-period is active, and include investment cost contributions.
Related
Part of multi-period investment (#27).
Problem
compute_effect_contributions()incontributions.pydoes not correctly handle:Investment costs (effect_once domain): CAPEX from
Investment.effects_per_sizeandInvestment.effects_fixedare charged in theeffect_oncedomain, but contributions only trackstemporalandperiodic— it has nooncedomain.Period dimension: When multi-period optimization is used, contributions should decompose per-period. Currently
periodiccontributions have no period dimension, andtotalvalidation fails because solvereffect--totalhas a period dim while computed total does not.Investment recurring costs:
invest_effects_per_size_periodicandinvest_effects_fixed_periodicare not accounted for in the periodic contribution computation.Impact
Tests using
optimize->save->reload->validatepipeline xfail when investment costs are present, because the contribution validation checkcomputed == solver_totalfails.Expected behavior
compute_effect_contributions()should return contributions split by effect domain (temporal,periodic,once) with aperioddimension when multi-period is active, and include investment cost contributions.Related
Part of multi-period investment (#27).