0
创建LP模型后,我想分析约束以获取一些约束变量信息在gurobi中解析约束中的变量
例如,
我想找出哪些约束使用了一个特定的变量。
if I want to search for variable 'x' and the constraints used in lp are the following
c0: x + y <= 2
c1: x + z <= 5
c2: y + z <= 10
I should get c0 and c1 as the constraints that use x.
另一个原因是,我想找出哪些变量是一个限制因素是使用
if constraint is c0: x + y + z <= 2
I want to return variables x, y and z as the variables used in this constraint
我知道我能得到gurobi变量和它们的值,但一直没能找到任何关于我在这里提出的问题