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

How can I export parameter from excel to games?

How can I export data from Excel to GAMS? I have a set i and parameter b(i). b(0)= 30,...,b(10)=18 are: 0 30 1 17 2 21 3 32 4 19 5 29 6 24 7 20 8 23 9 27 10 18 I have an Excel file with name "Book1", my code results in ERROR…
0
votes
0 answers

How to identify all minima in a non-PSD quadratic program (QP)?

I have linearly constrained QP problems with multiple disjoint global optima (not PSD). I'd like to make a QP solver characterize all of the globally optimal solutions. Here is a very simple example of the sort of case that arises: minimize…
0
votes
1 answer

Installing GAMS API for Python not successful

I installed the API exactly as mentioned on this Tutorial and no error happened. but when I type: import gams on my ide (idle), the following error shows up: Traceback (most recent call last): File "", line 1, in import…
Mansour Zayer
  • 364
  • 3
  • 12
0
votes
1 answer

Write GAMS results in text file

Why is it that GAMS stores results in file with .put extension though i made new project in working directory and specified file mse /D:\RS Results\mse_goal(0.5).txt/; put mse;?
Sam
  • 95
  • 10
0
votes
2 answers

In GAMS, how do I replace an index with a parameter?

Sets i / 1, 2 /; Parameters j(i) / 2, 1 /; Variables x(i); So, here I have an index i, a parameter that depends on i which gives the same values as i, and a variable that depends on x. If I want to get x(2), I could of course write x(2), but…
merija
  • 215
  • 1
  • 4
0
votes
2 answers

In GAMS, how to deal with divisions?

In my GAMS model, I have a objective function that involves a division. GAMS sets the initial values to zero whenever it solves something...brilliant idea, how could that possibly ever go wrong!....oh wait, now there's division by zero. What is the…
merija
  • 215
  • 1
  • 4
0
votes
1 answer

Cannot save/run GAMS file to/from mapped SharePoint network drive

I am trying to run a model in GAMS (using the Windows GAMS 64, version 24.5). The model .gms file is located on a Z drive that is mapped to a SharePoint folder. We use this setup all the time with other programming languages without problem. But…
Emily Beth
  • 709
  • 1
  • 7
  • 23
0
votes
1 answer

Inequality of variabels for the same product

I have a problem with my model in GAMS. I have two variables iand k for the same class of products, so that they are alias. In my model is a restriction for which iand k have to be unequal. I'm not sure how to write this... The code of the…
njb
  • 1
  • 1
0
votes
1 answer

GAMS - setting binary variables depending on variables

I got a problem with binary variable modelling in GAMS. I want to set the binary variable nrc to 1, when the mass flows m_rc_ts and m_rc_pb both equal to zero. That's why I implemented the following equations: e_nrc_lo(i+1) ..…
0
votes
2 answers

GAMS - logical equations & binary variables

I got another question on logical equations or rather binary variables. This is again a beginner question. So, right now I'm trying to understand how to set the value of binary variables with conditions. Consider the binary variable x and variable…
0
votes
1 answer

reduce searching space in GAMS

Now,I have the GAMS code like the sample below. The statement binary variables x(i,j) indicates that the GAMS will creat one hundred variables x with index(i,j). How Can I do to let GAMS creats variables x(i,j) only when r(i,j) exists to reduce the…
Jiawei Lu
  • 509
  • 6
  • 16
0
votes
1 answer

GAMS: Using variables in logical conditions

I got a question about GAMS. I'm kind of a beginner with GAMS. I'm using minlp with scip solver. I'm trying to model a system for a thermal energy storage of a concentrated solar power plant. I'm right now stuck on modeling the equations for the…
0
votes
4 answers

Optimisation in GAMS

I have a problem with my GAMS-code and the implementation of the GAMS-code in Ruby. I know that GAMS is not the most popular program, but maybe someone can help me. I have a model, where I try to allocate children optimally to kindergartens. This is…
Pyrmon55
  • 183
  • 1
  • 3
  • 14
0
votes
1 answer

How to formulate equations with three indices in GAMS?

Xijk = Number of units of product k purchased from vendor i for DC j ObjCost.. Sum(i,Sum(k,j), xijk*Procurement-Cost); Is the ObjCost equation formulation alright?
0
votes
1 answer

Infeasibility (LHS = 0, INFES = 1 ****) and Local Optimum

I have formulated a NLP problem where after solving I get following output. Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK 0 0 2.0000000000E+01 (Input point) Pre-triangular equations: 15 Post-triangular equations: 36 1 0…
deepAgrawal
  • 673
  • 1
  • 7
  • 25