Page 1 of 1

Error 494: Load types are different

Posted: Sat Nov 27, 2021 4:30 am
by Abhi140
Hi Everyone,

I am getting an error 'error 494: Load types are different'. Can anyone please help with this?

Background: I am calling 2 gdx files. One file has a set e.g. set i & a few parameters defined over that set i. 2nd gdx file has few other parameters defined over set i. Please note that set i isn't defined in 2nd gdx file and that's where I guess the problem lies. What could be the best way to take data from multiple gdx files?

Best Regards,
Abhimanyu

Re: Error 494: Load types are different

Posted: Sat Nov 27, 2021 6:33 am
by Abhi140
I was just thinking more about it. The values stored in 2nd gdx files are results/output from a GAMS program. The results stored in gdx files are the level values e.g. u1.l where u1 is a variable defined over set i in that gams program. However, in another gams program where I am calling both gdx files, there u1 is defined as a parameter over set i whose values should be u1.l from this gdx file.

In reference to 'Error 494: Load types are different', is it this error related to TYPE (variable in one program & parameter in another gams program)? if it's so then how can we call variable values (Level values) after running one gams program in another program as a parameter?

Re: Error 494: Load types are different

Posted: Mon Nov 29, 2021 10:01 am
by bussieck
You can load a the level of a variable x (in GDX) into a parameter x (in your program) with $load p=p.l

-Michael

Re: Error 494: Load types are different

Posted: Wed Dec 01, 2021 6:16 am
by Abhi140
Dear Bussieck,

Thank you very much for your reply. It solves the problem.