Hi everyone,
I’m trying to conditionalize the following constraint:
INVE.UP("windOn","FRA")$(card(r)<=2) =50;
“Allow investment in France of up to 50 GW, if the number of regions is set to 2 or more”
r is a set defined in the set up of the model:
$IFi %REGIONS%=='2R' $set r FRA,GER
Unfortunately I keep getting the error 170: Domain violation for element, when running the model with only one region
$IFi %REGIONS%=='1R' $set r GER
3243 INVE.UP("windOn","FRA")$(card(r)<=2) =50;
**** $170
**** LINE 21 INCLUDE C:\Users\Leo\Desktop\Model Test - Endogenous Allocation - 06172019 1006 incl. countries incl. agg share - WIP\scen\y_windshare.gms
**** LINE 2541 INPUT C:\Users\Leo\Desktop\Model Test - Endogenous Allocation - 06172019 1006 incl. countries incl. agg share - WIP\EMMA.gms
**** 170 Domain violation for element
Why do I get this error? How can I avoid it?
Best,
Leo