简体   繁体   English

非零 降低成本:下限或上限是否有效?

[英]nonzero Reduced cost: Is lower or upper bound active?

Reduced cost give the dual variable corresponding to a box constraint of a variable as was pointed out in the related answer to this question: LP: postive reduced costs corresponding to positive variables?降低的成本给出了对应于一个变量的框约束的对偶变量,正如在这个问题的相关答案中所指出的: LP:对应于正变量的正降低成本?

How do I know whether the lower or upper bound is the active constraint?我如何知道下限或上限是活动约束? Of course, I could check whether the difference between the variable value and its bounds is smaller than some epsilon.当然,我可以检查变量值与其边界之间的差异是否小于某个 epsilon。 However, the choice of such an epsilon is unclear to me, because a model could potentially attempt to fix a variable by setting the lower bound equal to the upper bound.但是,我不清楚如何选择这样的 epsilon,因为模型可能会尝试通过将下限设置为等于上限来修复变量。 In such a case, no epsilon could unambiguously indicate which of the bounds is the active one.在这种情况下,没有 epsilon 可以明确指出哪个边界是活动边界。

Does cplex provide the information which bound is active in its C++ api? cplex 是否提供绑定在其 C++ api 中处于活动状态的信息? Does any other LP solver do so?任何其他 LP 求解器都这样做吗? Is there another trick to figure out the active bound?有没有其他技巧可以找出活动界限? Thank you.谢谢你。

To a large extent you can look at the sign.在很大程度上,您可以查看标志。 The rule for reduced costs is:降低成本的规则是:

               Basic   Non-basic-at-LB     Non-basic-at-UB      
minimization     0           >= 0               <= 0
maximization     0           <= 0               >= 0

Some problems with this:这样做的一些问题:

  • Not all solvers may follow this (especially when maximizing).并非所有求解器都可以遵循这一点(尤其是在最大化时)。
  • Degeneracy may make things difficult退化可能使事情变得困难

Most solvers will give you access to the basis status.大多数求解器都会让您访问基础状态。 Eg Cplex has BasisStatus which gives you exactly the basis status of a variable: Basic, AtLower, AtUpper or FreeOrSuperbasic.例如,Cplex 具有 BasisStatus,它可以准确地为您提供变量的基础状态:Basic、AtLower、AtUpper 或 FreeOrSuperbasic。

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

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