简体   繁体   English

将优先顺序赋予Gurobi / Cplex中的约束(线性编程)

[英]Giving Priority sequence to Constraints in Gurobi/Cplex (Linear programming)

I am working on Business Problem for factory and developing Linear programming Solution. 我正在研究工厂的业务问题,并正在开发线性编程解决方案。 problem has thousands of Constraints and variables. 问题有成千上万个约束和变量。 I want to give priority sequence to constraints so that constraints which are lower in priority can be breached if no optimum solution. 我想给约束赋予优先级顺序,以便在没有最佳解决方案的情况下可以突破优先级较低的约束。

My Question is how to Set the constraint priority sequnece for CPLEX/Gurobi Solver.I am using java as language ,Do we have any specific format/function etc? 我的问题是如何为CPLEX / Gurobi Solver设置约束优先级顺序。我使用Java作为语言,我们是否有任何特定的格式/功能等?

This is usually done at the modeling level. 这通常是在建模级别完成的。 Add slacks to the equations, and add a term to the objective that minimizes the slack using a penalty or cost coefficient. 在方程式中增加松弛度,并在目标上增加一项,以使用惩罚或成本系数将松弛度最小化。 Sometimes you can even use some dollar figures for the cost (eg storage capacity constraint: then cost is something like the price of renting extra storage space). 有时,您甚至可以用一些美元来表示成本(例如,存储容量限制:那么成本就像租用额外存储空间的价格一样)。 This process is sometimes called making the model elastic, or introducing hard and soft constraints and is quite often used in practical models. 此过程有时称为使模型具有弹性,或引入硬约束和软约束,并且在实际模型中经常使用。

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

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