Search found 1038 matches

by bussieck
1 year ago
Forum: API
Topic: Python API trigger to solve problem from a file
Replies: 4
Views: 7090

Re: Python API trigger to solve problem from a file

What about the Don't do the "ws.gamslib('trnsport')" ? You should understand what the methods do. That's why there is documentation: https://www.gams.com/latest/docs/apis/python/classgams_1_1workspace_1_1GamsWorkspace.html#a894a7073a0c32ff4f87a45c2c34e92c4. The gamslib retrieves a model fr...
by bussieck
1 year ago
Forum: API
Topic: No module named 'gamstransfer'
Replies: 4
Views: 4467

Re: No module named 'gamstransfer'

What GAMS version do you have installed? GAMS Transfer Python was introduced with GAMS 37. -Michael
by bussieck
1 year ago
Forum: Archive Google Group
Topic: Getting Real Number Expected Error
Replies: 4
Views: 7042

Re: Getting Real Number Expected Error

Understand the difference between GAMS compilation and execution, see https://www.gams.com/latest/docs/UG_GamsCall.html#UG_GamsCall_TwoPass. The data of a table statement is compiled before GAMS executes EDD = ED('2050')/30; So what you try to do makes no sense in a GAMS context. You can assign (exe...
by bussieck
1 year ago
Forum: API
Topic: Java API - Model results uncorrect after first solve of Modelinstance
Replies: 5
Views: 4341

Re: Java API - Model results uncorrect after first solve of Modelinstance

You can also "export" the model instance by using the Convert solver. This produces a gams.gms file with the model that gets actually solved. Compare the second model instance with the file that is produces when you start the sequence with the second model instance. They should (with the e...
by bussieck
1 year ago
Forum: API
Topic: Java API - Model results uncorrect after first solve of Modelinstance
Replies: 5
Views: 4341

Re: Java API - Model results uncorrect after first solve of Modelinstance

No, not really. It's just that you get an initial solution. Should not make a difference on the optimal solution. What's your optimality tolerance (optCR). In older versions of GAMS this was at 0.1 by default. Nowadays, it is 1e-6. If you are running an older version perhaps this is the problem. -Mi...
by bussieck
1 year ago
Forum: API
Topic: Java API - Model results uncorrect after first solve of Modelinstance
Replies: 5
Views: 4341

Re: Java API - Model results uncorrect after first solve of Modelinstance

Hard to say. Can you produce a self-contained example that lets us reproduce your findings. If you are a paying customer, you can also contact support@gams.com.

-Michael
by bussieck
1 year ago
Forum: Syntax
Topic: Symbols
Replies: 2
Views: 1213

Re: Symbols

I suggest that you study the tutorials (https://www.gams.com/latest/docs/UG_MAI ... l_Examples) in the GAMS documentation. Then things will become clearer. -Michael
by bussieck
1 year ago
Forum: Modeling
Topic: Confusing model
Replies: 3
Views: 938

Re: Confusing model

Please use the code block when you paste formatted model code. You can combine the data for i,j in a single table as I did and either produce named parameters from that data (example objective and demand) or use the combined table with a new header index directly in the equations, that's a matter of...
by bussieck
1 year ago
Forum: API
Topic: Python API trigger to solve problem from a file
Replies: 4
Views: 7090

Re: Python API trigger to solve problem from a file

The very first example (https://www.gams.com/latest/docs/apis/examples_python/transport1_8py_source.html) should do most of this. You need to add the working_directory=r'C:\My_problem' argument to the GamsWorkspace constructor. Don't do the "ws.gamslib('trnsport')" and point to your GAMS m...
by bussieck
1 year ago
Forum: Modeling
Topic: Confusing model
Replies: 3
Views: 938

Re: Confusing model

What's confusing? Share what you have done so far and where you got stuck. Do you expect someone from the forum doing your homework?

-Michael