简体   繁体   中英

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. I found that for a particular random example that I created, brute force checking finds 2 optimal solutions ie same objective value. Let's call them A and B. However, CPLEX only finds one of them, for example 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() . This gives me solution B but it does not find A. Are there other ways to find more than 1 optimal solutions?

Perhaps you can:

  • Find one optimal solution
  • Add a term to your objective function that penalizes that solution
  • Check to see if there's another feasible solution that matches the value (to tolerance) of the previously found optimal solution. If so, repeat.

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