cplex的冲突条件检测

检测部分代码

 1 if (cplex.RefineConflict(constraints,prefs))
2 {
3 Cplex.ConflictStatus[] conflicts = cplex.GetConflict(constraints);
4 for (int i = 0; i < conflicts.Length;i++ )
5 {
6 if (conflicts[i]==Cplex.ConflictStatus.Member)
7 System.Console.WriteLine(" Proved : " + constraints[i]);
8 else if (conflicts[i]==Cplex.ConflictStatus.PossibleMember)
9 System.Console.WriteLine(" Possible : " + constraints[i]);
10 }
11 }

  

你可能感兴趣的:(cp)