Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/2.9/Cbc/src/CbcModel.cpp

    r2193 r2165  
    70927092    if (name)
    70937093        heuristic_[where]->setHeuristicName(name) ;
    7094 #ifndef SAME_HEURISTIC_SEED
    70957094    heuristic_[where]->setSeed(987654321 + where);
    7096 #else
    7097     heuristic_[where]->setSeed(987654321);
    7098 #endif
    70997095    numberHeuristics_++ ;
    71007096}
     
    73177313            cutsToDrop = new int[currentNumberCuts] ;
    73187314            assert (currentNumberCuts + numberRowsAtContinuous_ <= lastws->getNumArtificial());
    7319             assert (currentNumberCuts <= maximumWhich_); // we will read from whichGenerator_[0..currentNumberCuts-1] below, so should have all these entries
    7320             // the above assert fails in certain situations, which indicates a bug in the code below
    7321             // as a workaround, resize whichGenerator_ to make sure we can read all entries without an invalid read from valgrind (and subsequent crash somewhere, seems so)
    7322             resizeWhichGenerator(maximumWhich_, currentNumberCuts);
    73237315            for (i = 0; i < currentNumberCuts; i++) {
    73247316                CoinWarmStartBasis::Status status =
     
    78607852        feasible = false; // pretend infeasible
    78617853    }
    7862     //#define CHECK_KNOWN_SOLUTION
    7863 #ifdef CHECK_KNOWN_SOLUTION
    7864     if (onOptimalPath && (solver_->isDualObjectiveLimitReached()||
    7865                           !feasible)) {
    7866       printf("help 1\n");
    7867     }
    7868 #endif
    78697854    /*
    78707855      NEW_UPDATE_OBJECT is defined to 0 when unthreaded (CBC_THREAD undefined), 2
     
    85558540        int numberToAdd = theseCuts.sizeRowCuts() ;
    85568541        numberNewCuts_ = lastNumberCuts + numberToAdd ;
    8557         // resize whichGenerator
    8558         resizeWhichGenerator(lastNumberCuts,numberNewCuts_);
    85598542        /*
    85608543          Now actually add the row cuts and reoptimise.
     
    85818564            if (numberToAdd > 0) {
    85828565                int i ;
    8583                 int * whichGenerator = whichGenerator_ + lastNumberCuts;
     8566                int * whichGenerator = whichGenerator_ -
     8567                  numberRowsAtContinuous_+solver_->getNumRows();
    85848568                // Faster to add all at once
    85858569                addCuts = new const OsiRowCut * [numberToAdd] ;
     
    92409224        }
    92419225        // add in any active cuts if at root node (for multiple solvers)
    9242 #ifdef CHECK_KNOWN_SOLUTION
    9243     if (onOptimalPath && (solver_->isDualObjectiveLimitReached()||
    9244                           !feasible)) {
    9245       printf("help 2\n");
    9246     }
    9247 #endif
    92489226        if (!numberNodes_) {
    92499227          for (i = 0; i < numberCutGenerators_; i++)
     
    96479625    }
    96489626#endif
    9649 #ifdef CHECK_KNOWN_SOLUTION
    9650     if (onOptimalPath && (solver_->isDualObjectiveLimitReached()||
    9651                           !feasible)) {
    9652       printf("help\n");
    9653     }
    9654 #endif
    96559627#ifdef CBC_DEBUG
    96569628    if (onOptimalPath && !solver_->isDualObjectiveLimitReached())
     
    100119983    const CoinWarmStartBasis* ws ;
    100129984    CoinWarmStartBasis::Status status ;
    10013     //#define COIN_HAS_CLP_KEEP_STATUS
    10014 #ifdef COIN_HAS_CLP_KEEP_STATUS
    10015     int problemStatus=-1;
    10016     OsiClpSolverInterface * clpSolver
    10017       = dynamic_cast<OsiClpSolverInterface *> (solver_);
    10018     if (clpSolver)
    10019       problemStatus=clpSolver->getModelPtr()->status();
    10020 #endif
    100219985    bool needPurge = true ;
    100229986    /*
     
    1017210136    }
    1017310137   
    10174 #ifdef COIN_HAS_CLP_KEEP_STATUS
    10175     // need to check further that only zero duals dropped
    10176     if (clpSolver) // status may have got to -1
    10177       clpSolver->getModelPtr()->setProblemStatus(problemStatus);
    10178 #endif
    1017910138    /*
    1018010139      Clean up and return.
     
    1399813957CbcModel::makeGlobalCut(const OsiColCut * cut)
    1399913958{
     13959  abort(); // need to think about top of tree
    1400013960  const double * lower;
    1400113961  const double * upper;
     
    1435914319            }
    1436014320        }
    14361 #ifdef CHECK_KNOWN_SOLUTION
    14362         bool onOptimalPath = false;
    14363         if ((specialOptions_&1) != 0) {
    14364           const OsiRowCutDebugger *debugger = solver_->getRowCutDebugger() ;
    14365           if (debugger) {
    14366             onOptimalPath = true;
    14367             printf("On optimal path before resolve\n") ;
    14368           }
    14369         }
    14370 #endif
    1437114321        clpSolver->resolve();
    14372 #ifdef CHECK_KNOWN_SOLUTION
    14373         if ((specialOptions_&1) != 0&&onOptimalPath) {
    14374           const OsiRowCutDebugger *debugger = solver_->getRowCutDebugger() ;
    14375           if (debugger) {
    14376             printf("On optimal path after resolve\n") ;
    14377           } else {
    14378             solver_->writeMpsNative("badSolve.mps", NULL, NULL, 2);
    14379             printf("NOT on optimal path after resolve\n") ;
    14380           }
    14381         }
    14382 #endif
    1438314322        if (!numberNodes_) {
    1438414323            double error = CoinMax(clpSimplex->largestDualError(),
Note: See TracChangeset for help on using the changeset viewer.