Hi everyone,
I have a put command that calculates the gap between the current objective value and the best integer solution, at a certain time. The code as follow;
(MODEL21.objval-MODEL21.objest)*100/(MODEL21.objval)
If GAMS can’t find an initial solution in the time limit of 900 seconds, the “MODEL21.objval” becomes 0 and I get a zero division error (rare but serious problem). Although there are other models to solve, GAMS stops running because it gives an error here. I tried to solve the problem by adding a very small number to the denominator. However, I’m wondering if anyone has a more practical suggestion? Also, I’m wondering is there a way to tell GAMS to ignore errors (especially in “put commands”) and continue solving the remaining models?