Questions tagged [gams-math]

GAMS (General Algebraic Modeling System) is a high-level modeling system for mathematical optimization.

The General Algebraic Modeling System (GAMS) is a high-level modeling system for mathematical optimization. GAMS is designed for modeling and solving linear, nonlinear, and mixed-integer optimization problems.

References:

368 questions
2
votes
1 answer

Debugger tool in GAMS

I want to find my mistake in GAMS model. I don't have any errors , but my model doesn't work well Is there any debugging tools in GAMS ?( like debugger tools in other software, e.g MATLAB) Best
ilen
  • 107
  • 10
2
votes
2 answers

Visual Studio Code and GAMS

I have recently discovered that there a gms extension in visual studio code so you can write your GAMS code there. The description of the extension says following: Provides syntax highlighting for .gms and .inc files and shortcuts for running GAMS…
Kim
  • 159
  • 3
  • 11
2
votes
1 answer

Not Belongs to set

I have 3 set , I want to know what element not belong to Symmetric difference set. Set1={1*125} Set2={20*450} Set3={45*235} I show the symmetric difference of setA and set B by SymAB. I calculate sym12,sym13,sym23. I have one if statement,…
Richard
  • 177
  • 1
  • 9
2
votes
1 answer

How can define Union, intersection, symmetric difference?

I have set i ,j and sub set k from i and j . I want to have union , intersection and symmetric difference . The size of my set is large. But to clarify the question , let's I=1*3, j=6*12 . Set i /1*3/ j/6*12/ K(i ,j) …
Richard
  • 177
  • 1
  • 9
2
votes
1 answer

In GAMS, how do I write a function of the variables?

When coding in GAMS and defining my EQUATIONS, I sometimes need to reuse a certain function of the variables. How do I define this function so that I can reuse it, as opposed to having to constantly write it out in my equation definitions?
merija
  • 215
  • 1
  • 4
2
votes
2 answers

write.fwf column names don't line up with values

The following code produces a table whose column names don't line up with its values: library( gdata ) test0 <- matrix(5:28, nrow = 4) row.names(test0) <- paste("r", 1:4, sep = "") colnames(test0) <- paste("c", 1:6, sep = "") test0[3, 2] <-…
2
votes
2 answers

How to get return code from GAMS Python API run

Is there a way to get the return code from running a GamsJob in the GAMS Python API? Meaning, after I do job.run(), is the return code from this execution stored somewhere I can access?
2
votes
1 answer

Excluding an element from a predefined set in GAMS ?

Over a predefined set S /s1*s100/ I need to write something like this M_s - M_shat =g= 0 , where (shat) is any other element in the set (S) except the element (s). How can I do that in GAMS? Thanks.
Amedeo
  • 123
  • 7
2
votes
1 answer

how to define a if statement in the constraint - GAMS optimization

I trying to find optimum behavior in order to achieve greatest reward of this following formula. The program is running, but the output is the same as the input which means something is wrong with the code. im trying to define price elasticity,…
BEAst
  • 219
  • 1
  • 3
  • 11
2
votes
1 answer

Which characteristics from commercial Algebraic Modeling Languages are still missing from open source ones?

Which characteristics the main commercial Algebraic Modeling Languages (AML), like GAMS or AMPL, have, that open source AMLs, like Pyomo or JuMP, do not yet have (aside obviously the user base and availability of established models) ?
Antonello
  • 6,092
  • 3
  • 31
  • 56
2
votes
1 answer

Exporting associated text with GAMS

I am currently exporting some data to excel using execute_unload "file.gdx",data1; execute 'gdxxrw.exe file.gdx o=excelFile.xlsx par=data1 rng=sheet1! rdim=1 cdim=1'; Which creates a table containing data1's values in excelFile.xlsx in the sheet…
jebob
  • 173
  • 12
2
votes
2 answers

GAMS Display style

How do I display a text in GAMS? For example: in MATLAB I can use disp('MATLAB'), then I will get the output as MATLAB. Is it possible to have like this in GAMS. In fact, I am new with GAMS environment. Regards
2
votes
1 answer

GAMS programming-Defining Subsets

I have three sets, I and J and K, I know that for defining a subset in GAMS I should write it this way, I2(I) when set I2 is a subset of set I The problem is that the third set, Set K, is a subset of both set I and J, and I don't know how to code…
Sepideh Gh
  • 97
  • 6
2
votes
1 answer

Best practice for cross-platform file system manipulations in GAMS

I would like to manipulate the file system from some GAMS code. I am coming to this project mid-stream, and as a GAMS newbie, but am used to writing cross-platform file manipulations in other languages. It would be good for this code to be…
Elaine Hale
  • 1,408
  • 1
  • 10
  • 10
2
votes
1 answer

GAMS CPLEX understanding the IIS report

I am using GAMS with the CPLEX optimizer. Within the CPLEX optimizer is an option "iis", so that it generates the irreducably inconsistent set of constraints. If I set the iis option to 1 (or anything other than 0, I think, but I have only…
Mike Williamson
  • 4,915
  • 14
  • 67
  • 104
1
2
3
24 25