--
You received this message because you are subscribed to the Google Groups "Switch Model" group.
To unsubscribe from this group and stop receiving emails from it, send an email to switch-model...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/switch-model/4fc18ec9-6074-4049-8f27-c903727347b5n%40googlegroups.com.
The standard switch-china-open-model specifies a gen_min_build_capacity in gen_info.csv for many of the generation projects. When this is greater than zero, Switch adds binary variables to the model to indicate whether capacity is added or not in each period, and then adds a constraint to force at least the minimum amount of capacity to be added, if any is added at all.
This sounds like a good idea, but isn’t really needed in large power systems like this one, because the solver will usually add more than the minimum amount anyway. Also, in large systems, even if the solution adds slices of generation capacity that are too small, you could round up or down to an appropriate amount afterward and it wouldn’t have affect the results much.
However, when there are binary or integer variables like this in the model, the solver has to run in integer mode, which is much slower than continuous mode (used for models without any binary or integer variables).
So I would recommend deleting the gen_min_build_capacity column from gen_info.csv or setting all the values to “0” or “.”. Then the model should solve much faster.
I’ve also noticed that the switch-china-open-model doesn’t specify the amount of storage capacity (MWh) for battery and pumped hydro storage projects. Old versions of Switch (2.0.7 and earlier) didn’t mind this, but ended up optimizing the amount of MWh of storage. Since this model doesn’t show a separate cost for MWh vs. MW (gen_storage_energy_overnight_cost in gen_build_costs.csv), Switch could decide to add unlimited MWh of storage to each project, including pre-existing ones, with no apparent cost.
Newer versions of Switch (2.0.8 and later) require that you specify the number of MWh of storage for existing projects, and this is also good practice for new-build projects. The simplest way to do this is to set a value for gen_storage_energy_to_power_ratio in gen_info.csv. I would recommend setting it to something like 12 or 24 hours for the pumped hydro projects (gen_storage_efficiency != “.” and gen_energy_source = “Water”) and 4 hours for battery projects (gen_storage_efficiency != “.” and gen_energy_source = “Storage”).
(Another option is to set MWh values for build_gen_energy_predetermined in gen_build_predetermined.csv, which should be equal to (# of hours of storage) * gen_build_gen_predetermined. But this won’t fix the problem of new-build storage getting unlimited number of MWh for free.)
With the two changes noted above, I got the switch-china-open-model to solve in about 30 minutes with CPLEX 22.1.1.0 (--solver cplex --solver-options-string "lpmethod=4"). I’m not sure how long it would take without those changes, but it would be a lot longer.
Matthias
.
To view this discussion visit https://groups.google.com/d/msgid/switch-model/CAKZYYuPHpnkQooh%2Bh1cN6rwkzTbC4zFcawupx6JH7-_8XpNtaA%40mail.gmail.com.