简体   繁体   English

SCIP,分行和价格

[英]SCIP and Branch and Price

I have a general question about SCIP. 我对SCIP有一个一般性的问题。 I need to use the SCIP as a Branch and Price framework for my problem, I code in c++ so I used the VRP example as a template. 对于我的问题,我需要使用SCIP作为“分支和价格”框架,我使用c ++编写代码,因此我将VRP示例用作模板。 On some of the instances, the code stops at the fractional solution and returns that as a optimal solution, I think something is wrong, do I have to set some parameters in order to tell SCIP look for integer solution or I made a mistake, I believe it should not stop and instead branch on the fractional solution until it reaches the integer solution (without any other negative reduced cost column). 在某些情况下,代码停在小数解并返回为最优解,我认为有些问题,我是否必须设置一些参数才能告诉SCIP寻找整数解,否则我就犯了一个错误,相信它不应该停止,而应该在分数解上分支,直到达到整数解(没有任何其他负的降低成本的列)。 I also solve the subproblem optimally! 我也可以最佳地解决子问题! any commenets?! 有没有推荐?

If you define your variables to be continous and just add a pricer, SCIP will solve the master problem to optimality (ie, solve the restricted master, add improving columns, solve the updated restricted master, and so on, until no more improving columns were found). 如果将变量定义为连续变量并仅添加一个定价器,则SCIP可以将主问题解决为最优(即,解决受限主问题,添加改进列,解决更新后的受限主问题,依此类推,直到不再有改进列)找到)。

There is no reason for SCIP to check if the solution is integral, because you explicitly said that you don't mind whether the values of the variables are integral or not (by defining them to be continuous). SCIP没有理由检查解决方案是否为整数,因为您明确表示您不介意变量的值是否为整数(通过将它们定义为连续的)。 On the other hand, if you define the variables to be of integral (or binary) type, SCIP will do exactly as I described before, but at the end check whether all integral variables have an integral value and branch if this is not the case. 另一方面,如果将变量定义为整数(或二进制)类型,则SCIP将完全按照我之前的描述进行操作,但是最后检查所有整数变量是否都具有整数值,如果不是,则分支。

However, you should note that all branching rules in SCIP do branching on variables, ie, they take an integer variable with fractional value and split its domain; 但是,您应该注意,SCIP中的所有分支规则都对变量进行分支,即,它们采用带小数值的整数变量并拆分其域。 a binary variable would be fixed to 0 and 1 in the two child nodes. 在两个子节点中,二进制变量将固定为0和1。 This is typically a bad idea for branch-and-price: first of all, it's quite unbalanced. 对于分支机构和价格而言,这通常是个坏主意:首先,它非常不平衡。 You have a huge number of variables out of which only few will have value 1 in the end, most will be 0. Fixing a variable to 1 therefore has a high impact, while fixing it to 0 has almost no impact. 您有大量的变量,最后只有几个变量的值为1,大多数变量的值为0。因此,将变量固定为1的影响很大,而将变量固定为0几乎没有影响。 But more importantly, you need to take the branching decision into account in your pricing problem. 但更重要的是,您需要在定价问题中考虑分支决策。 If you fixed a variable to 0, you have to keep the pricer from generating a copy of the forbidden column (which would probably improve the LP solution, because it was part of the former optimal solution). 如果将变量固定为0,则必须防止定价器生成禁止列的副本(这可能会改善LP解决方案,因为它是以前的最佳解决方案的一部分)。 In order to to this, you might need to look for the 2nd (or later k)-best solution. 为此,您可能需要寻找第二(或更高的k)最佳解决方案。 Since you are solving the pricing problems as a MIP with SCIP, you might just add a constraint forbidding this solution (logicor (linear) for binary variables or bounddisjunction (not linear) for general integer variables). 由于您正在通过SCIP解决作为MIP的定价问题,因此您可能只需添加禁止此解决方案的约束(对于二进制变量使用逻辑(线性)或对于一般整数变量使用有界分离(非线性))。

I would recommend to implement your own branching rule, which takes into account that you are doing branch-and-price and branches in a way that is more balanced and does not harm your pricing too much. 我建议您实施自己的分支规则,该规则应考虑到您在进行分支和定价以及分支的方式更加平衡,并且不会对定价造成太大的影响。 For an example, check out the Ryan&Foster branching rule, which is the standard for binary problems with a set-partitioning master structure. 例如,查看Ryan&Foster分支规则,这是使用集分区主结构进行二进制问题的标准。 This rule is implemented in Binpacking as well as the Coloring example shipped with SCIP. 此规则在装箱以及SCIP附带的着色示例中实现。

Please also check out the SCIP FAQ, where there is a whole section about branch-and-price which also covers the topic branching (in particular, how branching decisions can be stored and enforced by a constraint handler, which is something you need to do for Ryan&Foster branching): http://scip.zib.de/doc/html/FAQ.php 另请参阅SCIP常见问题,其中有关于分支和价格的整个部分,还涵盖了分支主题(尤其是约束处理程序如何存储和实施分支决策,这是您需要做的事情) (用于Ryan&Foster分支): http : //scip.zib.de/doc/html/FAQ.php

There were also a lot of questions about branch-and-price on the SCIP mailing list http://listserv.zib.de/mailman/listinfo/scip/ . 在SCIP邮件列表http://listserv.zib.de/mailman/listinfo/scip/上,还有很多关于分支和价格的问题。 If you want to search it, you can use google and search for "site:listserv.zib.de scip search-string" 如果要搜索,可以使用google并搜索“ site:listserv.zib.de scip搜索字符串”

Finally, I would like to recommend to have a look at the GCG project: http://www.or.rwth-aachen.de/gcg/ It is an extension of SCIP to a generic branch-cut-and-price solver, ie, you do not need to implement anything, you just put in an original formulation of your model, which is then reformulated by a Dantzig-Wolfe decomposition and solved via branch-cut-and-price. 最后,我想建议您看一下GCG项目: http : //www.or.rwth-aachen.de/gcg/这是SCIP扩展到通用的“分支降价”解决方案,也就是说,您无需执行任何操作,只需输入模型的原始公式,然后通过Dantzig-Wolfe分解将其重新公式化,然后通过“分支割价”进行求解。 You can supply the structure for the reformulation, pricing problems are solved as a MIP (as you do it also), and there are also different branching rules. 您可以提供重新构造的结构,可以通过MIP解决定价问题(您也可以这样做),并且还有不同的分支规则。 GCG is also part of the SCIP optimization suite and can be easily built within the suite. GCG也是SCIP优化套件的一部分,可以在套件中轻松构建。

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

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