3 question about documentation code Topic is solved

questions about GAMS' tools
Post Reply
Lucas
User
User
Posts: 20
Joined: 6 months ago

3 question about documentation code

Post by Lucas » 5 months ago

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

User avatar
Renger
Posts: 406
Joined: 3 years ago

Re: 3 question about documentation code

Post by Renger » 5 months ago

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
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist

Lucas
User
User
Posts: 20
Joined: 6 months ago

Re: 3 question about documentation code

Post by Lucas » 4 months ago

Thanks!

Post Reply