Search found 14 matches

by Freddy
1 month ago
Forum: GAMS MIRO
Topic: GAMS MIRO setup
Replies: 3
Views: 239

Re: GAMS MIRO setup

Danrome, what you can do if you want to create a default scenario with the parameter being initialized to 1, but allow the users to change these values via MIRO is to check whether you r model runs under MIRO or not when assigning to your parameter. You can do so by checking whether the GAMS option ...
by Freddy
1 month ago
Forum: GAMS MIRO
Topic: GAMS MIRO setup
Replies: 3
Views: 239

Re: GAMS MIRO setup

Danrome, between $onExternalInput and $offExternalInput you declare GAMS symbols to be read by MIRO. The symbols you declared in the camcge.gms model are parameters that are calculated by other parameters. This means that the values read by MIRO would be overwritten. So it makes no sense to declare ...
by Freddy
10 months ago
Forum: Syntax
Topic: Using slash/backslash in path specification with $include
Replies: 2
Views: 586

Re: Using slash/backslash in path specification with $include

You can (and should) use

Code: Select all

%system.dirsep%
like so:

Code: Select all

$include input_data%system.dirsep%Services.txt 
by Freddy
1 year ago
Forum: Archive Google Group
Topic: Error 170
Replies: 1
Views: 1257

Re: Error 170

warkcrm, the first dimension in a GAMS table is the row dimension. You need to swap the indices for the parameter T (or transpose the table) as so: Sets i "Plantas" /Armenia,Pereira,Manizales / j "Zonas" /1,2,3,4,5/; Table T (j,i) "Costo de transportar de la planta i a la zona j" Armenia Pereira Man...
by Freddy
1 year ago
Forum: Tools
Topic: Encoding problem with cyrillic letters in a gdx-file
Replies: 3
Views: 1254

Re: Encoding problem with cyrillic letters in a gdx-file

akos, How are you viewing your gdx file? Gdx does not know anything about encoding. This means it stores explanatory text with the same enconding as the .gms file with your „execute_unload“ command. GAMS Studio provides a way to reload the current file with a different encoding via „Edit“->“Reload w...
by Freddy
1 year ago
Forum: Tools
Topic: gdxrrw Mac OS
Replies: 5
Views: 2499

Re: gdxrrw Mac OS

Hello. The problem is that the gdx library is not in the path you specified. Instead, use:

Code: Select all

igdx("/Applications/GAMS30.3/Resources/sysdir")
by Freddy
1 year ago
Forum: Modeling
Topic: how to get any element from a two dimensional set
Replies: 4
Views: 1942

Re: how to get any element from a two dimensional set

How about this?

Code: Select all

Set i /1*3/;  
set j /1*3/;  
Set a(i,j) /1.2,2.3,1.3/;
set b(i,j);
b(i,j)$(ord(i) = 3 and ord(j) = 1) = yes;
by Freddy
2 years ago
Forum: GAMS MIRO
Topic: Is it possible to pass on miro input to a $call command?
Replies: 2
Views: 2431

Re: Is it possible to pass on miro input to a $call command?

Hello, Jason, MIRO currently assigns values to GAMS parameters at the end of the compilation phase (right before the start of the execution phase). Therefore, Input is always 1 at the time your expression is evaluated. Admittedly, this behavior is not entirely intuitive and will most likely change b...
by Freddy
2 years ago
Forum: Tools
Topic: Export report summary to GDX
Replies: 2
Views: 3271

Re: Export report summary to GDX

Hi,

if I understand you correctly, what you are looking for are the model attributes solvestat and modelstat. Use these in combination with the GAMS programming flow control features and you can write your own custom logic when and what to export.

Best,
Freddy
by Freddy
2 years ago
Forum: Modeling
Topic: Production Batch Constraint
Replies: 3
Views: 3755

Re: Production Batch Constraint

Sure, let's take the following equation: vincolo(forn) .. sum(pp, k(pp,forn)) =l= numeropp(forn); and add a non-negative slack variable slack(forn) to this equation as follows: vincolo(forn) .. sum(pp, k(pp,forn)) =l= numeropp(forn) + slack(forn); Subtract the slack variables (potentially multiplied...