优化中的条件约束 [英] conditional constraint in optimization

查看:200
本文介绍了优化中的条件约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,有人知道如何在混合整数编程中编写条件约束:

Does anybody know how to write conditional constraint in mixed integer programming for this case:

if a == 0 then b = 1
else b = 0
-M <= a <= M
b={0,1}

注意M可以是任何连续数字。
谢谢。

Note that M can be any continuous number. Thanks.

问候,

推荐答案

我会如下所述。首先使用变量拆分方法,引入两个非负变量 aplus,amin

I would approach this as follows. First use a variable splitting approach by introducing two non-negative variables aplus, amin:

0 <= aplus <= d*M
0 <= amin <= (1-d)*M
a = aplus-amin
d in {0,1}

现在我们可以这样做:

0.001*(1-b) <= aplus + amin <= M*(1-b)

在许多情况下,我们可以简化这一过程,但这需要了解模型的其余部分。

In many cases we can simplify this but that requires knowledge of the rest of the model.

这篇关于优化中的条件约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆