Using def to define function in Embedded Python
Posted: Fri Nov 08, 2019 7:57 am
Hello, GAMS experts
Recently, I am studying 'embeddedCode Python:' at GAMS model. is it possible to use 'def' to define new function at Embedded Python?
Thank you so much in advance!
Recently, I am studying 'embeddedCode Python:' at GAMS model. is it possible to use 'def' to define new function at Embedded Python?
Code: Select all
GAMS Code
embeddedCode Python:
def my_function(x, y):
return x+y
my_function
endEmbeddedCode
GAMS Code