calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
277 stars 89 forks source link

`purchased` binary variable isn't linked to `energy_cap` if `energy_cap_max`/`_min`/`_equals` isn't defined #565

Open brynpickering opened 4 months ago

brynpickering commented 4 months ago

What happened?

If the purchase cost is defined but some limit on energy_cap isn't defined, then there is no constraint to link purchase with energy_cap. This means that you get zeroes across the board for purchase even when technologies that are using this binary decision variable have a non-zero energy_cap.

The straightforward workaround is to set energy_cap_max to some value that is akin to bigM: large enough not to impact model results but small enough not to cause numerical trouble.

Which operating systems have you used?

Version

v0.6.10

Relevant log output

No response