简体   繁体   中英

Approximate Optimization using gurobi attributes in python

I'm trying to use python for an ILP optimization using gurobi. I wonder if primal-dual approximation has been implemented on gurobi and how should we use an approximation algorithm.

I'm using m.optimize function and don't know which attributes to add for an approximate optimization.

Any help will be appreciated,
Diman

There are several parameters you can set to use Gurobi as an approximation algorithm for mixed integer programming. The most common ones are

  • MIPGap Gurobi will stop when it finds a solution within a percentage of optimal
  • TimeLimit Gurobi will stop after a certain amount of time.
  • MIPGapAbs Gurobi will stop when if finds a solution within an absolute amount of optimal. If Gurobi does find a solution, it will always report both the solution and the best known bound.

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