In a part of my application I have the following code:
bool result = m_cplex.solve();
IloAlgorithm::Status status = m_cplex.getStatus();
if(status == IloAlgorithm::Status::Infeasible){
double f = m_cplex.getObjValue();
std::cout << "result = " << result << "\n";
std::cout << "status = " << status << "\n";
m_cplex.exportModel("INF.lp");
std::cout << "f = " << f << "\n";
for(int i = 0; i < m_vars.getSize(); ++i){
if(m_cplex.getValue(m_vars[i]) > m_params.EPS){
std::cout << m_vars[i].getName() << ": " << m_cplex.getValue(m_vars[i]) << "\n";
}
}
IloNumArray preferences(m_env);
IloConstraintArray infeas(m_env);
for(int i = 0; i < m_con_demand.getSize(); ++i){
infeas.add(m_con_demand[i]);
}
for(int i = 0; i < m_vars.getSize(); ++i){
infeas.add(IloBound(m_vars[i], IloBound::Lower));
infeas.add(IloBound(m_vars[i], IloBound::Upper));
}
for(int i = 0; i < infeas.getSize(); ++i){
preferences.add(1.0);
}
if ( m_cplex.refineConflict(infeas, preferences) ){
IloCplex::ConflictStatusArray conflict = m_cplex.getConflict(infeas);
m_env.getImpl()->useDetailedDisplay(IloTrue);
std::cout << "Conflict :" << endl;
for (IloInt i = 0; i<infeas.getSize(); i++){
if ( conflict[i] == IloCplex::ConflictMember){
std::cout << "Proved : " << infeas[i] << "\n";
}
if(conflict[i] == IloCplex::ConflictPossibleMember){
std::cout << "Possible: " << infeas[i] << "\n";
}
}
}else{
std::cout << "Didn't refined\n";
}
}
I've attached the full output given by the above code and the exported model, but here's part of the output:
result = 0
status = Infeasible
f = 23
lam_43: 1
lam_51: 0.6
lam_63: 0.8
lam_120: 0.6
lam_154: 0.2
lam_163: 0.4
lam_165: 1.4
lam_221: 0.4
lam_276: 1
lam_285: 0.2
lam_587: 1
lam_939: 0.2
lam_964: 0.2
lam_970: 1
1) Shouldn't an exception be thrown at the getValue or getObjValue calls?
2) On the second part of the output, the conflict refiner states that constraints demand 11, 21 and 23 are proven to be on a conflict, but since lam_43 and lam_51 are not fixed to zero, how is it possible? I mean, demand_11 and demand_21 contains lam_43 while demand_23 contains lam_51. I'm not seeing the problem here.
------------------------------
Victor Hugo Rodrigues do Nascimento
------------------------------
#DecisionOptimization