Just realized I've introduced a bug in the lk/mbc_iec_refactor branch. I failed to recognize the distinction between is_time_variant and is_time_variant_term. Example: if x::TimeSeriesIncrementalCurve has x.initial_input = nothing, then:
is_time_variant(x) = true: it's a time-varying curve object.
is_time_variant_term(x, OnVariable) = false: the field of x that becomes the coefficient of OnVariable (the initial input field) is not time varying.
edit: they're both for deciding whether to add terms to the variant or invariant objective function terms. is_time_variant_term is used in proportional_cost alone. Other places (like add_variable_cost_to_objective!) use is_time_variant.
Just realized I've introduced a bug in the
lk/mbc_iec_refactorbranch. I failed to recognize the distinction betweenis_time_variantandis_time_variant_term. Example: ifx::TimeSeriesIncrementalCurvehasx.initial_input = nothing, then:is_time_variant(x) = true: it's a time-varying curve object.is_time_variant_term(x, OnVariable) = false: the field ofxthat becomes the coefficient ofOnVariable(the initial input field) is not time varying.edit: they're both for deciding whether to add terms to the variant or invariant objective function terms.
is_time_variant_termis used inproportional_costalone. Other places (likeadd_variable_cost_to_objective!) useis_time_variant.