Forum Discussion
FICO
4 years agoCommunity Manager
How to get multiple solution
p.addcbintsol (printsol, None, 0)
p.mipoptimize ("") The solver only returns one feasible solution in the callback function then stop, how do I ask for multiple solutions ?
FICO
4 years agoCommunity Manager
Hi Yang Du,
I assume that you either work with a feasibility problem, where finding any solution would lead to immediate termination, or with an optimization problem where the first solution the solver finds happens to be an optimal one. Also in the latter case, the solver will prune the search space s.t. all potential other feasible solutions become cut off and spend the remaining time proving the optimality of the said solution. There is a way, though, how you can make the solver also consider suboptimal parts of the search space and this is by the MIPADDCUTOFF control:
https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/MIPADDCUTOFF.html
As documented, setting it to (large) negative values will enforce (large) progression steps in a sequence of incumbent solutions. By default, it is set to a small negative value, which represents minimum progress between one solution and the next.
Setting it to a POSITIVE value, however, will make the solver also accept solutions that are worse than the best one seen so far (worse by at most MIPADDCUTOFF) and might be what you are looking for in your application.
Note that of course depending on your problem it might happen that
a) the solution to your problem is unique, in which case there is simply no way to get another solution or
b) there are MANY alternative optima. In this case, you might want to set a MAXMIPSOL limit
Best regards,
Timo
Related Content
Related Content
MIP solution status
Hello, I've been using code like this to get the solution status of a MIP: case getprobstat of XPRS_OPT: status:="Optimum found" XPRS_UNF: status:="Unfinished" XPRS_INF: status:="Infeasib...5 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum3 unread comments3 unread7Views0likes3CommentsCan we manage to import multiple DTAB from a single Excel which will have multiple sheet of different DTABs.
Suppose I have two DTABs named A and B. I want to maintain a single Excel workbook containing two sheets named A and B. Whenever I need to import a DTAB, it should be retrieved from the workbook by m...0Views0likes3Comments