Search found 464 matches

by bussieck
2 weeks ago
Forum: Solvers
Topic: Add private solver license in GAMS
Replies: 3
Views: 401

Re: Add private solver license in GAMS

If you don't want to use the professional GAMS/Gurobi and GAMS/Xpress link components, you can also use the "free" OsiGurobi and OsiXpress GAMS links (see https://www.gams.com/latest/docs/S_OSI.html ). You don't need the Xpress or Gurobi software installed. GAMS comes with all the required software,...
by bussieck
2 weeks ago
Forum: Modeling
Topic: Variables Problem
Replies: 3
Views: 268

Re: Variables Problem

In your particular case the answer seems even simpler: Just just multiply by the divisor, e.g. k2.. d('2','4') =L= 5 * ( g('2') + g('1') ); and end up with an LP rather than an non-convex NLP?

-Michael
by bussieck
2 weeks ago
Forum: Syntax
Topic: Creating a Subset
Replies: 5
Views: 388

Re: Creating a Subset

I suggest that you use the code display feature when pasting GAMS model source (or use the attachment facility). If you paste it as you did e.g. alignments of tables disappear and one has trouble compiling.

You can just add "Resul.nw=18 ;" to turn your numbers into fixed format.

-Michael
by bussieck
2 weeks ago
Forum: Modeling
Topic: piecewise linearization
Replies: 2
Views: 263

Re: piecewise linearization

I guess feasOpt trumps iis. Just leave feasOpt out of the option file. If your model is "just" quadratic, convince yourself that you can't formulate in a convex way. Moreover, if you have the quadratic terms only in the objective, you can change the "optimalityTarget" (see https://www.gams.com/lates...
by bussieck
2 weeks ago
Forum: Modeling
Topic: a scenario run yields different results when run singly and in a loop of others
Replies: 2
Views: 214

Re: a scenario run yields different results when run singly and in a loop of others

Your runs start from different starting points. In the first case scenarios 2 starts from the manually set starting point while in the second case case it starts from the optimal solution of scenario 1. For NLP (and sometimes for LP) this is a big difference.

-Michael
by bussieck
3 weeks ago
Forum: Modeling
Topic: Time Execution in GAMS
Replies: 2
Views: 221

Re: Time Execution in GAMS

I don't think there is a "standard". Often paper compare time to solve a model instance. Here the time spend by the solver is the important (modelname.resusd). If the paper is about implementing a more sophisticated algorithm (e.g. decomposition scheme) then the GAMS time should also play a role. In...
by bussieck
3 weeks ago
Forum: Syntax
Topic: Running a gams model N times for a random subset of the initial set
Replies: 2
Views: 217

Re: Running a gams model N times for a random subset of the initial set

The following code should help you: SETS i /1*100/ j 'outputs and inputs' /y, x1, x2/ outp(j) /y/ inp(j) /x1,x2/; Parameter data(i,j); data(i,j) = uniform(0,1); variable obj,x1,x2,dp(i),dn(i); positive variable dp,dn; equation e(i), defobj; set ii(i); e(ii).. data(ii,'y') =e= x1*data(ii,'x1') + x2*d...
by bussieck
3 weeks ago
Forum: Syntax
Topic: Delete files during execution not in compile phase
Replies: 4
Views: 255

Re: Delete files during execution not in compile phase

Don't worry about the recompile. The BCH programs executed by the solver are always recompiled. This goes super fast. You need to prepare the data from the cuts so you need a cut index. This needs some kind finite number. You made it 10000 but you can increase this but it needs to be defined. Don't...
by bussieck
3 weeks ago
Forum: Modeling
Topic: MIP equation for "lower equal", "greater equal", "lower then" and "greater then"
Replies: 1
Views: 142

Re: MIP equation for "lower equal", "greater equal", "lower then" and "greater then"

This is a classic example for piece-wise linear functions. There are many ways to formulate this, see e.g. https://www.gams.com/latest/gamslib_ml/ ... nspwl.html. If your c is bounded, then I would go for the binary formulation (trnsdiscB).

Have fun.

-Michael
by bussieck
3 weeks ago
Forum: Modeling
Topic: Different GAMS versions giving very different answers+ weird behavior
Replies: 1
Views: 144

Re: Different GAMS versions giving very different answers+ weird behavior

24.9 and 25.1 use different versions of Cplex (12.7.1. versus 12.8.0.0). Perhaps a bug was fixed that relates to this behavior. You might want to explore the Cplex' fix list at https://www.ibm.com/support/pages/ilog- ... o-fix-list

-Michael