Search found 150 matches

by dirkse
1 month ago
Forum: API
Topic: Import a parameter from GDX file
Replies: 3
Views: 464

Re: Import a parameter from GDX file

The GDX file is not so large. Perhaps you could attach it.

-Steve
by dirkse
1 month ago
Forum: Syntax
Topic: Problem with EMP Equilibrium syntax
Replies: 3
Views: 304

Re: Problem with EMP Equilibrium syntax

If you have a max/min agent it must exist inside an equilibrium model - even in the special case where there is only one agent. So add the equilibrium keyword to your EMP info file. Your model looks like it could also be specified as an embedded complementarity system using the dualvar keyword. Note...
by dirkse
1 month ago
Forum: API
Topic: Exporting data from MATLAB to GAMS
Replies: 5
Views: 297

Re: Exporting data from MATLAB to GAMS

Bahar, It would be helpful for you to post a short piece of Matlab code that produces the GDX file that is giving you problems. And send also the GDX file, and a short .gms file that reads the data from GDX. With all this, you will perhaps solve your own problem. If not, you'll get some good help. -...
by dirkse
1 month ago
Forum: Modeling
Topic: save variables as parameters
Replies: 2
Views: 239

Re: save variables as parameters

Parag, The variables levels are available after the solve using the .L attribute, e.g. set i / 1 * 3 /; variable x(i); * I don't list it here, but imagine some code to solve a model and by doing so setting the variable levels for x * now x.L(i) is available, just like a parameter. parameter c(i), v(...
by dirkse
2 months ago
Forum: API
Topic: Exporting data from MATLAB to GAMS
Replies: 1
Views: 252

Re: Exporting data from MATLAB to GAMS

Bahar, Take a look at what is actually in the GDX file, not what you import from GDX to GAMS with the $load statement. To do this use the gdxdump cmdline utility or use the GDX viewer in Studio. Or, use $LOADDC instead of $LOAD. That will give you a compilation error if the GDX file contains things ...
by dirkse
3 months ago
Forum: Solvers
Topic: Marginal Costs are different when constraints are set using x.lo and x.up
Replies: 2
Views: 755

Re: Marginal Costs are different when constraints are set using x.lo and x.up

Why would you expect marginal costs to be unchanged?

If you add, remove, or alter constraints and bounds you can expect a change in level and/or marginal values.

-Steve
by dirkse
3 months ago
Forum: Modeling
Topic: Model not full optimized - Finishes yearlier
Replies: 4
Views: 463

Re: Model not full optimized - Finishes yearlier

Paulo, Yes, it is possible to run the 12 months automatically. You would do this using a loop: this is a very typical thing to do in GAMS. You can read all about loops in the docs: https://www.gams.com/latest/docs/UG_FlowControl.html#UG_FlowControl_Loop https://www.gams.com/latest/docs/UG_ModelSolve...
by dirkse
3 months ago
Forum: Modeling
Topic: Model not full optimized - Finishes yearlier
Replies: 4
Views: 463

Re: Model not full optimized - Finishes yearlier

Paulo, There are many reasons that CONOPT might terminate with a "convergence too slow" message. The log file is structured to provide clues about this when it occurs - it would help to see that attached to your post. The model size might be an issue. Or perhaps there are underlying issues that don'...
by dirkse
3 months ago
Forum: Modeling
Topic: How to handle large number?
Replies: 2
Views: 371

Re: How to handle large number?

Yehuda,

What makes you think this number is ignored? A simple example shows it is not:

Code: Select all

scalar yehuda 'this is a pretty big number' / 3.6e260 /;
display yehuda;
I see the number displayed in the .lst file.

-Steve
by dirkse
3 months ago
Forum: Tools
Topic: gdxrrw Mac OS
Replies: 5
Views: 2771

Re: gdxrrw Mac OS

Lorena, Did you check that you actually have a GAMS system installed in the directory "/Applications/GAMS34.3/Resources/sysdir" ? If there is no GAMS system there, then calling igdx() with this directory won't help locate the GDX shared library. For recent GAMS systems, the location has moved to /Li...