Changeset 1393 for branches/sandbox/Cbc/src
- Timestamp:
- Dec 10, 2009 7:29:38 PM (10 years ago)
- Location:
- branches/sandbox/Cbc/src
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/Cbc/src/CbcBranchDynamic.cpp
r1389 r1393 473 473 // use pseudo shadow prices modified by locks 474 474 // test testosi 475 #if 1475 #ifndef JJF_ONE 476 476 double objectiveValue = model->getCurrentMinimizationObjValue(); 477 477 double distanceToCutoff = model->getCutoff() - objectiveValue; … … 492 492 changeDown += perInf * numInfDown; 493 493 changeUp += perInf * numInfUp; 494 #if 0494 #ifdef JJF_ZERO 495 495 if (numInfDown == 1) { 496 496 if (numInfUp == 1) { -
branches/sandbox/Cbc/src/CbcCompareDefault.cpp
r1315 r1393 228 228 CbcCompareDefault::every1000Nodes(CbcModel * model, int numberNodes) 229 229 { 230 #if 0230 #ifdef JJF_ZERO 231 231 // was 232 232 if (numberNodes > 10000) -
branches/sandbox/Cbc/src/CbcCutGenerator.cpp
r1362 r1393 258 258 int numberRowCutsBefore = cs.sizeRowCuts() ; 259 259 int numberColumnCutsBefore = cs.sizeColCuts() ; 260 #if 0260 #ifdef JJF_ZERO 261 261 int cutsBefore = cs.sizeCuts(); 262 262 #endif … … 538 538 //if (!solver->basisIsAvailable()) 539 539 //returnCode=true; 540 #if 0540 #ifdef JJF_ZERO 541 541 // Pass across info to pseudocosts 542 542 char * mark = new char[numberColumns]; … … 721 721 //printf("need to remove cuts\n"); 722 722 // just add most effective 723 #if 1723 #ifndef JJF_ONE 724 724 int nDelete = nEls - nReasonable; 725 725 … … 769 769 } 770 770 } 771 #if 0771 #ifdef JJF_ZERO 772 772 int nS = n - nU; 773 773 if (numberColumns > 20000) { … … 1113 1113 numberElements_ += n; 1114 1114 } 1115 #if 01115 #ifdef JJF_ZERO 1116 1116 printf("generator %s generated %d row cuts\n", 1117 1117 generatorName_, numberRowCutsAfter - numberRowCutsBefore); … … 1121 1121 int numberColumnCutsAfter = cs.sizeColCuts() ; 1122 1122 if (numberColumnCutsBefore < numberColumnCutsAfter) { 1123 #if 01123 #ifdef JJF_ZERO 1124 1124 printf("generator %s generated %d column cuts\n", 1125 1125 generatorName_, numberColumnCutsAfter - numberColumnCutsBefore); … … 1130 1130 if (timing()) 1131 1131 timeInCutGenerator_ += CoinCpuTime() - time1; 1132 #if 01132 #ifdef JJF_ZERO 1133 1133 // switch off if first time and no good 1134 1134 if (node == NULL && !pass) { -
branches/sandbox/Cbc/src/CbcDummyBranchingObject.hpp
r1389 r1393 34 34 virtual double branch(); 35 35 36 #if 036 #ifdef JJF_ZERO 37 37 // No need to override. Default works fine. 38 38 /** Reset every information so that the branching object appears to point to -
branches/sandbox/Cbc/src/CbcFollowOn.cpp
r1357 r1393 507 507 (const CbcBranchingObject* /*brObj*/, const bool /*replaceIfOverlap*/) 508 508 { 509 #if 0//ndef NDEBUG509 #ifdef JJF_ZERO //ndef NDEBUG 510 510 const CbcFixingBranchingObject* br = 511 511 dynamic_cast<const CbcFixingBranchingObject*>(brObj); -
branches/sandbox/Cbc/src/CbcFollowOn.hpp
r1389 r1393 93 93 virtual double branch(); 94 94 95 #if 095 #ifdef JJF_ZERO 96 96 // No need to override. Default works fine. 97 97 /** Reset every information so that the branching object appears to point to -
branches/sandbox/Cbc/src/CbcHeuristic.cpp
r1357 r1393 270 270 return false; 271 271 // No longer used for original purpose - so use for ever run at all JJF 272 #if 1272 #ifndef JJF_ONE 273 273 // Don't run if hot start 274 274 if (model_ && model_->hotstartSolution()) … … 277 277 return true; 278 278 #else 279 #if 0279 #ifdef JJF_ZERO 280 280 const CbcNode* currentNode = model_->currentNode(); 281 281 if (currentNode == NULL) { … … 309 309 // LL: should we save these nodes in the list of nodes where the heur was 310 310 // LL: run? 311 #if 1311 #ifndef JJF_ONE 312 312 if (currentNode != NULL) { 313 313 // Get where we are and create the appropriate CbcHeuristicNode object … … 334 334 CbcHeuristicNode* nodeDesc = new CbcHeuristicNode(*model_); 335 335 //#ifdef PRINT_DEBUG 336 #if 1336 #ifndef JJF_ONE 337 337 const double minDistanceToRun = 1.5 * log((double)depth) / log((double)2); 338 338 #else … … 2318 2318 #ifdef NEW_ROUNDING 2319 2319 if (!returnCode) { 2320 #if 02320 #ifdef JJF_ZERO 2321 2321 // back to starting point 2322 2322 memcpy(newSolution, solution, numberColumns*sizeof(double)); -
branches/sandbox/Cbc/src/CbcHeuristic.hpp
r1286 r1393 374 374 375 375 376 #if 0376 #ifdef JJF_ZERO 377 377 /// Lower bounds of last node where the heuristic found a solution 378 378 double * lowerBoundLastNode_; -
branches/sandbox/Cbc/src/CbcHeuristicDINS.cpp
r1368 r1393 328 328 << CoinMessageEol; 329 329 if (nFix > numberIntegers / 10) { 330 #if 0330 #ifdef JJF_ZERO 331 331 newSolver->initialSolve(); 332 332 printf("obj %g\n", newSolver->getObjValue()); -
branches/sandbox/Cbc/src/CbcHeuristicDive.cpp
r1315 r1393 204 204 return 0; 205 205 206 #if 0206 #ifdef JJF_ZERO 207 207 // See if to do 208 208 if (!when() || (when() % 10 == 1 && model_->phase() != 1) || … … 448 448 #endif 449 449 if (reducedCost && true) { 450 #if 1450 #ifndef JJF_ONE 451 451 cnt = fixOtherVariables(solver, solution, candidate, random); 452 452 #else … … 911 911 { 912 912 //return 0; // temp 913 #if 1913 #ifndef JJF_ONE 914 914 if (!model_->solverCharacteristics()->reducedCostsAccurate()) 915 915 return 0; //NLP -
branches/sandbox/Cbc/src/CbcHeuristicFPump.cpp
r1364 r1393 588 588 // Tweak rhs and save 589 589 useRhs = rhs; 590 #if 0590 #ifdef JJF_ZERO 591 591 double tempValue = 60.0 * useRhs; 592 592 if (fabs(tempValue - floor(tempValue + 0.5)) < 1.0e-7 && rhs != fakeCutoff_) { … … 1232 1232 } 1233 1233 if (newNumberInfeas && newNumberInfeas < 15) { 1234 #if 01234 #ifdef JJF_ZERO 1235 1235 roundingObjective = solutionValue; 1236 1236 OsiSolverInterface * saveSolver = model_->swapSolver(solver); … … 1881 1881 if (value < newSolutionValue) { 1882 1882 //newSolver->writeMps("query","mps"); 1883 #if 01883 #ifdef JJF_ZERO 1884 1884 { 1885 1885 double saveOffset; … … 2187 2187 } 2188 2188 int numberColumns = solver->getNumCols(); 2189 #if 02189 #ifdef JJF_ZERO 2190 2190 // Do set covering variables 2191 2191 const CoinPackedMatrix * matrixByRow = solver->getMatrixByRow(); … … 2335 2335 double round = floor(value + primalTolerance); 2336 2336 if (value - round > downValue) round += 1.; 2337 #if 12337 #ifndef JJF_ONE 2338 2338 if (round < integerTolerance && cost[iColumn] < -1. + integerTolerance) flip_down++; 2339 2339 if (round > 1. - integerTolerance && cost[iColumn] > 1. - integerTolerance) flip_up++; … … 2410 2410 } 2411 2411 } 2412 #if 02412 #ifdef JJF_ZERO 2413 2413 if (largestInfeasibility > primalTolerance && numberBadRows*10 < numberRows) { 2414 2414 // Can we improve by flipping … … 2542 2542 } 2543 2543 // Now flip some integers? 2544 #if 02544 #ifdef JJF_ZERO 2545 2545 for (i = 0; i < numberIntegers; i++) { 2546 2546 int iColumn = integerVariable[i]; -
branches/sandbox/Cbc/src/CbcHeuristicFPump.hpp
r1364 r1393 282 282 */ 283 283 //@{ 284 #if 0284 #ifdef JJF_ZERO 285 285 /// Into simplex 286 286 virtual void intoSimplex(); -
branches/sandbox/Cbc/src/CbcLinked.cpp
r1286 r1393 876 876 gutsOfDestructor(true); 877 877 } 878 #if 0878 #ifdef JJF_ZERO 879 879 /* returns 880 880 sequence of nonlinear or … … 1681 1681 } 1682 1682 } 1683 #if 01683 #ifdef JJF_ZERO 1684 1684 // possibly do bounds 1685 1685 for (int iColumn = 0; iColumn < firstLambda; iColumn++) { … … 1834 1834 if (obj) { 1835 1835 if (obj->xMeshSize() < 1.0 && obj->yMeshSize() < 1.0) { 1836 #if 01836 #ifdef JJF_ZERO 1837 1837 numberContinuous++; 1838 1838 int xColumn = obj->xColumn(); … … 2326 2326 memset(r, 0, numberColumns*sizeof(double)); 2327 2327 } 2328 #if 02328 #ifdef JJF_ZERO 2329 2329 for (jNon = 0; jNon < numberNonLinearColumns; jNon++) { 2330 2330 iColumn = listNonLinearColumn[jNon]; … … 2581 2581 cbcModel->cutGenerator(6)->setTiming(true); 2582 2582 // For now - switch off most heuristics (because CglPreProcess is bad with QP) 2583 #if 12583 #ifndef JJF_ONE 2584 2584 CbcHeuristicFPump heuristicFPump(*cbcModel); 2585 2585 heuristicFPump.setWhen(13); … … 3621 3621 if (zeroObjective) { 3622 3622 cbcModel->setMaximumSolutions(1); // just getting a solution 3623 #if 03623 #ifdef JJF_ZERO 3624 3624 OsiClpSolverInterface * osiclpModel = dynamic_cast< OsiClpSolverInterface*> (cbcModel->solver()); 3625 3625 ClpSimplex * clpModel = osiclpModel->getModelPtr(); … … 3861 3861 } 3862 3862 } 3863 #if 03863 #ifdef JJF_ZERO 3864 3864 // Add an element modifier 3865 3865 void … … 4419 4419 int iColumn = members_[j]; 4420 4420 int i; 4421 #if 04421 #ifdef JJF_ZERO 4422 4422 for (i = 0; i < numberColumns; i++) { 4423 4423 if (originalColumns[i] == iColumn) … … 5276 5276 yB[0] = info->lower_[yColumn_]; 5277 5277 yB[1] = info->upper_[yColumn_]; 5278 #if 05278 #ifdef JJF_ZERO 5279 5279 if (info->lower_[1] <= 43.0 && info->upper_[1] >= 43.0) { 5280 5280 if (info->lower_[4] <= 49.0 && info->upper_[4] >= 49.0) { … … 5454 5454 assert (xyTrue - 1.0e-5 < xB[0]*y + yB[1]*x - xB[0]*yB[1]); 5455 5455 // see if all convexification constraints OK with lambda version 5456 #if 15456 #ifndef JJF_ONE 5457 5457 assert (xyLambda + 1.0e-5 > xB[0]*y + yB[0]*x - xB[0]*yB[0]); 5458 5458 assert (xyLambda + 1.0e-5 > xB[1]*y + yB[1]*x - xB[1]*yB[1]); … … 5619 5619 if (fabs(xyLambda - xyTrue) < xySatisfied_ || (xB[0] == xB[1] && yB[0] == yB[1])) { 5620 5620 // satisfied 5621 #if 05621 #ifdef JJF_ZERO 5622 5622 printf("all satisfied true %g lambda %g\n", 5623 5623 xyTrue, xyLambda); … … 5974 5974 if (yRow_ < 0) 5975 5975 yLambda = xLambda; 5976 #if 05976 #ifdef JJF_ZERO 5977 5977 if (fabs(x - xLambda) > 1.0e-4 || 5978 5978 fabs(y - yLambda) > 1.0e-4) … … 6082 6082 { 6083 6083 int i; 6084 #if 06084 #ifdef JJF_ZERO 6085 6085 for (i = 0; i < numberColumns; i++) { 6086 6086 if (originalColumns[i] == firstLambda_) … … 6200 6200 iColumn, oldLower, oldUpper); 6201 6201 #endif 6202 #if 06202 #ifdef JJF_ZERO 6203 6203 // always free up lambda 6204 6204 for (int i = firstLambda_; i < firstLambda_ + 4; i++) { … … 7223 7223 void checkQP(ClpSimplex * /*model*/) 7224 7224 { 7225 #if 07225 #ifdef JJF_ZERO 7226 7226 printf("Checking quadratic model %x\n", model); 7227 7227 if (model) { … … 7711 7711 int /*mode*/) 7712 7712 { 7713 #if 17713 #ifndef JJF_ONE 7714 7714 //#ifdef COIN_HAS_ASL 7715 7715 // matrix etc will be changed -
branches/sandbox/Cbc/src/CbcModel.cpp
r1387 r1393 595 595 const int * columnLength = matrixByCol->getVectorLengths(); 596 596 const double * solution = clpSolver->getColSolution(); 597 #if 0597 #ifdef JJF_ZERO 598 598 int nAtBound = 0; 599 599 for (int i = 0; i < numberColumns; i++) { … … 1652 1652 // Initialise solvers seed 1653 1653 clpSolver->getModelPtr()->setRandomSeed(1234567); 1654 #if 01654 #ifdef JJF_ZERO 1655 1655 // reduce factorization frequency 1656 1656 int frequency = clpSolver->getModelPtr()->factorizationFrequency(); … … 1812 1812 // already has column numbers changed 1813 1813 object_[numberObjects_] = originalObject[iObject]->clone(); 1814 #if 01814 #ifdef JJF_ZERO 1815 1815 // redo ids etc 1816 1816 CbcObject * obj = … … 2277 2277 compareActual->setBestPossible(direction*solver_->getObjValue()); 2278 2278 compareActual->setCutoff(getCutoff()); 2279 #if 02279 #ifdef JJF_ZERO 2280 2280 if (false && !numberThreads_ && !parentModel_) { 2281 2281 printf("CbcTreeArray ? threads ? parentArray\n"); … … 2531 2531 doHeuristicsAtRoot(); 2532 2532 } 2533 #if 02533 #ifdef JJF_ZERO 2534 2534 int nCuts = storedRowCuts_->sizeRowCuts(); 2535 2535 // add to global list … … 3162 3162 if (toZero[number01]) { 3163 3163 CglTreeProbingInfo info(*probingInfo_); 3164 #if 03164 #ifdef JJF_ZERO 3165 3165 /* 3166 3166 Marginal idea. Further exploration probably good. Build some extra … … 4024 4024 // Do main work of solving node here 4025 4025 doOneNode(this, node, createdNode); 4026 #if 04026 #ifdef JJF_ZERO 4027 4027 if (node) { 4028 4028 if (createdNode) { … … 6999 6999 7000 7000 { 7001 #if 07001 #ifdef JJF_ZERO 7002 7002 if (node && numberTries > 1) { 7003 7003 if (currentDepth_ < 5) … … 7516 7516 !solver_->optimalBasisIsAvailable()) { 7517 7517 //printf("XXXXYY no opt basis\n"); 7518 #if 0//def COIN_HAS_CLP7518 #ifdef JJF_ZERO//def COIN_HAS_CLP 7519 7519 //OsiClpSolverInterface * clpSolver 7520 7520 //= dynamic_cast<OsiClpSolverInterface *> (solver_); … … 7526 7526 #endif 7527 7527 resolve(node ? node->nodeInfo() : NULL, 3); 7528 #if 0//def COIN_HAS_CLP7528 #ifdef JJF_ZERO//def COIN_HAS_CLP 7529 7529 if (clpSolver) 7530 7530 clpSolver->setSpecialOptions(save); … … 7793 7793 } 7794 7794 if (violated >= 0 && feasible) { 7795 #if 07795 #ifdef JJF_ZERO 7796 7796 //winnowCuts(theseCuts); 7797 7797 // look at all cuts here … … 8230 8230 } 8231 8231 8232 #if 08232 #ifdef JJF_ZERO 8233 8233 // switch on to get all cuts printed 8234 8234 theseCuts.printCuts() ; … … 8474 8474 bool badObj = (allowZeroIterations) ? thisObj < cut_obj[0] + minimumDrop 8475 8475 : thisObj < cut_obj[CUT_HISTORY-1] + minimumDrop; 8476 #if 0// probably not a good idea8476 #ifdef JJF_ZERO // probably not a good idea 8477 8477 if (!badObj) 8478 8478 numberLastAttempts = CoinMax(0, numberLastAttempts - 1); … … 8851 8851 maximumCutPasses_ = CoinMax(maximumCutPasses_ >> 1, 1); 8852 8852 } 8853 #if 08853 #ifdef JJF_ZERO 8854 8854 } else if (currentPassNumber_ < CoinMin(CoinAbs(maximumCutPassesAtRoot_), 8)) { 8855 8855 if (whenCuts_ == 999999) { … … 8890 8890 } else { 8891 8891 // Objective changed 8892 #if 08892 #ifdef JJF_ZERO 8893 8893 if (currentPassNumber_ < CoinMin(CoinAbs(maximumCutPassesAtRoot_), 8)) { 8894 8894 if (whenCuts_ == 999999) { … … 9864 9864 } 9865 9865 } 9866 #if 09866 #ifdef JJF_ZERO 9867 9867 if (cutModifier_ && feasible && !solverCharacteristics_->solutionAddsCuts()) { 9868 9868 //double increment = getDblParam(CbcModel::CbcCutoffIncrement) ; … … 10322 10322 //assert (obj1->downShadowPrice()>0.0); 10323 10323 #define P_FACTOR 1.0 10324 #if 110324 #ifndef JJF_ONE 10325 10325 obj1->setDownShadowPrice(-P_FACTOR*obj1->downShadowPrice()); 10326 10326 obj1->setUpShadowPrice(-P_FACTOR*obj1->upShadowPrice()); … … 11226 11226 11227 11227 { 11228 #if 011228 #ifdef JJF_ZERO 11229 11229 double tol = 0 ; 11230 11230 int fathomStrict = getIntParam(CbcFathomDiscipline) ; … … 11313 11313 CoinWarmStartBasis * basis = dynamic_cast<CoinWarmStartBasis*>(saveSolver->getWarmStart()) ; 11314 11314 assert(basis != NULL); 11315 #if 0//ndef CBC_OTHER_SOLVER11315 #ifdef JJF_ZERO //ndef CBC_OTHER_SOLVER 11316 11316 for (i = 0; i < numberObjects_; i++) { 11317 11317 CbcSimpleInteger * obj = … … 11355 11355 solver_->setHintParam(OsiDoDualInInitial, true, OsiHintTry); 11356 11356 solver_->initialSolve(); 11357 #if 011357 #ifdef JJF_ZERO 11358 11358 if (solver_->isProvenOptimal()) { 11359 11359 solver_->writeMps("feasible"); … … 11507 11507 #endif 11508 11508 if ((specialOptions_&16) == 0) { 11509 #if 011509 #ifdef JJF_ZERO 11510 11510 // check without scaling 11511 11511 bool saveTakeHint; … … 11733 11733 { 11734 11734 double * solution = CoinCopyOfArray(solutionIn, solver_->getNumCols()); 11735 #if 011735 #ifdef JJF_ZERO 11736 11736 { 11737 11737 double saveOffset; … … 13132 13132 dblParam_[CbcSmallChange] = 1.0e-8; 13133 13133 } 13134 #if 013134 #ifdef JJF_ZERO 13135 13135 // Say not on optimal path 13136 13136 bool onOptimalPath = false; … … 13445 13445 } 13446 13446 stateOfSearch_ = 0; // outside chooseBranch 13447 #if 013447 #ifdef JJF_ZERO 13448 13448 if (onOptimalPath) { 13449 13449 const OsiRowCutDebugger *debugger = solver_->getRowCutDebugger() ; … … 14696 14696 if (canDelete) { 14697 14697 //nRedundantDown++; 14698 #if 114698 #ifndef JJF_ONE 14699 14699 printf("%d redundant branch down with bounds %g, %g current upper %g solution %g dj %g\n", 14700 14700 iColumn2, bounds[0], bounds[1], upper[iColumn2], solution[iColumn2], djValue); … … 14713 14713 } 14714 14714 } else if (iColumn1 >= 0 && iColumn1 != iColumn2 && (!inBetween || true) && zeroOne1 && zeroOne2 && false) { 14715 #if 114715 #ifndef JJF_ONE 14716 14716 if (true) { 14717 14717 // add in bounds … … 14739 14739 if (canDelete) { 14740 14740 //nRedundantUp++; 14741 #if 114741 #ifndef JJF_ONE 14742 14742 printf("%d redundant branch up with bounds %g, %g current lower %g solution %g dj %g\n", 14743 14743 iColumn2, bounds[0], bounds[1], lower[iColumn2], solution[iColumn2], djValue); … … 14756 14756 } 14757 14757 } else if (iColumn1 >= 0 && iColumn1 != iColumn2 && (!inBetween || true) && zeroOne1 && zeroOne2 && false) { 14758 #if 114758 #ifndef JJF_ONE 14759 14759 // add in bounds 14760 14760 newLower = bounds1[0]; … … 15144 15144 to this code block also performs this action. 15145 15145 */ 15146 #if 115146 #ifndef JJF_ONE 15147 15147 //if (numberThreads_) 15148 15148 { … … 15226 15226 otherModel->numberNodes_ = 1; //numberNodes_; 15227 15227 otherModel->numberIterations_ = numberIterations_; 15228 #if 015228 #ifdef JJF_ZERO 15229 15229 if (maximumNumberCuts_ > otherModel->maximumNumberCuts_) { 15230 15230 otherModel->maximumNumberCuts_ = maximumNumberCuts_; … … 15913 15913 --nNode; 15914 15914 walkback_[nNode]->applyBounds(iColumn, lower, upper, force); 15915 #if 015915 #ifdef JJF_ZERO 15916 15916 CbcNode * nodeLook = walkback_[nNode]->mutableOwner(); 15917 15917 if (nodeLook) { … … 16618 16618 } 16619 16619 delete [] back; 16620 #if 016620 #ifdef JJF_ZERO 16621 16621 // ** looks as if presolve needs more intelligence 16622 16622 // do presolve - for now just clp but easy to get osi interface -
branches/sandbox/Cbc/src/CbcNWay.hpp
r1389 r1393 103 103 virtual double branch(); 104 104 105 #if 0105 #ifdef JJF_ZERO 106 106 // FIXME: what do we need to do here? 107 107 /** Reset every information so that the branching object appears to point to -
branches/sandbox/Cbc/src/CbcNode.cpp
r1366 r1393 1766 1766 int numberNodes = model->getNodeCount(); 1767 1767 int saveLogLevel = model->logLevel(); 1768 #if 01768 #ifdef JJF_ZERO 1769 1769 if ((numberNodes % 500) == 0) { 1770 1770 model->setLogLevel(6); … … 1971 1971 sumInfeasibilities_ = 0.0; 1972 1972 int bestPriority = COIN_INT_MAX; 1973 #if 01973 #ifdef JJF_ZERO 1974 1974 int number01 = 0; 1975 1975 const cliqueEntry * entry = NULL; … … 2129 2129 infeasibility = 0.5 - fabs(0.5 - part); 2130 2130 } 2131 #if 02131 #ifdef JJF_ZERO 2132 2132 if (probingInfo) { 2133 2133 int iSeq = backward[iColumn]; -
branches/sandbox/Cbc/src/CbcNodeInfo.cpp
r1357 r1393 86 86 } 87 87 88 #if 088 #ifdef JJF_ZERO 89 89 // Constructor given parent 90 90 CbcNodeInfo::CbcNodeInfo (CbcNodeInfo * parent) … … 289 289 } 290 290 } 291 #if 0291 #ifdef JJF_ZERO 292 292 void 293 293 CbcNodeInfo::incrementParentCuts(CbcModel * model, int change) -
branches/sandbox/Cbc/src/CbcNodeInfo.hpp
r1357 r1393 75 75 CbcNodeInfo ( const CbcNodeInfo &); 76 76 77 #if 077 #ifdef JJF_ZERO 78 78 /** Construct with parent 79 79 … … 119 119 /// Called when number branches left down to zero 120 120 virtual void allBranchesGone() {} 121 #if 1121 #ifndef JJF_ONE 122 122 /// Increment number of references 123 123 inline void increment(int amount = 1) { -
branches/sandbox/Cbc/src/CbcSimpleInteger.cpp
r1357 r1393 229 229 //assert (numberColumns>0); 230 230 int iColumn; 231 #if 0231 #ifdef JJF_ZERO 232 232 for (iColumn = 0; iColumn < numberColumns; iColumn++) { 233 233 if (columnNumber_ == originalColumns[iColumn]) -
branches/sandbox/Cbc/src/CbcSimpleInteger.hpp
r1389 r1393 67 67 int branchState) const ; 68 68 69 #if 069 #ifdef JJF_ZERO 70 70 // No need to override. Default works fine. 71 71 /** Reset every information so that the branching object appears to point to -
branches/sandbox/Cbc/src/CbcSolver.cpp
r1392 r1393 3627 3627 case CLP_PARAM_ACTION_OUTDUPROWS: 3628 3628 dominatedCuts = true; 3629 #if 03629 #ifdef JJF_ZERO 3630 3630 if (goodModel) { 3631 3631 int numberRows = clpSolver->getNumRows(); … … 4611 4611 int testOsiOptions = parameters_[whichParam(CBC_PARAM_INT_TESTOSI, numberParameters_, parameters_)].intValue(); 4612 4612 //#ifdef COIN_HAS_ASL 4613 #if 14613 #ifndef JJF_ONE 4614 4614 // If linked then see if expansion wanted 4615 4615 { … … 5656 5656 int way = (((nodeStrategy - 1) % 1) == 1) ? -1 : +1; 5657 5657 babModel_->setPreferredWay(way); 5658 #if 05658 #ifdef JJF_ZERO 5659 5659 OsiObject ** objects = babModel_->objects(); 5660 5660 int numberObjects = babModel_->numberObjects(); … … 6121 6121 osiclp->getModelPtr()->setPerturbation(52); // try less 6122 6122 #endif 6123 #if 06123 #ifdef JJF_ZERO 6124 6124 if (osiclp->getNumCols() == 29404) { 6125 6125 void restoreSolution(ClpSimplex * lpSolver, … … 6211 6211 donor.setStoredRowCuts(NULL); 6212 6212 } 6213 #if 06213 #ifdef JJF_ZERO 6214 6214 int extra5 = parameters_[whichParam(EXTRA5, numberParameters_, parameters_)].intValue(); 6215 6215 if (extra5 > 0) { … … 6238 6238 #endif 6239 6239 #ifdef COIN_DEVELOP 6240 #if 16240 #ifndef JJF_ONE 6241 6241 { 6242 6242 int numberColumns = babModel_->getNumCols(); … … 6563 6563 } 6564 6564 } 6565 #if 06565 #ifdef JJF_ZERO 6566 6566 // See if sos so we can fix 6567 6567 OsiClpSolverInterface * osiclp = dynamic_cast< OsiClpSolverInterface*> (saveSolver); -
branches/sandbox/Cbc/src/CbcSolverHeuristics.cpp
r1386 r1393 45 45 crunchIt(ClpSimplex * model) 46 46 { 47 #if 047 #ifdef JJF_ZERO 48 48 model->dual(); 49 49 #else … … 1137 1137 int numberParameters_,int noPrinting_,int initialPumpTune) 1138 1138 { 1139 #if 0//NEW_STYLE_SOLVER==01139 #ifdef JJF_ZERO //NEW_STYLE_SOLVER==0 1140 1140 CbcOrClpParam * parameters_ = parameters; 1141 1141 int numberParameters_ = numberParameters; … … 1355 1355 } 1356 1356 if (useRENS >= kType && useRENS <= kType + 1) { 1357 #if 11357 #ifndef JJF_ONE 1358 1358 CbcHeuristicRENS heuristic6(*model); 1359 1359 heuristic6.setHeuristicName("RENS"); … … 1477 1477 anyToDo = true; 1478 1478 } 1479 #if 01479 #ifdef JJF_ZERO 1480 1480 if (usePivotC >= type && usePivotC <= kType + 1) { 1481 1481 CbcHeuristicPivotAndComplement heuristic(*model); … … 1552 1552 if (type == 2 && anyToDo) { 1553 1553 // Do heuristics 1554 #if 11554 #ifndef JJF_ONE 1555 1555 // clean copy 1556 1556 CbcModel model2(*model); -
branches/sandbox/Cbc/src/CbcStrategy.cpp
r1387 r1393 296 296 if (!found) 297 297 model.addHeuristic(&heuristic1); 298 #if 0298 #ifdef JJF_ZERO 299 299 // Allow join solutions 300 300 CbcHeuristicLocal heuristic2(model); … … 863 863 model.addCutGenerator(&mixedGen, setting, "MixedIntegerRounding2"); 864 864 } 865 #if 0865 #ifdef JJF_ZERO 866 866 // Say we want timings 867 867 int newNumberGenerators = model.numberCutGenerators(); … … 952 952 cglProbing->setRowCuts(3); 953 953 } 954 #if 0954 #ifdef JJF_ZERO 955 955 CglGomory * cglGomory = dynamic_cast<CglGomory *>(generator); 956 956 if (cglGomory) { -
branches/sandbox/Cbc/src/CbcSubProblem.cpp
r1357 r1393 220 220 numberChangedBounds_, what); 221 221 } 222 #if 0222 #ifdef JJF_ZERO 223 223 if ((what&2) != 0) { 224 224 OsiClpSolverInterface * clpSolver -
branches/sandbox/Cbc/src/CbcTree.cpp
r1342 r1393 239 239 } 240 240 if (!best || best->objectiveValue() >= cutoff) { 241 #if 0241 #ifdef JJF_ZERO 242 242 // take off 243 243 std::pop_heap(nodes_.begin(), nodes_.end(), comparison_); … … 463 463 } 464 464 465 #if 0// not used, referenced removed in CbcModel.cpp465 #ifdef JJF_ZERO // not used, referenced removed in CbcModel.cpp 466 466 CbcTreeArray::CbcTreeArray() 467 467 : CbcTree(), … … 869 869 x->nodeInfo()->numberBranchesLeft(),x->nodeInfo()->numberPointingToThis());*/ 870 870 assert(x->objectiveValue() != COIN_DBL_MAX && x->nodeInfo()); 871 #if 0871 #ifdef JJF_ZERO 872 872 nodes_.push_back(x); 873 873 push_heap(nodes_.begin(), nodes_.end(), comparison_); … … 881 881 CbcTree::pop() 882 882 { 883 #if 0883 #ifdef JJF_ZERO 884 884 std::pop_heap(nodes_.begin(), nodes_.end(), comparison_); 885 885 nodes_.pop_back(); … … 916 916 } 917 917 if (!best || best->objectiveValue() >= cutoff) { 918 #if 0918 #ifdef JJF_ZERO 919 919 // take off 920 920 std::pop_heap(nodes_.begin(), nodes_.end(), comparison_); … … 956 956 } else if (best) { 957 957 // take off 958 #if 0958 #ifdef JJF_ZERO 959 959 std::pop_heap(nodes_.begin(), nodes_.end(), comparison_); 960 960 nodes_.pop_back(); -
branches/sandbox/Cbc/src/CbcTree.hpp
r1343 r1393 166 166 */ 167 167 168 #if 0// not used168 #ifdef JJF_ZERO // not used 169 169 class CbcTreeArray : public CbcTree { 170 170 -
branches/sandbox/Cbc/src/CbcTreeLocal.cpp
r1361 r1393 10 10 #include "OsiRowCutDebugger.hpp" 11 11 #include <cassert> 12 #if 012 #ifdef JJF_ZERO 13 13 // gdb doesn't always put breakpoints in this virtual function 14 14 // just stick xxxxxx() where you want to start -
branches/sandbox/Cbc/src/Cbc_ampl.cpp
r1361 r1393 159 159 // strdup used to avoid g++ compiler warning 160 160 static SufDecl suftab[] = { 161 #if 0161 #ifdef JJF_ZERO 162 162 { const_cast<char*>("current"), 0, ASL_Sufkind_con | ASL_Sufkind_outonly }, 163 163 { const_cast<char*>("current"), 0, ASL_Sufkind_var | ASL_Sufkind_outonly }, … … 182 182 { const_cast<char*>("sstatus"), 0, ASL_Sufkind_con, 0 }, 183 183 { const_cast<char*>("upPseudocost"), 0, ASL_Sufkind_var | ASL_Sufkind_real } 184 #if 0184 #ifdef JJF_ZERO 185 185 { const_cast<char*>("unbdd"), 0, ASL_Sufkind_var | ASL_Sufkind_outonly}, 186 186 { const_cast<char*>("up"), 0, ASL_Sufkind_con | ASL_Sufkind_outonly }, … … 525 525 /* all slack basis */ 526 526 // leave status for output */ 527 #if 0527 #ifdef JJF_ZERO 528 528 free(info->rowStatus); 529 529 info->rowStatus = NULL; … … 785 785 } 786 786 } 787 #if 0787 #ifdef JJF_ZERO 788 788 static real 789 789 qterm(ASL *asl, fint *colq, fint *rowq, real *delsq) … … 893 893 if (nsos) { 894 894 abort(); 895 #if 0895 #ifdef JJF_ZERO 896 896 info->numberSos = nsos; 897 897 info->sosType = (char *) malloc(nsos); … … 976 976 /* all slack basis */ 977 977 // leave status for output */ 978 #if 0978 #ifdef JJF_ZERO 979 979 free(rowStatus); 980 980 rowStatus = NULL; … … 1346 1346 continue; 1347 1347 } 1348 #if 01348 #ifdef JJF_ZERO 1349 1349 printf("%d quadratic els\n", nels); 1350 1350 for (int j = 0; j < n_var; j++) { -
branches/sandbox/Cbc/src/unitTestClp.cpp
r1361 r1393 306 306 clpMatrix->makeSpecialColumnCopy(); 307 307 } 308 #if 0308 #ifdef JJF_ZERO 309 309 if (clpMatrix) { 310 310 int numberRows = clpMatrix->getNumRows(); … … 436 436 std::cout << "Largest (scaled) away from bound " << largestScaled 437 437 << " unscaled " << largest << std::endl; 438 #if 0438 #ifdef JJF_ZERO 439 439 modelC->setDualBound(CoinMax(1.0001e8, 440 440 CoinMin(1000.0*largestScaled, 1.00001e10)));
Note: See TracChangeset
for help on using the changeset viewer.