[英]How to get multiple optimal solutions for MIP in CPLEX?
I constructed a Mixed Integer LP using CPLEX Python API and also a brute force checking program (which solves an LP) using MATLAB. 我使用CPLEX Python API构建了一个Mixed Integer LP,并使用MATLAB构建了一个强力检查程序(它解决了LP)。 I found that for a particular random example that I created, brute force checking finds 2 optimal solutions ie same objective value.
我发现,对于我创建的特定随机示例,强力检查找到2个最优解,即相同的目标值。 Let's call them A and B. However, CPLEX only finds one of them, for example A.
我们称它们为A和B.但是,CPLEX只找到其中一个,例如A.
So I tried to set different values for these parameters: 所以我试着为这些参数设置不同的值:
model.parameters.mip.pool.capacity
model.parameters.mip.pool.intensity
model.parameters.mip.limits.populate
model.parameters.mip.pool.absgap
model.parameters.mip.pool.replace
and finally called model.populate_solution_pool()
. 最后调用了
model.populate_solution_pool()
。 This gives me solution B but it does not find A. Are there other ways to find more than 1 optimal solutions? 这给了我解决方案B但它没有找到A.还有其他方法可以找到超过1个最优解决方案吗?
Perhaps you can: 也许你可以:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.