主要内容

调整整数线性编程

Change Options to Improve the Solution Process

笔记

Often, you can change the formulation of a MILP to make it more easily solvable. For suggestions on how to change your formulation, see Williams[1]

跑后intlinprog.有一次,您可能希望更改一些选项并重新运行它。您可能想要查看的更改包括:

  • 较低的运行时间

  • 较低的最终目标函数值(更好的解决方案)

  • Smaller final gap

  • 更多或不同的可行点

以下是最有可能帮助解决方案过程的选项变更的一般性建议。按此顺序尝试建议:

  1. 为了更快,更准确的解决方案,增加削减选项从其默认值10.到较高的数字,如25.。这可以加快解决方案,但也可以慢速速度。

  2. For a faster and more accurate solution, change theCutGenerationoption to'intermediate'or'先进的'。这可以加快解决方案,但可以使用更多的内存,并且可以减慢解决方案。

  3. For a faster and more accurate solution, change theintegerpreprocess.option to'先进的'。这可以对解决方案过程具有很大的影响,无论是有益的还是没有。

  4. For a faster and more accurate solution, change the根血管算法option to'primal-simplex'。通常这种变化不是有益的,但偶尔可以。

  5. To try to find more or better feasible points, increase theheuristicsmaxnodes.选项从其默认值50.到较高的数字,如10.0

  6. To try to find more or better feasible points, change the启发式选项任职'intermediate'or'先进的'

  7. To try to find more or better feasible points, change theBranchrule.option to'strongpscost'或者,如果该选择无法改善解决方案,'maxpscost'

  8. 对于更快的解决方案,增加客导性实践管理技术选项从其默认值为零到正值,例如1E-4。但是,这种变化会导致intlinprog.找到更少的整数可行点或更准确的解决方案。

  9. 要尝试更快地阻止求解器,改变RelativeGapTolerance选项比默认值更高的值1E-4。同样,要尝试获得更准确的答案,改变RelativeGapTolerance值较低的值。这些变化并不总是提高结果。

一些“整数”解决方案不是整数金宝搏官方网站

通常,解决方案的一些据说是整数的整数组件x(intcon)不是整数。intlinprog.认为整数内部的所有解决方案值IntegerTolerance整数。

要舍入所有假设的整数是精确整数,请使用round功能。

x(intcon)= round(x(intcon));

警告

Rounding can cause solutions to become infeasible. Check feasibility after rounding:

最大(a * x  -  b)%看条目是否不太积极,所以有很小的不可行性max(abs(aeq * x  -  beq))%看条目是否足够零max(x  -  ub)%阳性条目是违规的max(lb  -  x)%阳性条目是违规的

大型组件不是重量的整数

intlinprog.does not enforce that solution components be integer valued when their absolute values exceed2.1E9。当您的解决方案有这样的组件时,intlinprog.警告你。如果收到此警告,请检查解决方案以查看解决方案的备注整数组件是否靠近整数。

大量系数不允许

intlinprog.does not allow components of the problem, such as coefficients inF一种, 要么UB., 超过1E15绝对值。如果你试着运行intlinprog.有这样的问题,intlinprog.发出错误。

如果您收到此错误,有时您可以扩展问题以具有较小的系数:

  • 对于系数F这太大了,尝试乘法Fby a small positive scaling factor.

  • For constraint coefficients that are too large, try multiplying all bounds and constraint matrices by the same small positive scaling factor.

References

[1]威廉姆斯,H.保罗。数学编程模型建设,第五版。Wiley,2013。