Limit solve time/iterations/... or cancel solving process #39
-
Hi everyone, Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi,
` Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi, Sascha |
Beta Was this translation helpful? Give feedback.
Hi,
Apologies for the confusion. I didn’t realise your question was for Sonnet—I thought it was for cbc.. I deleted my original answer.
For sonnet, the short answer is to either add the “sec” solver arg or cbcmodel setMaximumSeconds:
or to use the setMaximumSeconds of CbcModel:
osiCbc.getModelPtr().setMaximumSeconds(5.0;
Which should work again since CBC #467 was closed. See test/SonnetTest/Sonnet_CbcTests.cs
For an example of how to use CBC Callbacks from sonnet, see also Sonnet_CbcTests.cs
For background: Sonnet relies on Osi, but Osi doesn’t include things…