Error 494: Load types are different

Problems with syntax of GAMS
Post Reply
Abhi140
User
User
Posts: 29
Joined: 3 years ago

Error 494: Load types are different

Post 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
Abhi140
User
User
Posts: 29
Joined: 3 years ago

Re: Error 494: Load types are different

Post 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?
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Error 494: Load types are different

Post 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
Abhi140
User
User
Posts: 29
Joined: 3 years ago

Re: Error 494: Load types are different

Post by Abhi140 »

Dear Bussieck,

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