Search found 19 matches

by silence
2 years ago
Forum: Solvers
Topic: The first three months of the model were run, and the last nine months were skipped
Replies: 2
Views: 4535

Re: The first three months of the model were run, and the last nine months were skipped

Hi,
Thanks.
I tried something else to solve the problem, but they still didn't work.
Here is my code and data.
Best wishes!
by silence
2 years ago
Forum: Solvers
Topic: The first three months of the model were run, and the last nine months were skipped
Replies: 2
Views: 4535

The first three months of the model were run, and the last nine months were skipped

Hi everyone, I am using GAMS to do a water resource allocation problem. There are two reservoirs (R1 and R2) to supply water to two water users (U1 and U2). The water supply cost of reservoir A is lower than that of reservoir B, but reservoir A needs to recharge by diversion, the cost of which is hi...
by silence
3 years ago
Forum: API
Topic: GamsModifier don't work
Replies: 5
Views: 6935

Re: GamsModifier don't work

There are many good reasons to work with up-to-date software. You should consider to work with an up-to-date version of GAMS. The GMSPython of GAMS 25 probably did not come with pandas. There can be many different reasons why you get different objective functions (did you set optcr to 0?). I think ...
by silence
3 years ago
Forum: API
Topic: GamsModifier don't work
Replies: 5
Views: 6935

Re: GamsModifier don't work

Hi, I had to adjust your path string not only to match my directory structure but also added the r for raw string (data_dir = r"D:\Users\mbussieck\Downloads\随机生成序列2/"). I could run the Python script okay. I don't know whay goes wrong. before the first solve, the update database contains a...
by silence
3 years ago
Forum: API
Topic: GamsModifier don't work
Replies: 5
Views: 6935

GamsModifier don't work

Hi, I try to use a GamsModelInstance to optimize multiple times with two parameters changing.The one parameter is two-dimensional, and the other one is one-dimensional.I have followed the TUTORIAL to creat a GamsModelInstance ,but something went wrong. It did optimize multiple times with original pa...
by silence
3 years ago
Forum: API
Topic: unhashable type: 'GamsSetRecord'
Replies: 2
Views: 6850

Re: unhashable type: 'GamsSetRecord'

Hi, Clemens

Thank you for your answer, actually I want to use dictionary qta with GamsSetRecords instead of value. Maybe I did not understand the example, and did it wrong.May I know how to updata the multidimensional parameters ?

Thank you very much
by silence
3 years ago
Forum: API
Topic: unhashable type: 'GamsSetRecord'
Replies: 2
Views: 6850

unhashable type: 'GamsSetRecord'

Hi everyone, I want use modelinstance to multiple optimize with a two-dimensional parameter and a one-dimensional parameters in python. When I try to follow the example transport7.py to updata the two-dimensional parameter,it comes the error:TypeError: unhashable type: 'GamsSetRecord'. I have alread...
by silence
3 years ago
Forum: API
Topic: error 796 in python api
Replies: 1
Views: 5074

error 796 in python api

Hello everybody, I want to instantiate a MIP model with modifiers in the objective function. Follow the example transport7.py to GamsModifier a parameter im my model ,but encountered an error 796. The code and error list are uploaded. When directly called the code, it ran normally. I don't know wher...
by silence
4 years ago
Forum: Syntax
Topic: Error 149 uncontrolled set entered as constant
Replies: 1
Views: 2281

Error 149 uncontrolled set entered as constant

Hi,I want to build a model of Optimizing valve control,one of equations is to promise that the continuous opening time is equal to emptying time at least。But I meet error 149,please help me how to correct it? Thanks sets i detention reservoir /Jinlong,Chiao,Shijing,Shangyang/ t time /0*23/ ; Paramet...