How to check infeasible results in gdx file?

Problems with syntax of GAMS
Post Reply
leewing159
User
User
Posts: 15
Joined: 4 years ago

How to check infeasible results in gdx file?

Post by leewing159 »

Hi,

I'm running my model multiple times using a loop statement,
and I would like to check that model has infeasible or not.

For example,
there is a code like: loop(day, codes; ); but some of the days are infeasible. (already checked using process log)

Is there any way that I can check infeasible "days" not in process log but using gdx file?
It would be a big help if I can notice infeasible days at a glance.

Jake.
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: How to check infeasible results in gdx file?

Post by bussieck »

Sure, the model attribute "modStat" (https://www.gams.com/latest/docs/UG_Gam ... Omodelstat) gives you programmatic access to the model status. You can save the model status in a parameter: "mstat(day) = mymodel.modstat;" and save this to GDX. Be aware that there are multiple "infeasible" model status values, 4, 10, 19.

-Michael
leewing159
User
User
Posts: 15
Joined: 4 years ago

Re: How to check infeasible results in gdx file?

Post by leewing159 »

There are tons of functions that I need to know...
Thanks, Michael!

Jake
Post Reply