[英]Check new variable reduced cost with CPLEX
I am working on a Column Generation algorithm. 我正在研究列生成算法。 After pricing the new variables and calculating the reduced cost, how can I add the new variable and check if my calculated reduced cost is correct according to CPLEX?
在对新变量定价并计算了降低的成本之后,如何根据CPLEX来添加新变量并检查计算出的降低成本是否正确?
When I add the new variable to the model and reoptimize the RMP (Reduced Master Problem), the new variable enters basis, so its reduced cost is 0, which is ok. 当我将新变量添加到模型并重新优化RMP(精简主问题)时,新变量将作为基础,因此其精简成本为0,这是可以的。 However, I would like to check the reduced cost calculated by CPLEX before adding the variable.
但是,我想在添加变量之前检查由CPLEX计算的降低的成本。
I'm not sure which of CPLEX's many APIs you are using, but I think the approach you should use is more or less the same. 我不确定您使用的是CPLEX的许多API中的哪一个,但是我认为您应该使用的方法大致相同。 Namely, before reoptimizing the RMP, set an iteration limit of 0 and optimize the RMP with the new columns you have added.
即,在重新优化RMP之前,将迭代限制设置为0,并使用添加的新列来优化RMP。 Presumably you have the optimal basis from the previous RMP solve at that point.
在这一点上,您大概可以从先前的RMP解决方案中获得最佳的基础。 So, with an iteration limit of 0, CPLEX will not bring any of your new columns into the basis.
因此,在迭代限制为0的情况下,CPLEX不会将任何新列带入基础。 Instead they will be nonbasic, but the optimization with the iteration limit of 0 will give you CPLEX's calculation of all nonbasic reduced costs, including the ones for your newly generated columns.
相反,它们将是非基本的,但是迭代限制为0的优化将为您提供CPLEX的所有非基本减少成本的计算,包括新生成的列的成本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.