UpdateAction.Primal/Dual in GamsModifier not available

Questions on using the GAMS APIs (Python, .NET, etc.)
Post Reply
Ilya
User
User
Posts: 8
Joined: 5 years ago

UpdateAction.Primal/Dual in GamsModifier not available

Post by Ilya »

I'm attempting to instantiate a ModelInstance of a GAMS model in Python, and intend to use some GamsModifiers to set the levels of some model variables.
Now, when I'm instantiating with GamsModifier(x, UpdateAction.Primal, x_ini), the following error appears:

File "D:\dummy.py", line 255, in <module>
GamsModifier(x, UpdateAction.Primal, x_ini), GamsModifier(y, UpdateAction.Primal, y_ini), GamsModifier(z, UpdateAction.Primal, z_ini)], opt_ma)
File "gams\execution.py", line 99, in gams.execution.GamsModifier.__init__ (execution.c:2518)
AttributeError: type object 'UpdateAction' has no attribute 'PRIMAL'

as if it were not possible to set variable levels in this way.. But UpdateAction.Fixed/Upper/Lower works fine.

Used GAMS version is 25.1.1, used Python is version 3.4 (gams package installed for this Python).

Is it also possible to set variable levels for a GAMS model in Python code in some other way?
Post Reply