Skip to main content

Questions tagged [gams]

For questions related to GAMS (General Algebraic Modeling System), a high-level modeling system for mathematical optimization.

1 vote
1 answer
52 views

custom branch and bound on cplex or GAMS

Does anyone have an idea how to create a custom B&B on CPLEX or GAMS? In my work, I need to add custom cuts on integer solutions in certain conditions by adding only one branch. Also, I need to ...
BADJARA Mohamed el Amine's user avatar
0 votes
0 answers
56 views

How to initialize a parameter (belonging to the first stage model) in a two stage model, taking its value from second stage model?

I am working on a two stage approach in order to reduce the complexity of a scheduling model which is an NP-hard problem. I have to implement a while loop in order to repeat solving the models in case ...
Baghban's user avatar
  • 131
2 votes
1 answer
156 views

How to pass the values of a variable of the first model to a parameter of the second model?

I am working on a scheduling problem which is NP-hard problem. Therefore, I decided to implement two-stage strategy to speed up the solution process. I need to pass the values of a variable from the ...
Baghban's user avatar
  • 131
3 votes
2 answers
232 views

Convex equivalent of a constraint

I have a constraint as follows in my MILP model: $$ \sum_{e} (a_1(e) - a_2(e))^2 \leq M $$ Where, $a_1(e)$ and $a_2(e)$ are binary variables. Would you please guide me how can I find the equivalent ...
Mohammad Reza Salehizadeh's user avatar
-2 votes
1 answer
135 views

How to print/display a specific element of a set in GAMS?

I have the follwoing set in GAMS set i /10,13,15/; how can I display the second element of this set ?
Optimization team's user avatar
1 vote
0 answers
25 views

Using Neos Server to submit GAMS file

When I submit a GAMS file along with a GDX file to the Neos Server upon clicking the submit button I don't get any error but the following webpage which is not loading and nothing is displayed. I ...
Andrew's user avatar
  • 163
3 votes
5 answers
782 views

Convert MCP model from GAMS to Pyomo

I have a Mixed Complementarity Problem (MCP) that represents a market under perfect competition. The model is written in GAMS and works as expected. But when translating it to Python, using Pyomo, the ...
Solver Max's user avatar
2 votes
1 answer
308 views

gams syntax issue - "set identifier or quoted element expected"

Writing some GAMS code, getting some syntax errors: Anyone recognize the problem?
Alexander Mills's user avatar
2 votes
1 answer
201 views

How to solve infeasible cplex model in GAMS?

I am facing this kind of error "Row 'eq1(14)' infeasible, all entries at implied bounds" in a problem that a GAMS script gets data from MATLAB. I have seen some posts about conflict ...
Panos S's user avatar
  • 21
2 votes
1 answer
62 views

Piecewise constraints in GAMS

I'm trying to solve the network problem below in GAMS Cplex. I have a piecewise constraint that are depending on the node situations (whether a node is an origin (o) node, inbetween node, and ...
Michelle Gunawan's user avatar
2 votes
1 answer
157 views

multiple solutions to a nonlinear problem in GAMS

Good afternoon, I have the following doubts Is there a command in GAMS that lets me know when my problem has multiple optimal solutions? Suppose my nonlinear optimization problem has multiple global ...
David Morante's user avatar
5 votes
3 answers
2k views

Is it better to use GAMS or Python for Optimization Models?

I have been using GAMS for several years, and I would like to do my new research in Python programming language. It is simple to do coding stuff in GAMS, however, it takes much time in complex ...
dozgunay's user avatar
  • 149
3 votes
2 answers
631 views

Write constraints with relationship sets in Pyomo

I would like to write the following constraint in the most compact form possible using Pyomo. $$\sum_{o\in O}y_{n,o} = \sum_{o\in O} \sum_{n'\in LN}y_{n',o}\qquad \forall n$$ Where, the important part,...
Daniel V.'s user avatar
2 votes
0 answers
135 views

Defining a highly non-linear function of integer variables

I have a complicated non-linear objective function of positive integer variables subject to linear constraints: $\mathop {Min}\limits_{\underline x} f(\underline x)$ s.t. $A\underline x\leq \underline ...
Johnthemathematician's user avatar
1 vote
0 answers
61 views

Ordering a set in GAMS

I'm trying to solve a problem very similar to this one, where I'm trying to find an optimal order. How would I actually plug this into GAMS? It gives out a single value rather than an ordering. I ...
adg's user avatar
  • 11

15 30 50 per page