Ignore:
Timestamp:
May 14, 2007 8:37:33 PM (12 years ago)
Author:
lou
Message:

Cbc-generic: Add message handler, separate libCbc and cbc-generic main log
level parameters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcGenOsiParamUtils.cpp

    r591 r608  
    2828    \brief Implementation functions for CbcOsiParam parameters.
    2929*/
     30
     31namespace {
     32
     33  char svnid[] = "$Id$" ;
     34
     35}
    3036
    3137namespace CbcOsiParamUtils
     
    169175void setOsiSolverInterfaceDefaults (OsiSolverInterface *osi)
    170176
    171 {
    172 
     177{ bool result ;
     178
     179/*
     180  OsiNameDiscipline isn't supported by all solvers, so check to see that it
     181  worked. If not, fall back to zero.
     182*/
    173183  osi->setIntParam(OsiMaxNumIteration,1000000) ;
    174184  osi->setIntParam(OsiMaxNumIterationHotStart,1000) ;
    175185  osi->setIntParam(OsiNameDiscipline,1) ;
     186  if (!result)
     187  { result = osi->setIntParam(OsiNameDiscipline,0) ; }
     188
    176189/*
    177190  Primal and dual feasibility tolerances (OsiPrimalTolerance and
     
    182195  osi->setDblParam(OsiObjOffset,0.0) ;
    183196
    184   (void) osi->setHintParam(OsiDoPresolveInInitial,true,OsiHintDo) ;
    185   (void) osi->setHintParam(OsiDoDualInInitial,true,OsiHintIgnore) ;
    186   (void) osi->setHintParam(OsiDoPresolveInResolve,false,OsiHintTry) ;
    187   (void) osi->setHintParam(OsiDoDualInInitial,true,OsiHintTry) ;
    188   (void) osi->setHintParam(OsiDoScale,true,OsiHintDo) ;
    189   (void) osi->setHintParam(OsiDoCrash,true,OsiHintIgnore) ;
    190   (void) osi->setHintParam(OsiDoReducePrint,true,OsiHintDo) ;
    191   (void) osi->setHintParam(OsiDoInBranchAndCut,true,OsiHintTry) ;
     197  osi->setHintParam(OsiDoPresolveInInitial,true,OsiHintDo) ;
     198  osi->setHintParam(OsiDoDualInInitial,true,OsiHintIgnore) ;
     199  osi->setHintParam(OsiDoPresolveInResolve,false,OsiHintTry) ;
     200  osi->setHintParam(OsiDoDualInInitial,true,OsiHintTry) ;
     201  osi->setHintParam(OsiDoScale,true,OsiHintDo) ;
     202  osi->setHintParam(OsiDoCrash,true,OsiHintIgnore) ;
     203  osi->setHintParam(OsiDoReducePrint,true,OsiHintDo) ;
     204  osi->setHintParam(OsiDoInBranchAndCut,true,OsiHintTry) ;
    192205
    193206  return ; }
Note: See TracChangeset for help on using the changeset viewer.