Reputation: 241
I want to terminate solving when it finds one solution, How can I do that?
Now it returns something like below:
* 62: obj = -8.419980000e+05 inf = 0.000e+00 (0)
OPTIMAL LP SOLUTION FOUND
Integer optimization begins...
+ 62: mip = not found yet >= -inf (1; 0)
+ 149: >>>>> -1.370260000e+05 >= -7.939630000e+05 479.4% (26; 0)
+ 1390: >>>>> -1.375090000e+05 >= -4.261680000e+05 209.9% (264; 27)
+ 28323: mip = -1.375090000e+05 >= -1.921510000e+05 39.7% (2232; 1534)
+ 52571: mip = -1.375090000e+05 >= -1.781890000e+05 29.6% (2983; 3596)
Upvotes: 0
Views: 134
Reputation: 33542
I think there is no nice way doing this.
These kind of advanced usages are usually done with more direct access to the solver (opposed to wrappers like this one; i'm assuming you are still using cvxopt like in your other questions).
Some remarks:
setMaximumSolutions
, but i think there is no wrapper within cvxopt)objll
or objul
docsobjul (default: +DBL_MAX)
Upper limit of the objective function. If the objective function reaches this limit and continues increasing, the solver stops the search. This parameter is used in the dual simplex only.
objll (default: -DBL_MAX)
Lower limit of the objective function. If the objective function reaches this limit and continues decreasing, the solver stops the search. This parameter is used in the dual simplex method only.
objll
to a huge value (or better: the expected worst-solution value = biggest value)objul
to a tiny value (possibly negative; or better: the expected worst-solution value = smallest value)Upvotes: 1