Originally posted by: A.Omidi
Dear Daniel,
According to your question, it has been mentioned at the CPLEX12.8 user manual and "https://www.ibm.com/support/knowledgecenter/ru/SSSA5P_12.7.1/ilog.odms.cplex.help/refjavacplex/html/ilog/cplex/IloCplex.FlowMIRCutInfoCallback.html".
I did not get any deprecation warning while compiled code. (I'm using CPLEX12.8 Java Lib on the Eclipse IDE).
As per your comment, I changed the code as below:
static class MIRCuts extends IloCplex.FlowMIRCutInfoCallback {
MIRCuts(IloCplex model) {
}
public void main() throws IloException {
int mircuts = IloCplex.CutType.MIR;
int cliques = IloCplex.CutType.CliqueCover;
int Benders = IloCplex.CutType.Benders;
int Covers = IloCplex.CutType.Cover;
int Fracs = IloCplex.CutType.Frac;
System.out.println("NBmircuts: " + mircuts);
System.out.println("NBcliques: " + cliques);
System.out.println("NBbenders: " + Benders);
System.out.println("NBCovers: " + Covers);
System.out.println("NBFracs: " + Fracs);
}
}
When I run the code CPLEX log is mentioned:
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
* 0+ 0 0.0000 54.0000 ---
0 0 31.0000 2 0.0000 31.0000 4 ---
* 0+ 0 29.0000 31.0000 6.90%
NBmircuts: 5
NBcliques: 3
NBbenders: 21
NBCovers: 0
NBFracs: 4
NBmircuts: 5
NBcliques: 3
NBbenders: 21
NBCovers: 0
NBFracs: 4
0 0 cutoff 29.0000 4 ---
Elapsed time = 0.02 sec. (0.04 ticks, tree = 0.01 MB, solutions = 2)
Root node processing (before b&c):
Real time = 0.02 sec. (0.04 ticks)
Sequential b&c:
Real time = 0.00 sec. (0.00 ticks)
------------
Total (root+branch&cut) = 0.02 sec. (0.04 ticks)
------------------------
Objectiv value: 29.0
------------------------
I Have some questions about that.
1) Why does CPLEX show NB cuts twice?
2) Does CPLEX use benders cut automatically on any MIP? (In my case 21 cuts. I have been thinking that it's only used to benders decomposition).
3) I was wondering if, you could tell me, how can I find any update reference to callbacks type and example of implementing them?
Regards
#CPLEXOptimizers#DecisionOptimization