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
19
votes
3 answers

Comparison of GAMS versus AMPL Algebraic Modelling Languages

I'd be interested in getting the opinion from users of GAMS and AMPL on what the strength and weaknesses of each these languages are.
Emmanuel
  • 3,475
  • 6
  • 29
  • 45
4
votes
1 answer

PYOMO: How to create constraint relaxation? (Rewrite constraint from CPLEX in Pyomo)

I am trying to transfer a model written in GAMS using CPLEX solver to Pyomo. CPLEX has a feature allowing modelers to relax constraints & decision variables if a model is infeasible - FeasOpt (for Feasible Optimization). I am having trouble…
Steve
  • 135
  • 1
  • 10
4
votes
2 answers

Converting `AMPL` or `GAMS` files to `Python`

I would like to make some experiments in Python with constraint satisfaction problems from this database: all of the examples there are given in both the AMPL and GAMS file format. Is there a tool to convert these equations to simple python…
Peter Franek
  • 577
  • 3
  • 8
  • 25
3
votes
0 answers

Is there a way to run GAMS code (or other algebraic modeling language) from python?

I've found this tutorial on a python API (https://www.gams.com/latest/docs/API_PY_TUTORIAL.html), but it is unclear to me how it all works together. Specifically: do you build your model in GAMS, then run the .gms file from python? does the API…
Marc P
  • 63
  • 4
3
votes
2 answers

How to add a condition to a variable - GAMS

In the model I'm trying to build, I have a variable defined as: Variables x(i,j) number of motors produced in month i to be delivered in month j ; In that variable, j must always be equal or greater than i for it to make sense (you can't…
rkza
  • 53
  • 3
3
votes
2 answers

How to specify GAMS solver-specific options through Pyomo?

I am trying to solve an MINLP problem with the ANTIGONE solver (licensed in GAMS), and I am having difficulties to change the advanced settings of the solver. First, I call the solver from Pyomo as follows. solver =…
bburnak
  • 31
  • 2
3
votes
1 answer

Using GAMS/CPLEX from Python PYOMO

I noticed that Pyomo 5.3 offers a GAMS solver plugin. https://github.com/Pyomo/pyomo/blob/master/pyomo/solvers/plugins/solvers/GAMS.py This is very exciting, as we have a GAMS/CPLEX license where we can use CPLEX as solver, but only via GAMS. With…
Theo
  • 53
  • 2
  • 5
3
votes
1 answer

advantages of cplex in pyomo versus cplex in python

I've been using GAMS for a long time, but I cannot use all the functionality of CPLEX under GAMS. Can you do that using Pyomo? or using CPLEX directly in Python? Thanks!
Salva
  • 109
  • 1
  • 9
3
votes
1 answer

loop in GAMS for scenario generation in excel

I have an optimization model and I try to solve this model for different input files which I exactly call as "solve the model under different scenarios". For that reason, I need a loop to read the data from excel for each different sheet. Let me…
n.kavas
  • 31
  • 3
2
votes
1 answer

GAMS, matrix direct assignment

I want to assign values to a 3-D table in GAMS. But it seems it doesn't work as in Matlab.....Any luck ? Code is as followed and the problem is at the last few lines: Sets n nodes / Sto , Lon , Par , Ber…
Lisa
  • 21
  • 3
2
votes
0 answers

Solve multi-objective problem in Gurobi by using epsilon-constraint method

I am trying to solve my multi-objective problem in Gurobi using the epsilon-constraint method. I didn't find any sample code in Gurobi(python). I am new to gurobi and have no experience in coding. Please, someone, help me to find the solution. MO…
Karippery
  • 85
  • 1
  • 9
2
votes
1 answer

GAMS outputs of loop runs to different excel files

I'm using one of the implementations of the epsilon-constrained method to find some of the solutions in the Pareto front. However, I would like to store the results and some post-processed parameters into separate excel files. Most of these…
2
votes
1 answer

GAMS Cplex Cuts

I am solving a MILP modelled in GAMS by using Cplex. I am allowing the solver to generate cuts. Is there a way to get the cuts generated by Cplex displayed? Thank you
Clement
  • 121
  • 4
2
votes
2 answers

How to run a GPR file in Java API and run a model GAMS

I have a model with GMS extension. When I run that model with Gams studio, it run perfectly and I obtain the expected results. I have tried to run the GMS model with Gams IDE but I obtain a lot of errors, so, I have tried something different. I Have…
Allanh
  • 465
  • 1
  • 7
  • 19
2
votes
0 answers

GAMS: How to solve for initial function value too large?

In GAMS, I get the following error message if I increase a parameter above a certain threshold: ** An initial function value is too large (larger than 1.0E+10). Scale the variables and/or equations or add bounds. Is there a way I can get GAMS to…
pelorn
  • 21
  • 5
1
2 3
24 25