Open adrienmellot opened 1 year ago
Good catch @adrienmellot. Ideally we have a MWE based on the example models to work on a fix for this, but there is a workaround so it isn't high-priority to fix.
Workaround is to set the maximum technology capacities ("energy_cap_equals" / "resource_area_equals") to zero in your override, rather than removing the technology existence. It's less pretty, but gurobi will clean out those variables in pre-processing so shouldn't add much, if any optimisation overhead.
Problem description
For scenario creation I remove some technologies from locations using the
.exists: false
override. This works well, except when I try to remove techs which compete for resource_area (wind_onshore_competing and open_field_pv from euro-calliope in this case). For some reason, if I don’t remove the techs from ALL the locations in the model but only some of them, running the model returns the following error:I’ve tried different set ups and it works fine when I remove the technologies in question from either all locations or none at all, so the problem is really coming from setting the .exists:false to some locations. Also, the problem doesn’t arise for technologies which don’t compete for resource_area, I can set .exists: false for selected locations without any issue.
Full error log:
Steps to reproduce the problem
The model above has locations
AG,AI_AR,BE,BL_BS,FR,GE,GL,GR,JU,LU,NE,NW_OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH
as well as 4 more locations (from which I do not remove the technologieswind_onshore_competing
andopen_field_pv
using the override.exists: false
).Calliope version
v0.6.10