Skip to content

Commit

Permalink
abort statement if intake_detail_scen_target is negative
Browse files Browse the repository at this point in the history
  • Loading branch information
FelicitasBeier committed Jan 18, 2024
1 parent 9195bcc commit 400eb2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/15_food/anthro_iso_jun22/exodietmacro.gms
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,10 @@ elseif s15_exo_diet = 3,
(i15_intake_scen_target(t,iso) - sum(EAT_nonstaples, i15_intake_detailed_scen_target(t,iso,EAT_nonstaples)))
* (p15_intake_detail(t,iso,EAT_staples) / sum(EAT_staples2, p15_intake_detail(t,iso,EAT_staples2)));

if (i15_intake_detailed_scen_target(t,iso,EAT_staples) < 0, abort "The parameter i15_intake_detailed_scen_target became negative after calorie balancing.", i15_intake_detailed_scen_target(t,iso,EAT_staples););
* JAN: Is there if(any(x)) in GAMS? Or does this above check for each individual and therefore is a if any?
if (smin((iso,EAT_staples), i15_intake_detailed_scen_target(t,iso,EAT_staples)) < 0,
abort "The parameter i15_intake_detailed_scen_target became negative after calorie balancing.";
);


);
*** End of MAgPIE-specific realization of the EAT Lancet diet
Expand Down

0 comments on commit 400eb2d

Please sign in to comment.