Hello,
I am currently creating an optimization model that maximizes entropy with respect to a varying population. I’ll be doing a lot of scenarios and was wondering if there is a way to make GAMS stop at an infeasible solution while in the loop.
I noticed there are some answers about this with modelstat, but I don’t fully understand the syntax of that. Can someone please help? Thank you!
$offorder
Model selfsufficiency /all/ ;
file results /results_entropy.res/ ;
put results ;
loop(Pop,
varying_population = (ord(Pop))*130000 ;
Solve selfsufficiency using NLP maximize TotalEntropy ;
put @5, varying_population, @15, TotalEntropy.l/;
);
putclose results;