@@ -363,7 +363,7 @@ void VRP::checkMIP(bool printEps, bool printSolutionArcs,
363363 cout << " Elapsed real time: " << timer.realTime () << " s" << endl;
364364 cout << " Elapsed user time: " << timer.userTime () << " s" << endl;
365365 } else {
366- cout << " " << timer.realTime () << " " << timer.userTime () << " " << mip.solValue () << endl;
366+ cout << timer.realTime () << " \t " << timer.userTime () << " \t " << mip.solValue () << endl;
367367 }
368368
369369 if (printSolutionArcs){
@@ -1032,15 +1032,14 @@ void BranchAndPrice::printMasterLPSolution()
10321032}
10331033
10341034// /Calls createMasterLP and recursiveBranch
1035- void BranchAndPrice::branchAndBound ()
1036- {
1035+ void BranchAndPrice::branchAndBound () {
10371036 classTimer.restart ();
10381037 bestCost = BIG_VALUE;
10391038 if (PRINT) cout << " Branch and bound started: " << endl;
10401039 int branchedNodes = 0 ;
10411040 createMasterLP ();
10421041 recursiveBranch (branchedNodes);
1043- bool endedInTime= (classTimer.realTime ()<= TIME_LIMIT);
1042+ bool endedInTime = (classTimer.realTime () <= TIME_LIMIT);
10441043 classTimer.stop ();
10451044
10461045 if (PRINT) {
@@ -1054,7 +1053,8 @@ void BranchAndPrice::branchAndBound()
10541053 cout << " Number of added cols: " << cols.size () << endl;
10551054 cout << " Visited branching nodes: " << branchedNodes << endl;
10561055 } else {
1057- cout << endedInTime << " " << classTimer.realTime () << " " << classTimer.userTime () << " " << bestCost << endl;
1056+ cout << endedInTime << " \t " << classTimer.realTime () << " \t " << classTimer.userTime ();
1057+ cout << " \t " << bestCost << " \t " << flush;
10581058 }
10591059 myAssert (countArcs (g) == n * (n - 1 ), " Wrong arc count at the end of branchAndBound!" );
10601060}
@@ -1072,13 +1072,14 @@ void BranchAndPrice::recursiveBranch(int& branchedNodes)
10721072 if (PRINT) cout << " New branching node: " << branchedNodes << endl;
10731073 if (!solveMasterLPwithSmoothing ()){
10741074 return ;
1075- } else if (masterLP.primal ()>bestCost-5000 ) {
1075+ } else if (masterLP.primal ()>bestCost-OPTIMUM_DIFF ) {
10761076 if (PRINT) cout << " BOUND" << endl;
10771077 return ;
10781078 }
10791079
10801080 double vehicleNumber=masterLP.primal (vehicleNumberCol);
1081- Lp::Row tempRow=INVALID;
1081+ // Lp::Row tempRow=INVALID;
1082+ /*
10821083 if(!isWhole(vehicleNumber)){
10831084 //branch on vehicle number
10841085 tempRow=masterLP.addRow(vehicleNumberCol<=floor(vehicleNumber));
@@ -1093,6 +1094,7 @@ void BranchAndPrice::recursiveBranch(int& branchedNodes)
10931094 if(PRINT) cout << "Remove: vehicleNumberCol >= " << ceil(vehicleNumber) << endl;
10941095 masterLP.erase(tempRow);
10951096 } else {
1097+ */
10961098 // branch on arcs
10971099 ListDigraph::Arc arcToBranch = INVALID;
10981100 findArcToBranch (arcToBranch);
@@ -1181,7 +1183,7 @@ void BranchAndPrice::recursiveBranch(int& branchedNodes)
11811183 myAssert (countArcs (g) == originalArcCount, " Arc(s) vanished!" );
11821184 if (PRINT) cout << " Remove: arc =0" << endl;
11831185 }
1184- }
1186+ // }
11851187}
11861188
11871189// /If a column contains arc, than changes its objective coefficient to big value
0 commit comments