Search found 1045 matches

by bussieck
1 month ago
Forum: Syntax
Topic: A problem with parentheses
Replies: 3
Views: 1437

Re: A problem with parentheses

Not sure what editor you used, but GAMS does not like your "≤" nor the "∗". These are unicode characters not part of the GAMS language, hence the compiler gets confused. Just use the regular ASCII characters/character sequence "<=" and "*".

-Michael
by bussieck
1 month ago
Forum: Syntax
Topic: $ifThen set X or Y
Replies: 2
Views: 4003

Re: $ifThen set X or Y

No, the "$if set" only works on a single compile time variable name, not an expression. You can work around this by having a parallel set of numerical compile time variables and then use $ifThenE: $set xset 0 $if set x $set xset 1 $set yset 0 $if set y $set yset 1 $log %xset%%yset% $ifThen...
by bussieck
2 months ago
Forum: Announcements
Topic: GAMS Distribution 46.1.0 (Major Release)
Replies: 0
Views: 4022

GAMS Distribution 46.1.0 (Major Release)

Hi GAMS Users,

We started distributing GAMS Release 46.1.0 on February 21, 2024.

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

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

Your GAMS Team
www.gams.com
by bussieck
3 months ago
Forum: Announcements
Topic: GAMS Distribution 46.0.0 (Beta Release)
Replies: 0
Views: 2640

GAMS Distribution 46.0.0 (Beta Release)

Hi GAMS Users, We would like to announce the availability of the GAMS Beta Release 46.0.0. Please consult the beta release notes for details about new features and updated solvers: https://www.gams.com/beta/docs/RN_46.html If you are interested in experimenting with this beta release, please downloa...
by bussieck
3 months ago
Forum: Solvers
Topic: BARON solver cannot handle the "Sign" function
Replies: 2
Views: 3805

Re: BARON solver cannot handle the "Sign" function

BARON only "understands" a subset of functions offered by GAMS. BARON, unlike local solvers like Conopt, need the algebra of the non-linear expression to build (linear) underestimators. It can do that for all operators (*,/,**,+,-) but not for all functions. The trig functions sin, cos, ta...
by bussieck
3 months ago
Forum: Syntax
Topic: SOS1 variable modelling
Replies: 2
Views: 2659

Re: SOS1 variable modelling

GAMS defines the membership of a variable to a SOS set by the last index in the SOS variable declaration. As a consequence of this you can't have a variable appear in two SOS sets. Your model has this (e.g. W(T2,2,U1) shows up in the first and second SOS set in your example). I have not seen models ...
by bussieck
4 months ago
Forum: Solvers
Topic: Issue of dual from energy/reserves balance constraint in optimization model
Replies: 2
Views: 13129

Re: Issue of dual from energy/reserves balance constraint in optimization model

In an LP there is no such thing as bounds on the dual. It is not unusal to get different dual solution with different solvers. With LPs you can have different optimal basis with different (primal and) dual solutions. Uniqueness in the optimal solution is very rare in practical models. If you want mo...
by bussieck
4 months ago
Forum: Modeling
Topic: GAMSPy model building
Replies: 6
Views: 25419

Re: GAMSPy model building

Thanks for sharing the code. The trouble is that the description of set "impact" had some funny characters which don't show when you look at the file in github ("impact categories like EUR or USD, CO 2 − eq") but do when you check this out on Windows and look at it in e.g. notepa...
by bussieck
5 months ago
Forum: Syntax
Topic: GAMSpy error
Replies: 1
Views: 10308

Re: GAMSpy error

I fear your screen shot is not enough to point you to the issue. Please share the entire Python script (or make a minimal example) so one can reproduce. If you are a licensed user and can't share the script here in the forum, you might want to consider to email support@gams.com with something that l...
by bussieck
5 months ago
Forum: Tools
Topic: Excel export and import in a loop
Replies: 2
Views: 10442

Re: Excel export and import in a loop

One issue might be, that Connect's Excel reader reads values from the spreadsheet. It does not reevaluate formulas. So if you write to one part of the spreadsheet and hope that another part gets recalculated, I think this is not happening. The Excel API we use in Connect just does not do that. For t...