Originally posted by: ziczyq
Thanks Daniel!
1. I just double check, the log file is wrong, this is the correct log file:
# of variables in Benders Decompostion =1071
# of linear constraints in Benders Decompostion =2475
CPXPARAM_TimeLimit 10800
CPXPARAM_Benders_Strategy 1
Found incumbent of value 65901.789390 after 0.00 sec. (0.22 ticks)
Tried aggregator 2 times.
MIP Presolve eliminated 71 rows and 57 columns.
MIP Presolve modified 1438 coefficients.
Aggregator did 30 substitutions.
Reduced MIP has 2374 rows, 984 columns, and 7102 nonzeros.
Reduced MIP has 186 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.03 sec. (4.32 ticks)
Probing time = 0.00 sec. (4.46 ticks)
Tried aggregator 1 time.
Reduced MIP has 2374 rows, 984 columns, and 7102 nonzeros.
Reduced MIP has 186 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.03 sec. (3.85 ticks)
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
0 0 29.1765 Benders: 1 0
0 0 29.1765 Benders: 1 1
0 0 29.1765 Benders: 1 2
0 0 52.1656 Benders: 1 4
0 0 52.1656 Benders: 1 5
Tried aggregator 1 time.
MIP Presolve modified 122 coefficients.
Reduced MIP has 6 rows, 187 columns, and 719 nonzeros.
Reduced MIP has 186 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.00 sec. (0.27 ticks)
Probing time = 0.00 sec. (2.92 ticks)
Tried aggregator 1 time.
Reduced MIP has 6 rows, 187 columns, and 719 nonzeros.
Reduced MIP has 186 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.02 sec. (0.26 ticks)
Probing time = 0.01 sec. (2.92 ticks)
Clique table members: 1.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 16 threads.
Root relaxation solution time = 0.00 sec. (0.09 ticks)
* 0+ 0 655.5982 52.1656 92.04%
0 0 52.1656 4 655.5982 52.1656 9 92.04%
0 0 53.9361 2 655.5982 Cuts: 4 12 91.77%
0 0 160.4308 3 655.5982 Cuts: 6 18 75.53%
0 0 160.4308 3 655.5982 Cuts: 4 20 75.53%
0 0 162.1314 4 655.5982 MIRcuts: 2 25 75.27%
* 0+ 0 205.6418 162.1314 21.16%
Repeating presolve.
Tried aggregator 1 time.
MIP Presolve eliminated 4 rows and 148 columns.
MIP Presolve modified 214 coefficients.
Reduced MIP has 2 rows, 39 columns, and 75 nonzeros.
Reduced MIP has 38 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.02 sec. (0.61 ticks)
Probing time = 0.00 sec. (0.08 ticks)
Tried aggregator 1 time.
Reduced MIP has 2 rows, 39 columns, and 75 nonzeros.
Reduced MIP has 38 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.00 sec. (0.05 ticks)
Represolve time = 0.03 sec. (1.01 ticks)
Probing time = 0.00 sec. (0.08 ticks)
Clique table members: 1.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 16 threads.
Root relaxation solution time = 0.00 sec. (0.03 ticks)
* 0+ 0 205.6418 162.1314 21.16%
0 0 cutoff 205.6418 32 0.00%
Benders cuts applied: 2
Flow cuts applied: 1
Mixed integer rounding cuts applied: 2
Root node processing (before b&c):
Real time = 2.36 sec. (1537.09 ticks)
Parallel b&c, 16 threads:
Real time = 0.00 sec. (0.00 ticks)
Sync time (average) = 0.00 sec.
Wait time (average) = 0.00 sec.
------------
Total (root+branch&cut) = 2.36 sec. (1537.09 ticks)
Benders optimization time = 2.38 seconds
Benders objval = 205.642
2. One of my guess is the eta variable. Since eta is a continuous variable, I doubt that if CPLEX can solve the problem with mixed-integer variable in the master problem. I deleted "eta" in the model and the annotation file, and Benders did work, following my annotation and decomposing the problem into two subproblems.
3. The partition.txt file is the annotation I want. However, benders.ann is the annotation file CPLEX generated automatically. Yes, there is a mismatch. And if you take a look at the partition.txt, you will find #305 variable is with value 2. I want it in the second subproblem. While in the benders.ann, which is the automatically generated file, it is 1.
Attachment are the input array in the function:
status = CPXsetlongannotations(a->BPenv, BP, anno_idx1, CPX_ANNOTATIONOBJ_COL, cur_numcols, colidx, partition);
cur_numcols=1071
and anno_idx1 is obtain from:
status = CPXgetlongannotationindex(a->BPenv, BP, CPX_BENDERS_ANNOTATION, &anno_idx1);
I really appreciate your help. I have been stuck here for few weeks.
#CPLEXOptimizers#DecisionOptimization