Page 1 of 1

Assign set index the values of a parameter

Posted: Thu Apr 26, 2018 6:20 pm
by Luca
Dear all,

I am new in the forum. I am using GAMS to model and solve a MIP. After the solve statement I would like to plot a function. I use the LIBINCLUDE Interface to Create Excel Charts from GAMS developed by T.F. Rutherford, see http://www.mpsge.org/xlchart/index.html. In order to plot the function I need to specify a domain which has to be a set index. Now, I need to assign to the set index the value of a parameter already defined. Is it possible? There are any idea you can suggest me?

Thanks in advance for all your effort.
Luca

Re: Assign set index the values of a parameter

Posted: Fri Apr 27, 2018 9:47 am
by bussieck
Luca,

I never worked with this package, so I can't answer your questions.

Nevertheless, nowadays I like to create my plots via Python's matplotlib and GAMS embedded code (see https://www.gams.com/latest/docs/UG_EmbeddedCode.html). You do need an up-to-date GAMS system and need to install the Python packages matplotlib and pandas (at least for the attached example). For that you open a cmd prompt cd into c:\gams\win64\25.1\GMSPython\scripts and run "pip install matplotlib pandas". Next you run the attached pickstock model and you will find some png files in your current directory:
weight.png
price.png
index.png
errors.png
-Michael