Search found 214 matches

by dirkse
1 year ago
Forum: Modeling
Topic: Equality constraint not enforced
Replies: 4
Views: 5530

Re: Equality constraint not enforced

Zack, You haven't sent the .log or .lst files from your run, so I can only guess what happened. The output you send is consistent with an infeasible model. If your model is infeasible, the solver will stop short of computing a solution, and this will be evident in the .log and .lst files. You might ...
by dirkse
1 year ago
Forum: Syntax
Topic: Optimize reservoir hedging rules
Replies: 9
Views: 5478

Re: Optimize reservoir hedging rules

Silence, When I run your model with GAMS 39.2, I get this message in the log: CPLEX Error 5002: 'B_YNHpad3' is not convex. Looking at your GAMS source, I see equation B_YNHpad3: B_YNHpad3.. beg_S('Res_YNH')=l= Rule('1','YNH_pad')*Yp1('1')+Vupper('1','Res_YNH')*Yp2('1'); The multiplication of variabl...
by dirkse
1 year ago
Forum: Syntax
Topic: Syntax for Sorting the Sets
Replies: 1
Views: 2141

Re: Syntax for Sorting the Sets

Arvind, You cannot store the same set in two different orders in GAMS. Read more about that here: https://www.gams.com/39/docs/UG_OrderedSets.html#UG_OrderedSets_OrderedAndUnorderedSets But you can access the set elements out of order. Here's an old thread on this topic: https://forum.gamsworld.org/...
by dirkse
1 year ago
Forum: Syntax
Topic: Error on write of file = 'Z:\ABC.lst': Invalid argument
Replies: 2
Views: 2027

Re: Error on write of file = 'Z:\ABC.lst': Invalid argument

Can you say a little more about your Z: drive? If that's some sort of network share (OneDrive, Google Drive, etc.) that may explain the problem. Network drives look and feel like normal drives from a distance, but if they are used intensively, their weak spots are exposed. I suggest you try running ...
by dirkse
2 years ago
Forum: Modeling
Topic: Stackelberg non linear problem
Replies: 2
Views: 2448

Re: Stackelberg non linear problem

Oskar, It's important to consider exactly how you plan to represent each agent when choosing a model type.  Terms like "Stackelberg" don't do this fully.  For example, some people often describe the case of two players - each characterized or represented by an optimization problem - as a S...
by dirkse
2 years ago
Forum: Modeling
Topic: 'Misbehaving' follower in bi-level optimization model
Replies: 6
Views: 8007

Re: 'Misbehaving' follower in bi-level optimization model

Hi, I believe forum users would be more able and willing to help you if you followed the forum rules: https://forum.gamsworld.org/app.php/rules A few observations on your model spring to mind: 1. If you have issues with infeasibility, first try to relax all the integrality constraints and see if tha...
by dirkse
2 years ago
Forum: Syntax
Topic: Parameter Syntax with "#" sign and 3 Dimensions
Replies: 3
Views: 2070

Re: Parameter Syntax with "#" sign and 3 Dimensions

Hi, The syntax #<setname> just puts the elements of the specified set into the input at that point. Since you want a 3-D set, you need a 3-tuple to initialize set elements. You can do it like this: Sets scen "scenarios" / s1*s3 / wo "worlds" / w1*w4 /; Parameter s2(scen,*) "...
by dirkse
2 years ago
Forum: Solvers
Topic: MPSGE
Replies: 5
Views: 3695

Re: MPSGE

Zhanna, This is a strange error, and it's more difficult for you to engage with because it's happening inside the mpsgeset sysinclude file in the GAMS sysdir. I am attaching a hacked-up version of mpsgeset that will help figure this out. Please do: 1. Copy the attached next to the original mpsgeset ...
by dirkse
2 years ago
Forum: Solvers
Topic: Changing tolerence
Replies: 6
Views: 3944

Re: Changing tolerence

Hello, Have you verified that the solver completed successfully? If the solver terminates prior to finding a solution (say, because of a time limit or iteration limit, or because it declares the model infeasible) then the level values returned by the solver for binary variables might not be close to...
by dirkse
2 years ago
Forum: Solvers
Topic: Error 148, even on the objective function
Replies: 2
Views: 2766

Re: Error 148, even on the objective function

Ebru, I notice you are using xls2gms. This is not the recommended way to read spreadsheet data into GAMS. In the docs at https://www.gams.com/latest/docs/T_XLS2GMS.html you will see this statement: The Windows GAMS distribution contains several tools to exchange data with MS-Excel: GDX2XLS, GDXXRW, ...