私は CPLEX を初めて使用し、CPLEX が満足したくない非常に単純なモデルを作成しています。他の変数と単純に等しい変数があるため、モデルが「冗長」であることはわかっていますが、これはより複雑なモデルへの最初のステップであるため、このようにしたいと考えています。なぜこれが CPLEX を動揺させるのかわかりません。
私が持っているモデルは次のとおりです。
Minimize
obj: v1
Subject To
l1: i_AB1 + i_AC1 - i_AB2 - i_AC3 = 1
l2: - i_AB1 + I_BB = 0
l3: I_CA + I_CC = 0
e5: i_AB2 + i_BD2 - I_BB = 0
e8: - i_AC1 - I_CA = 0
e9: i_AC3 + i_CD3 - I_CC = 0
\Indicator constraints
\For each connection XY
c1: bAB = 1-> i_AB1 - 1 v1 = 0
c2: bAB = 1-> i_AB2 - 1 v2 = 0
c5: bAC = 1-> i_AC1 - 1 v1 = 0
c6: bAC = 1-> i_AC3 - 1 v3 = 0
c9: bBD = 1-> i_BD2 - 1 v2 = 0
c13: bCD = 1-> i_CD3 - 1 v3 = 0
c15: bAB = 1
c16: bAC = 1
c17: bBD = 1
c18: bCD = 1
Bounds
0 <= v1 <= 1000
-1000 <= v2 <= 1000
-1000 <= v3 <= 1000
General
Binaries
bAB bAC bBD bCD
End
これには明らかに解決策がありません(解決策があるか、少なくともそれが私の意図ですが、CPLEXはノーと言っています!)。
e8
しかし、その後、方程式を代入するl3
と、必要な解が得られます! コードは次のとおりです。
Minimize
obj: v1
Subject To
\budget:
l1: i_AB1 + i_AC1 - i_AB2 - i_AC3 = 1
l2: - i_AB1 + I_BB = 0
l3: - i_AC1 + I_CC = 0
e5: i_AB2 + i_BD2 - I_BB = 0
\Row C
\e8: - i_AC1 - I_CA = 0
e9: i_AC3 + i_CD3 - I_CC = 0
\Indicator constraints
\For each connection XY
c1: bAB = 1-> i_AB1 - 1 v1 = 0
c2: bAB = 1-> i_AB2 - 1 v2 = 0
c5: bAC = 1-> i_AC1 - 1 v1 = 0
c6: bAC = 1-> i_AC3 - 1 v3 = 0
c9: bBD = 1-> i_BD2 - 1 v2 = 0
c13: bCD = 1-> i_CD3 - 1 v3 = 0
c15: bAB = 1
c16: bAC = 1
c17: bBD = 1
c18: bCD = 1
Bounds
0 <= v1 <= 1000
-1000 <= v2 <= 1000
-1000 <= v3 <= 1000
General
Binaries
bAB bAC bBD bCD
End
私の目には、どちらもまったく同じモデルです。最初のモデルには解決策があるように見えますが、2番目のモデルには解決策がありません。
ところで、解決策は次のとおりです。
Populate: phase I
Tried aggregator 2 times.
MIP Presolve eliminated 4 rows and 4 columns.
Aggregator did 11 substitutions.
All rows and columns eliminated.
Presolve time = 0.00 sec.
Populate: phase II
Solution status: 129.
Objective value of the incumbent: 1
Incumbent: Column v1: Value = 1
Incumbent: Column i_AB1: Value = 1
Incumbent: Column i_AC1: Value = 1
Incumbent: Column i_AB2: Value = 0.5
Incumbent: Column i_AC3: Value = 0.5
Incumbent: Column I_BB: Value = 1
Incumbent: Column I_CC: Value = 1
Incumbent: Column i_BD2: Value = 0.5
Incumbent: Column i_CD3: Value = 0.5
Incumbent: Column bAB: Value = 1
Incumbent: Column v2: Value = 0.5
Incumbent: Column bAC: Value = 1
Incumbent: Column v3: Value = 0.5
Incumbent: Column bBD: Value = 1
Incumbent: Column bCD: Value = 1
The solution pool contains 1 solutions.
0 solutions were removed due to the solution pool relative gap parameter.
In total, 1 solutions were generated.
The average objective value of the solutions is 1.
Solution Objective Number of variables
value that differ compared to
the incumbent
p1 1 0 / 15
問題自体はMIPでもありません(この初期バージョンでブール値を修正したため、適切なMIPになります)。これで何か変わりますか?私は本当に問題が何であるかわかりません。
ありがとう