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變量和它們的值,但一直沒能找到任何關於我在這裏提出的問題