简体   繁体   English

在python中使用gurobi属性进行近似优化

[英]Approximate Optimization using gurobi attributes in python

I'm trying to use python for an ILP optimization using gurobi. 我正在尝试使用python来使用gurobi进行ILP优化。 I wonder if primal-dual approximation has been implemented on gurobi and how should we use an approximation algorithm. 我想知道是否在gurobi上实现了原始对偶近似 ,我们应该如何使用近似算法。

I'm using m.optimize function and don't know which attributes to add for an approximate optimization. 我正在使用m.optimize函数,并且不知道要为近似优化添加哪些属性。

Any help will be appreciated, 任何帮助将不胜感激,
Diman 迪曼

There are several parameters you can set to use Gurobi as an approximation algorithm for mixed integer programming. 您可以设置几个参数来使用Gurobi作为混合整数编程的近似算法。 The most common ones are 最常见的是

  • MIPGap Gurobi will stop when it finds a solution within a percentage of optimal MIPGap Gurobi将在最佳百分比内找到解决方案时停止
  • TimeLimit Gurobi will stop after a certain amount of time. TimeLimit Gurobi将在一段时间后停止。
  • MIPGapAbs Gurobi will stop when if finds a solution within an absolute amount of optimal. MIPGapAbs如果在绝对最佳量内找到解决方案,Gurobi将停止。 If Gurobi does find a solution, it will always report both the solution and the best known bound. 如果Gurobi确实找到了解决方案,它将始终报告解决方案和最佳已知范围。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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