Breakthrough-Energy / SwitchWrapper

Wrapper for Switch
MIT License
1 stars 2 forks source link

Ensure that multiple investment years are interpreted properly in inputs/outputs #115

Open danielolsen opened 3 years ago

danielolsen commented 3 years ago

Currently, when interpreting the values of build decision variables, we are assuming that they are cumulative. I.e., if investment years are x and y where x < y, then new_capacity(x) <= new_capacity(y). Therefore, for each investment year, we can create a grid representing the capacities in that year as existing_capacity + new_capacity(x) or existing_capacity + new_capacity(y). See #97, #104 for more context.

However, if investments are not cumulative, then there is no relationship new_capacity(x) <= new_capacity(y) and the grid capacities in each investment year need to be interpreted instead as existing_capacity + sum(i <= x, new_capacity(i).

The primary thing I think needs to be checked is the interpretation of the outputs, but during testing of this functionality we may find that there is additional work needed for the inputs as well, particularly relating to the timepoints parameter of switchwrapper.prepare.prepare_inputs and the information provided by the user in the switchwrapper.grid_to_switch.get_inv_periods function.

YifanLi86 commented 3 years ago

@danielolsen Good catch. From the manual and codes it looks very unlikely to be cumulative, and need to be interpreted as existing_capacity + sum(i <= x, new_capacity(i).

"BuildGen[g,p] Amount of capacity built (added) in project g in period p;" "BuildTx[l,p] Transfer capability added in corridor l during period p (MW);"

I have not done any multi-year test to verify, but definitely need to.