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
0
votes
1 answer

GAMS: Saving outputs generated in a loop to a single .gdx file without overwriting previous entries

I want to have a scenarios of 3 runs in GAMS, where I also want to save each of the 3 randomly selected elements of the set "codes" into a .gdx file, without each entry being overwritten by the next randomly generated output in the loop. How can I…
Stoner
  • 846
  • 1
  • 10
  • 30
0
votes
1 answer

how to decide if a element is in a set in GAMS

The situation is: I define a set in gams, like: set n /n1*n100/; And later in the code, I want to find a way to decide a if a element is in a set. For example, I want to have a function f, such that (1) if a element in a set, it returns true(or…
0
votes
0 answers

AtomLinter - Create new linter for GAMS language

I am interested in working (playing around) on a GAMS linter provider for AtomLinter. However, I could not figure out an entry point for the project, as most existing linter packages seem to link the Atom linter package with existing linters.…
Christoph Pahmeyer
  • 513
  • 1
  • 5
  • 17
0
votes
1 answer

GAMS listing file in Promo API

I'm running the GAMS/Pyomo API for the first time. The GAMS output says there was a problem during solve, and to check the listing file for details. But I can't find the listing file. I searched my entire MacBook for any *.lst files, and nothing. …
Emily Beth
  • 709
  • 1
  • 7
  • 23
0
votes
1 answer

GAMS - Economic Dispatch - QCP and NLP

I have this code: If I use NLP i get the results, but using QCP as it was asked to me, I can not get results anyone can help me finding the reason? code: sets g generators / P1*P5 / properties generator properties …
0
votes
1 answer

Range Summatory in GAMS

I have to do a function where for all i inside my objects I have to do a sum depending of the index the pseudo code would look like this: Objects Sets NUM_OBJECTS 7 i objects / o1*o7 /; Equations diasCon .. if(i<4) …
Alejandro Cordoba
  • 447
  • 1
  • 6
  • 19
0
votes
1 answer

GAMS: retrieve information from solution

GAMS: I think I have a pretty simple question, however I'm stuck and was wondering if someone could help here. A simplified version of my model looks like this: set(i,t) ; parameter price D; variable p(i,t) …
ima
  • 155
  • 12
0
votes
2 answers

How can i use $ in x(i,j) - GAMS

i tried this & doesn't work and given errors something like that. EQUATIONS ST3(i$(ord(i) LE (5) and ord(i) GE (1)),k$(ord(k) LE (19) and ord(k) GE (1))); ** $10,185 $195,96 ST3(i$(ord(i) LE (5) and ord(i) GE…
mfseker
  • 1
  • 2
0
votes
2 answers

Generate data using for loop in GAMS

plan is a matrix in data. for i = 1:5 for j = 1:3 for k = 1:plan(j,i) C(i,j,k) = SUB(j,i); end end end How to model same in GAMS. Please help.
0
votes
1 answer

Daily subsets of Annual Data

I am trying to optimize an energy production process in a year, based on the hourly resolutions. The purchased electricity price from the grid has two different values based on the two times of a day; between 07:00-18:00 the price is 10, between…
matlabcrz
  • 17
  • 6
0
votes
2 answers

GAMS: How can I formulate the constraint $x_{a,i,v+1,l} - x_{a,i,v,l} \leq y_{a,i,v,l}$?

I am having issues with formulating a constraint in GAMS. My constraint is as follows: x_{a,i,v+1,l} - x_{a,i,v,l} \leq y_{a,i,v,l} and sum(v,y_{a,i,v,l}) \leq 1. I have tried to formulate it several times, but I think (Well I know) I am doing it…
Husky653
  • 115
  • 3
0
votes
1 answer

How to determine which constraints or variable bounds are rendering a GAMS model infeasible?

The solve summary in my GAMS model (NLP) is returning the following: **** SOLVER STATUS 1 Normal Completion **** MODEL STATUS 19 Infeasible - No Solution **** OBJECTIVE VALUE NA THE bounds on one of my variables…
Marc P
  • 63
  • 4
0
votes
1 answer

Assigning Initial values for a certain parameter in GAMS?

I have a certain parameter say 'X(m)' which is defined over the set 'M' such as 'M ./.M1*M10/' How can I assign an initial value for that parameter 'X0' without conflicting with it's defined over the set 'M' which starts from '1-10', Any…
Amedeo
  • 123
  • 7
0
votes
1 answer

GAMS Definition of a Subset with k and k+1

So I have the following set: i 1,2,3,...,I j 1,2,3,...,J k 1,2,3,...,K with k´2,3,4,...,K I am defining my set and my parameters via GDX-import through a Excel Sheet so I can change the Set and the parameters dynamically in order to do a…
0
votes
0 answers

My smax function is not working properly even though execution of nload is right

I can not find the answer by myself and therefore I'm asking you. I'm trying to modify the input load subject to two different price range. It goes well I receive answers on nload, however when it comes to find the maximum value it doesn't work. I…
BEAst
  • 219
  • 1
  • 3
  • 11