Changeset 1223


Ignore:
Timestamp:
Sep 7, 2009 8:39:53 AM (10 years ago)
Author:
forrest
Message:

cbc changes

Location:
trunk/Cbc/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcHeuristicFPump.cpp

    r1221 r1223  
    13191319              //roundingObjective = newSolutionValue;
    13201320            } else {
    1321               //  roundingObjective = COIN_DBL_MAX;
     1321              roundingObjective = COIN_DBL_MAX;
    13221322            }
    13231323            model_->swapSolver(saveSolver);
  • trunk/Cbc/src/CbcModel.cpp

    r1221 r1223  
    67996799      for ( i = 0 ; i < numberCuts ; i++)
    68006800      { OsiColCut *thisCut = globalCuts_.colCutPtr(i) ;
    6801         if (thisCut->violated(cbcColSolution_)>primalTolerance) {
    6802           printf("Global cut added - violation %g\n",
    6803                  thisCut->violated(cbcColSolution_)) ;
     6801        if (thisCut->violated(cbcColSolution_)>primalTolerance||
     6802            thisCut->effectiveness()==COIN_DBL_MAX) {
     6803#ifdef CLP_INVESTIGATE
     6804          if (thisCut->violated(cbcColSolution_)>primalTolerance)
     6805            printf("Global cut added - violation %g\n",
     6806                   thisCut->violated(cbcColSolution_)) ;
     6807#endif
    68046808          whichGenerator_[numberViolated++]=-1;
    68056809#ifndef GLOBAL_CUTS_JUST_POINTERS
     
    1147011474  newCut.setGloballyValid(true);
    1147111475  newCut.mutableRow().setTestForDuplicateIndex(false);
     11476  globalCuts_.insert(newCut) ;
     11477}
     11478// Make given column cut into a global cut
     11479void
     11480CbcModel::makeGlobalCut(const OsiColCut * cut)
     11481{
     11482  OsiColCut newCut(*cut);
     11483  newCut.setGloballyValidAsInteger(2);
     11484  globalCuts_.insert(newCut) ;
     11485}
     11486// Make given column cut into a global cut
     11487void
     11488CbcModel::makeGlobalCut(const OsiColCut & cut)
     11489{
     11490  OsiColCut newCut(cut);
     11491  newCut.setGloballyValidAsInteger(2);
    1147211492  globalCuts_.insert(newCut) ;
    1147311493}
  • trunk/Cbc/src/CbcModel.hpp

    r1221 r1223  
    344344    /// Make given cut into a global cut
    345345    void makeGlobalCut(const OsiRowCut & cut);
     346    /// Make given column cut into a global cut
     347    void makeGlobalCut(const OsiColCut * cut);
     348    /// Make given column cut into a global cut
     349    void makeGlobalCut(const OsiColCut & cut);
    346350  //@}
    347351
Note: See TracChangeset for help on using the changeset viewer.