Search found 60 matches

by bussieck
3 weeks ago
Forum: Announcements
Topic: GAMS Distribution 25.0.0 (Beta Version) Announcement
Replies: 0
Views: 76

GAMS Distribution 25.0.0 (Beta Version) Announcement

Hi GAMS Users, We would like to announce the availability of the GAMS Distribution 25.0.0 (Beta Version). Please consult the beta release notes for details about new features and updated solvers: https://www.gams.com/25.0/docs/RN_250.html If you are interested in experimenting with this beta release...
by bussieck
3 weeks ago
Forum: Syntax
Topic: Logic assignment for parameters
Replies: 2
Views: 126

Re: Logic assignment for parameters

This seems to work: set n /1*10/; parameter Mn(n) /#n 0/; loop(n, Mn(n)$(mod(n.val,2)=1) = n.val-2 + Mn(n-((n.val+1)/2)) + Mn(n-((n.val-1)/2)); Mn(n)$(mod(n.val,2)=0) = n.val-2 + 2*Mn(n-(n.val/2)); ); display Mn; This gives: ---- 7 PARAMETER Mn 1 -1.000, 2 -2.000, 3 -2.000, 4 -2.000, 5 -1.000, 7 1.0...
by bussieck
3 weeks ago
Forum: Syntax
Topic: Sum Counterdiagonal elements
Replies: 2
Views: 134

Re: Sum Counterdiagonal elements

With lag and leads (see https://www.gams.com/latest/docs/UG_OrderedSets.html#UG_OrderedSets_LagLeadOperators ) you need to have i+(expr) or i-(expr) (-- or ++) also work. So your 9-i is equivalent to i-i+9-i = i+(9-2*i). Here is the complete GAMS program: set i /1*9/; alias (i,j); parameter x(i,j); ...
by bussieck
1 month ago
Forum: Syntax
Topic: LOOP Problem
Replies: 3
Views: 194

Re: LOOP Problem

You are probably using an old version of GAMS. Singleton sets where introduced in 24.6 (7/2014). You probably should update your GAMS system.

-Michael
by bussieck
1 month ago
Forum: Archive Google Group
Topic: gams/cplex option file
Replies: 7
Views: 434

Re: gams/cplex option file

Uhhh, and I forgot the obvious, create a 'cplex.opt' not a model2.opt as clearly instructed in https://www.gams.com/latest/docs/UG_Sol ... PTION_FILE:

$onecho > cplex.opt
threads=0
$offecho

-Michael
by bussieck
1 month ago
Forum: Archive Google Group
Topic: gams/cplex option file
Replies: 7
Views: 434

Re: gams/cplex option file

Hi, just drop the ';' from the lines in the cplex.opt: $onecho > model2.opt threads=0 $offecho The ';' is important to separate GAMS language statements (see https://www.gams.com/latest/docs/UG_GAMSPrograms.html) The $xxx are dollar control options (https://www.gams.com/latest/docs/UG_DollarControlO...
by bussieck
1 month ago
Forum: API
Topic: Excel2Gams VBA problem
Replies: 2
Views: 166

Re: Excel2Gams VBA problem

David, We have a number of VBA (Excel) examples in datalib (e.g. https://www.gams.com/latest/datalib_ml/libhtml/datalib_Portfolio.html ) that use the following way to synchronously call GAMS: command = "gams " & fln result = CreateProcess(vbNullString, command, 0, 0, 0, NORMAL_PRIORITY_CLASS, 0, wdi...
by bussieck
1 month ago
Forum: Syntax
Topic: Dimension Different Error
Replies: 3
Views: 175

Re: Dimension Different Error

Just define set i and make an alias(i,j).

Hope this helps,
-Michael
by bussieck
1 month ago
Forum: Syntax
Topic: Dimension Different Error
Replies: 3
Views: 175

Re: Dimension Different Error

Hi,

k is a label (string) not a number, so you can't multiply this with a variable. If the label happens to represent a number you can use k.val (see https://www.gams.com/latest/docs/UG_GAM ... ams_Labels)

Hope this helps,
- Michael
by bussieck
2 months ago
Forum: Announcements
Topic: GAMS Distribution 24.9.2 (Minor Release) Announcement
Replies: 0
Views: 122

GAMS Distribution 24.9.2 (Minor Release) Announcement

Hi GAMS Users,

We started distributing GAMS Release 24.9.2 on November 14, 2017. This is a maintenance release.

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

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

-Michael