Hello all,

I am now working to build a MIP model (contains binary variable in constrain) using GAMS and solve it using CPLEX. The option of reslim =1000.

Running the code I receive the SOLVE SUMMARY :

**** SOLVER STATUS 3 resource interrupt

**** MODEL STATUS 8 integer solution

I went through the model many times and I am quite sure that I exactly followed the equations addressed in my thought. I was wondering how to find the problem in my model and get the optimal solution?

I would be very happy for any advice!

Thank you in advance

LI

Hi,

Sometimes it can take a long time to solve a difficult MIP. If you need the optimal solution you can set the relative optimality criterion optcr to zero and at the same time you should in crease the time limit reslim to give CPLEX more time to solve to optimality:

https://www.gams.com/latest/docs/UG_GamsCall.html#GAMSAOoptcr

https://www.gams.com/latest/docs/UG_GamsCall.html#GAMSAOreslim

I hope this helps!

Fred

Hi Fred,

Thank you very much for your reply.

I set optcr=0 when the SOLVER STATUS is “1 OPTIMAL”, and the result of MODEL STATUS is "1 OPTIMAL ".

However, I guess the description of my model is not correct when the SOLVER STATUS is “3 resource interrupt”. I tried to check the file of ‘’.lst’', but I didn’t find usefull information in it. In addition, someone said ‘iis’ might be usefull, but I cannot compile it in programm .

Could you tell me some method to check the logical of my model, thank you?

LI

Hi,

You wrote that you get

MODEL STATUS 8 integer solution

. Applying IIS makes no sense because it computes an irreducible infeasible set but your model is feasible.

SOLVER STATUS 3 resource interrupt

means that a time limit was reached before any other termination criterion was satisfied. This is pretty normal and I don’t see what let’s you conclude that your model is erroneous .

Fred

Hi Fred,

Thanks for your reply again.

I try to set “option reslim=3000, 5000”, the result is same as “reslim=1000”. When I set reslim=30000, SOLVE SUMMARY is

**** SOLVER STATUS 4 TERMINATED BY SOLVER

**** MODEL STATUS 14 NO SOLUTION RETURNED

Because of the Absolute gap is so huge and the converged speed of solver is slower, so I get the conclusion that my model is not correct.

MIP Solution: 664.402180 (19043440 iterations, 637601 nodes)

Final Solve: 664.402180 (156 iterations)

Best possible: 1163.672845

Absolute gap: 499.270664

Relative gap: 0.751458

In addition, could you tell me some reasons that a time limit was reached before termination criterion was satisfied? Lack of tight constraints?

Thanks

LI

MIP is a hard problem type and even small models might not solve even with years of computing time. Perhaps there are better model formulations of your problem (hard to suggest anything without your code). The reason for the 4/14 return code might be some other limit (e.g. memory) kicking in. The 14 (no solution returned) is somewhat strange because with smaller resLim you got a solution. Lot’s of speculation here. You should post you entire log files and the model with data if you want to serious answers.

-Michael

Hi Michael,

Thanks for your repely.

I update the new file as Fred suggestion, please see the attachment under the new reply.

Again, thank you very much for your patience.

LI

Hi,

You are using a 13(!) year old version of GAMS and Cplex. I highly recommend to update to a more recent version (https://www.gams.com/download/).

With the latest GAMS 27.2.0, Cplex reaches a smaller gap after seconds than what you get after hours.

Still, the model seems to be challenging and you might not be able to solve to optimality.

Fred

PS you attached the lst (not not the log) file of a run that was normally terminated by the time limit. That doesn’t tell us anything about the 4/14 return code you got from a different run. Updating to a more recent version hopefully resolves the issue anyway.

Hi Fred,

The attachment (Untitled_2_log) should be the log file (reslim=30000), I’m sorry to make a mistake.

The GAMS and Cplex is a old version because I’m a student, and I cannot afford the License even the acadamic license. Thanks for your pertinent suggestion.

LI

Hi,

As Michael already suspected, the log states

```
CPLEX Error 1001: Out of memory.
```

Fred

Hi Fred,

Thanks for your reply.

I have no idea to deal with my programm now. I just want to solve it with the status “1 optimal” through adding some constrains. In this case, could you tell me how to modify it?

LI

No, unfortunately I can’t. That’s not how things work.

I assume that your model is a description of an actual problem. As mentioned before, it is not unusual that it can take a long time to solve a MIP (especially when outdated software is used). You cannot just add some arbitrary constraints to get an optimal solution quickly. Often, there are many ways to model one and the same problem. There is a chance but no guarantee that there are alternative formulations for your problem that can be solved quicker. I cannot dive so deep into your problem to investigate that.

Fred