Search found 31 matches

by moosavi_69
5 years ago
Forum: Modeling
Topic: Division by zero for division of two continuous variables
Replies: 4
Views: 3898

Re: Division by zero for division of two continuous variables

... I used a random initializiaton as you subtract x(j,t) from x(i,t) (same for y). Initializing them with the same values would results in zeros. ... Renger Hi Renger, First of all, I have to appreciate your attention. As per as your valuable comment, I have added the following lines to the code (...
by moosavi_69
5 years ago
Forum: Modeling
Topic: Division by zero for division of two continuous variables
Replies: 4
Views: 3898

Division by zero for division of two continuous variables

Dear friends, I have coded a facility layout problem as a MINLP model. Then, I used Baron as the default solver. In this model, constraint 19b determines the maximum distance between whole departments (DmaxF, a positive variable). Then, this variable is used on the right-hand sides of constraints 22...
by moosavi_69
6 years ago
Forum: Syntax
Topic: How can I force GAMS to compile this code in its written order?
Replies: 4
Views: 4161

Re: How can I force GAMS to compile this code in its written order?

Dear Claudio, First of all, I have to thank you very much for your time. In fact, I want the first display Z.l shows the value "a" and the second display Z.l shows the value of "b". For more clarification, pls look at the following code: $GDXIN Name1.gdx $LOAD Z *** the value of ...
by moosavi_69
6 years ago
Forum: Syntax
Topic: How can I force GAMS to compile this code in its written order?
Replies: 4
Views: 4161

How can I force GAMS to compile this code in its written order?

Dear friends, When I run the following code, GAMS does not compile this code in its written order. Could you pls help me out how I can force it to do so? $onmulti Variable Z; $GDXIN Name1.gdx $LOAD Z *** the value of Z here is equal to a*** $GDXIN Display Z.l; $GDXIN Name2.gdx $LOAD Z *** the value ...
by moosavi_69
6 years ago
Forum: Modeling
Topic: Why does GAMS change binary variables to positive ones in a loop?
Replies: 3
Views: 3897

Why does GAMS change binary variables to positive ones in a loop?

Dear friends, I have coded a scheduling problem in GAMS using the Sample Average Approximation. This model is a MILP mathematical model. I have chosen Cplex as the solver for this problem. The code solves a problem in a loop for multiple times, and it fixes binary variables, i.e., xa, and xaa, in ea...
by moosavi_69
6 years ago
Forum: Syntax
Topic: How can I report and store the optimality status of solutions in the GAMS (in gdx files)?
Replies: 1
Views: 2164

Re: How can I report and store the optimality status of solutions in the GAMS (in gdx files)?

I found the answer to this question. After solving a model, it saves its features in its attributes. For further details, interested readers can see the following link: https://www.gams.com/latest/docs/UG_ModelSolve.html#UG_ModelSolve_ModelAttributes For instance, if we want to optimize a model enti...
by moosavi_69
6 years ago
Forum: Syntax
Topic: How can I report and store the optimality status of solutions in the GAMS (in gdx files)?
Replies: 1
Views: 2164

How can I report and store the optimality status of solutions in the GAMS (in gdx files)?

Dear sir/ madam, I have coded a problem and used Cplex as the solver. I want to store the optimality status of solutions of this problem. To be more precise, I want to store them in gdx files. Although the GAMS indicates this issue on its report page (i.e., Absolute Gap), I could not find a way to r...
by moosavi_69
6 years ago
Forum: Solvers
Topic: CPU time for large-scale instances
Replies: 2
Views: 3266

Re: CPU time for large-scale instances

Dear Steve, I am grateful for your prompt attention. Following to your question regarding the decision variables, I have to tell you that variables in this problem are positive integer or binary. To be more precise, around 15,000 of them are binary variables and 8,000 of them are positive integer va...
by moosavi_69
6 years ago
Forum: Solvers
Topic: CPU time for large-scale instances
Replies: 2
Views: 3266

CPU time for large-scale instances

Dear friends, I have a question. Note that this inquiry is a question asked by a reviewer and I have to fully address his concern. His concern: " The model is really complex with thousands of constraints. I have difficulty in imaging that the exact method needs few seconds... " Let me expl...
by moosavi_69
6 years ago
Forum: Syntax
Topic: Unknown option (mipstart=1)
Replies: 2
Views: 5295

Re: Unknown option (mipstart=1)

Hi, mipstart is not a GAMS but a solver option, see e.g. the CPLEX solver manual: https://www.gams.com/latest/docs/solvers/cplex/index.html#CPLEXmipstart Hence, mipstart needs to be set in a solver option file: https://www.gams.com/latest/docs/solvers/introduction/index.html#BASIC_USAGE_SOLVER_OPTI...