## Search found 12 matches

- 4 months ago
- Forum: Modeling
- Topic: Division by zero for division of two continuous variables
- Replies:
**4** - Views:
**244**

### Re: Division by zero for division of two continuous variables

I also found another solution to this problem, specifically for the Baron solver. If you add the following code, the Baron could ignore the error and try to find a feasible solution. I think there should be similar options for other solvers as well. But what you mentioned, is a solution for all solv...

- 4 months ago
- Forum: Modeling
- Topic: Division by zero for division of two continuous variables
- Replies:
**4** - Views:
**244**

### 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 (...

- 4 months ago
- Forum: Modeling
- Topic: Division by zero for division of two continuous variables
- Replies:
**4** - Views:
**244**

### 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...

- 5 months ago
- Forum: Syntax
- Topic: How can I force GAMS to compile this code in its written order?
- Replies:
**4** - Views:
**356**

### 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 Z here is equal to a...

- 5 months ago
- Forum: Syntax
- Topic: How can I force GAMS to compile this code in its written order?
- Replies:
**4** - Views:
**356**

### 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 ...

- 5 months ago
- Forum: Modeling
- Topic: Why does GAMS change binary variables to positive ones in a loop?
- Replies:
**2** - Views:
**246**

### 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...

- 6 months ago
- Forum: Syntax
- Topic: How can I report and store the optimality status of solutions in the GAMS (in gdx files)?
- Replies:
**1** - Views:
**186**

### 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...

- 6 months ago
- Forum: Syntax
- Topic: How can I report and store the optimality status of solutions in the GAMS (in gdx files)?
- Replies:
**1** - Views:
**186**

### 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...

- 10 months ago
- Forum: Solvers
- Topic: CPU time for large-scale instances
- Replies:
**2** - Views:
**525**

### 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...

- 10 months ago
- Forum: Solvers
- Topic: CPU time for large-scale instances
- Replies:
**2** - Views:
**525**

### 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 explain the pr...