Search found 1042 matches

by bussieck
4 years ago
Forum: Syntax
Topic: Creating a Subset
Replies: 5
Views: 39762

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
4 years ago
Forum: Modeling
Topic: piecewise linearization
Replies: 0
Views: 1824

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:...
by bussieck
4 years ago
Forum: Modeling
Topic: a scenario run yields different results when run singly and in a loop of others
Replies: 2
Views: 30959

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
4 years ago
Forum: Modeling
Topic: Time Execution in GAMS
Replies: 2
Views: 2510

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 ...
by bussieck
4 years ago
Forum: Syntax
Topic: Running a gams model N times for a random subset of the initial set
Replies: 2
Views: 2849

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
4 years ago
Forum: Syntax
Topic: Delete files during execution not in compile phase
Replies: 4
Views: 3178

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
4 years ago
Forum: Modeling
Topic: MIP equation for "lower equal", "greater equal", "lower then" and "greater then"
Replies: 1
Views: 1704

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
4 years ago
Forum: Modeling
Topic: Different GAMS versions giving very different answers+ weird behavior
Replies: 4
Views: 3255

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
by bussieck
4 years ago
Forum: Syntax
Topic: Indicator Constraints
Replies: 2
Views: 2284

Re: Indicator Constraints

Can you send a workable small example? -Michael
by bussieck
4 years ago
Forum: Announcements
Topic: GAMS Distribution 31.1.0 (Major Release) Announcement
Replies: 0
Views: 78352

GAMS Distribution 31.1.0 (Major Release) Announcement

Hi GAMS Users,

We started distributing GAMS Release 31.1.0 on May 1, 2020.

You can download the software from https://www.gams.com/download/

Here are the release notes: https://www.gams.com/latest/docs/RN_31.html

Your GAMS Team
www.gams.com