Node limit exceeded. Set model attribute nodlim. Topic is solved

Solver related questions
Post Reply
silence
User
User
Posts: 19
Joined: 4 years ago

Node limit exceeded. Set model attribute nodlim.

Post by silence »

Hello,

I have an MINLP model and intend to solve it with the SBB solver. The results showed that there was an optimal solution, but the output showed "Node limit exceeded. Set model attribute nodlim.". The results are all 0 in the .lst file and 0 in Excel. What should I do about this? Is there a way to expand the node limit of the model?

Best!
silence
User
User
Posts: 19
Joined: 4 years ago

Re: Node limit exceeded. Set model attribute nodlim.

Post by silence »

Here is my model and input files.
Thanks!
model.txt
INPUT.xls
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Node limit exceeded. Set model attribute nodlim.

Post by bussieck »

The results showed that there was an optimal solution
What makes you think that you got an optimal solution? When I run the files that you attached (why use extension .txt for a GAMS source file???) all my solvers including the global solvers like BARON say that the model is infeasible. Nevertheless, if you want to increase the node limit just do dalian.nodlim=1e9; before the solve statement. The default node limit in SBB is indeed 1000.

-Michael
silence
User
User
Posts: 19
Joined: 4 years ago

Re: Node limit exceeded. Set model attribute nodlim.

Post by silence »

bussieck wrote: 2 years ago
The results showed that there was an optimal solution
What makes you think that you got an optimal solution? When I run the files that you attached (why use extension .txt for a GAMS source file???) all my solvers including the global solvers like BARON say that the model is infeasible. Nevertheless, if you want to increase the node limit just do dalian.nodlim=1e9; before the solve statement. The default node limit in SBB is indeed 1000.

-Michael
Hi, Michael
Thanks for your answer to my question!

When I commented out "dalian.nodlim = 1e6;", I had got an optimal solution.
image1.png
When node reached the maximum value (1000), the model stopped, and the output showed "Node limit exceeded. Set model attribute nodlim.".
image2.png
When I set node limit, resource limit and nodetable limit to be 1e6 (see model2.gms), the model run slower and took about 15 hours. The output showed "ERR: Slover rc -1073740791". And the results were still not output to .lst and excel files. What should I do with this problem?

Thanks!
Attachments
model2.gms
(7 KiB) Downloaded 198 times
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Node limit exceeded. Set model attribute nodlim.

Post by bussieck »

When using a solver it is important to understand the log. The "Optimal Solution" you point out is the optimal solution for the relaxed problem that SBB solves first. With out solving the relaxed problem to optimality there is no point to do any branch-and-bound. At default (node limit 1000) SBB hasn't even found a feasible solution! If you uncomment the nodlim line in your source SBB will continue to work. As B&B trees grow quickly in size, you (i.e. SBB) might run out of memory and crash, that's what probably happened when you observe the "ERR: Solver rc -1073740791".

Your model is actually not a MINLP it is a MIQCP and with a mixed quadratic term in the objective (TDIV*DIVC) and a binary*positive variable (w2*M) in constraint SUfun. The constraint SUfun makes no sense whatsoever. The variable M does not show up in any other constraint. This constraint only guarantees that if w2 is 0, so is SU. We can get this linearly: SU <= bigM*w2. Moreover, the term TDIV*DIVC is also not really quadratic. DIVC is constA*w2 + constB*w3 (w2 and w3 are binary) and with constraint tw2_con (w2+w3=1) you make sure TDIV gets either multiplied by constA or constB. w2 and w3 also impact the range of TDIV, so this is classic piecewise linear functions that also can be done linearly. So after all this, you have a MIP! That solves in no time with any MIP solver!

GAMS has the philosophy of making the user aware of the model type they are going to solve. With that, the user should have an expectation of how quickly models will solve. LP is easier than MIP, MIP is easier than MINLP, etc. So if you can't solve your model of a particular type check if you can simplify your model to fit an easier class. In your case this worked without loosing anything. In many cases you have to accept some relaxation of some part of the model or loose some ability. One can argue that solvers should figure this out by themselves (at least if one does not loose anything). They don't (at least not in this case). GAMS/Lindo which is usually pretty good in finding a linear reformulation (if there is one), does not do this on this model. In the end, the human brain still counts for something.

I have attached the modified model:
new13.gms
(7.35 KiB) Downloaded 215 times
-Michael
Post Reply