Page 1 of 1

3 question about documentation code

Posted: Fri Jun 21, 2019 8:23 am
by Lucas
Hi,

in GAMS documentation > Examples > benders_2stage_mt.py>
https://www.gams.com/latest/docs/apis/ ... f2b87ea54


1- what are .py file?
2- How can I use def function? (e.g. How to use scen_solve ?)
3- is it possible to have own function in a GAMS code? in other words , is it possible to use def command in our codes?

thanks

Re: 3 question about documentation code

Posted: Sun Jun 23, 2019 7:52 pm
by Renger
Hi
The extension "py" stands for a script in Python (see the documentation on using Python in Gams code).
You can use macros, but they are not as powerful as using python code.
Cheers
Renger

Re: 3 question about documentation code

Posted: Thu Jun 27, 2019 12:27 pm
by Lucas
Thanks!