简体   繁体   中英

Is there a way to limit solutions in choco CPSolver 2.1 like there is in Solver 4.10?

I have an old Choco 2.1.4 project and would like to limit the number of solutions solved for to 2 as I am only interested in knowing if there are 0, 1 or more than one solutions ad would like to shave some time off the solver.solve() call when there are many solutions. I see in choco 4.10.8 there is a method

Solver s = model.getSolver();
s.limitSolution(x);

Is there a way to do that in choco 2.1.4 or do I need to update to 4.10.8 - if so is there a good update guide somewhere as the classes and methods have changed.

Thanks!

Alas, something like limitSolution(x) is not possible in 2.1.4, gotta upgrade to version 4.10.8 I guess if I want something like that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM