Search found 21 matches

by dirkse
1 month ago
Forum: Solvers
Topic: Can GAMS run two models at the same time?
Replies: 2
Views: 101

Re: Can GAMS run two models at the same time?

The answer depends on how you run the models. If you have two separate GAMS jobs, then the solvers run in separate and independent processes. The only way they can interfere is if they use the same files. For example, if you have two GAMS jobs running "gams trnsport" in the same directory you could ...
by dirkse
1 month ago
Forum: Solvers
Topic: How to set the GAMS option optCR if I don't know whether the problem satisfies strong duality?
Replies: 2
Views: 112

Re: How to set the GAMS option optCR if I don't know whether the problem satisfies strong duality?

You are confusing the duality gap with the optimality gap. These are not at all the same, although with some mental gymnastics I am sure you could make connections between the two. The duality gap has to do with the difference between the objectives in the primal and dual forms of a model. For examp...
by dirkse
1 month ago
Forum: API
Topic: Can GAMS connect to MATLAB?
Replies: 1
Views: 81

Re: Can GAMS connect to MATLAB?

In general, it is not possible to hook a solver coded in Matlab to GAMS in the same way you'd connect a solver implemented in C or C++. Depending on the model type, you could dump the model instance in one of several generic formats (e.g. MPS, LP-file) using GAMS/CONVERT or some other scheme (many e...
by dirkse
3 months ago
Forum: Syntax
Topic: Single Element of a Set of a Parameter in a For Statement
Replies: 1
Views: 252

Re: Single Element of a Set of a Parameter in a For Statement

A common way to implement what you ask about - solves for different scenarios or data values - is to set up a loop over the scenarios you want to consider. In the loop, assign scenario values to the parameters used in the model, solve, and extract results to a parameter indexed by the scenario set. ...
by dirkse
3 months ago
Forum: API
Topic: metadata - keeping track of parameter descriptions
Replies: 2
Views: 388

Re: metadata - keeping track of parameter descriptions

Andy,

This metadata is called the explanatory text, or just text. It is part of the GamsSymbol class, accessible as a property called text.

https://www.gams.com/latest/docs/apis/p ... ymbol.html

-Steve
by dirkse
3 months ago
Forum: Bugs
Topic: RGDX compress issue
Replies: 3
Views: 805

Re: RGDX compress issue

Hermann, With GDXMRW, it is not possible to write a GDX file with domain information in it. The tools was developed prior to the advent of domain information in GDX files, and it hasn't been updated in this respect. If we did anything in this direction, we would probably write a file with relaxed do...
by dirkse
3 months ago
Forum: Bugs
Topic: RGDX compress issue
Replies: 3
Views: 805

Re: RGDX compress issue

Hermann, Your example is perfect for illustrating what compress is for. If I look at the domain info for your data, I see there is none: C:\support\mrw>gdxdump prices.gdx domaininfo SyNr Type DomInf Symbol 4 Par None AlP(*) 1 Par None DAP(*, *) 3 Par None PRLSP_Margin(*) 2 Par None PRLSP_Median(*) Y...
by dirkse
3 months ago
Forum: Modeling
Topic: Create all combinations of multiple parameters
Replies: 4
Views: 541

Re: Create all combinations of multiple parameters

Luis, Looks like you found what you need, but another way to do this that is also helpful is to use a map. In the example below, the mapping set matches each element of n with a different i,j,k tuple. It sometimes help to dump the entire thing to GDX and browse it in the IDE: that really helps to se...
by dirkse
3 months ago
Forum: Syntax
Topic: Cumulative sums
Replies: 5
Views: 486

Re: Cumulative sums

Hermann, To be precise, GAMS displays the linearization of the expression. Since you have multiplication, that linearization will involve the level values for some variables, but that's only because of the product rule for derivatives. If you have exp(2*x) + exp(3*y) =L= 10; you will not see anythin...
by dirkse
3 months ago
Forum: Syntax
Topic: Beginner Question: Using csv as an input
Replies: 4
Views: 520

Re: Beginner Question: Using csv as an input

If you want to use CSV files with headers and not change them at all, you could use the GAMS utility csv2gdx. The datalib model csv2gdx1 gives you a working example: there's a call to csv2gdx in that model, and also some error checking. To read your file, I did: csv2gdx param.csv output=param.gdx ID...