Ignore:
Timestamp:
Nov 3, 2006 2:31:19 PM (13 years ago)
Author:
pbonami
Message:

Update FP code

Location:
branches/devel/Bonmin/src
Files:
2 added
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/devel/Bonmin/src/Apps/Makefile.am

    r93 r105  
    2626libbonmin_la_LIBADD = \
    2727        ../CbcBonmin/libbonminbb.la \
    28         ../OaInterface/liboainterface.la \
     28        ../OaAlgorithms/liboainterface.la \
    2929        ../Interfaces/libbonmininterfaces.la
    3030
  • branches/devel/Bonmin/src/Apps/Makefile.in

    r93 r105  
    7777LTLIBRARIES = $(lib_LTLIBRARIES)
    7878libbonmin_la_DEPENDENCIES = ../CbcBonmin/libbonminbb.la \
    79         ../OaInterface/liboainterface.la \
     79        ../OaAlgorithms/liboainterface.la \
    8080        ../Interfaces/libbonmininterfaces.la
    8181am_libbonmin_la_OBJECTS =
     
    349349libbonmin_la_LIBADD = \
    350350        ../CbcBonmin/libbonminbb.la \
    351         ../OaInterface/liboainterface.la \
     351        ../OaAlgorithms/liboainterface.la \
    352352        ../Interfaces/libbonmininterfaces.la
    353353
  • branches/devel/Bonmin/src/CbcBonmin/Makefile.am

    r98 r105  
    3131# "cygpath" stuff is necessary to compile with native compilers on Windows
    3232AM_CPPFLAGS = \
    33         -I`$(CYGPATH_W) $(srcdir)/../OaInterface` \
     33        -I`$(CYGPATH_W) $(srcdir)/../OaAlgorithms` \
    3434        -I`$(CYGPATH_W) $(srcdir)/../Interfaces` \
    3535        -I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ipopt` \
  • branches/devel/Bonmin/src/CbcBonmin/Makefile.in

    r98 r105  
    330330# Here list all include flags, relative to this "srcdir" directory.  This
    331331# "cygpath" stuff is necessary to compile with native compilers on Windows
    332 AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../OaInterface` \
     332AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../OaAlgorithms` \
    333333        -I`$(CYGPATH_W) $(srcdir)/../Interfaces` -I`$(CYGPATH_W) \
    334334        $(srcdir)/../Interfaces/Ipopt` -I`$(CYGPATH_W) \
  • branches/devel/Bonmin/src/Interfaces/BonOsiTMINLPInterface.hpp

    r98 r105  
    745745   */
    746746  //@{
    747   void turnOffIpoptOutput();
    748   void turnOnIpoptOutput();
     747  void turnOffSolverOutput(){
     748  app_->turnOffOutput();}
     749  void turnOnSolverOutput(){
     750  app_->turnOnOutput();}
    749751  //@}
    750752
  • branches/devel/Bonmin/src/OaAlgorithms/BonOACutGenerator2.cpp

    r67 r105  
    271271    // this information is stored in babInfo
    272272    OsiBabSolver * babInfo = dynamic_cast<OsiBabSolver *> (si.getAuxiliaryInfo());
    273 #if 1
     273#if 0
    274274    //if algorithms would converge this should never happen and it seems very dangerous if somebody forgot to reset the bound
    275275    if (babInfo)
     
    335335    bool milpOptimal = 1;
    336336
    337 #ifdef NO_NULL_SI
     337#if 0
    338338    if (si_ == NULL) {
    339339      std::cerr<<"Error in cut generator for outer approximation no lp solver interface assigned"<<std::endl;
     
    416416    }
    417417    else {
    418 #ifdef NO_NULL_SI
     418#if 1
    419419      throw CoinError("Not allowed to modify si in a cutGenerator",
    420420          "OACutGenerator2","generateCuts");
     
    866866    delete strategy;
    867867}
     868
     869CbcModel *
     870OACutGenerator2::setupNewCbc(OsiClpSolverInterface *clp,
     871                             CbcStrategy * strategy,
     872                             double cutoff){
     873          OsiBabSolver empty;
     874        CbcModel * model = new CbcModel(*clp); // which clones
     875        OAModel = model;
     876        model->solver()->setAuxiliaryInfo(&empty);
     877
     878        //Change Cbc messages prefixes
     879        strcpy(model->messagesPointer()->source_,"OaCbc");
     880
     881        if (!strategy)
     882          strategy = new CbcStrategyDefault(1,0,0,subMilpLogLevel_);
     883
     884        clp->resolve();
     885        model->setLogLevel(subMilpLogLevel_);
     886        model->solver()->messageHandler()->setLogLevel(0);
     887        model->setStrategy(*strategy);
     888        model->setMaximumNodes(localSearchNodeLimit_);
     889        model->setMaximumSeconds(maxLocalSearchTime_ + timeBegin_ - CoinCpuTime());
     890        model->setCutoff(cutoff);
     891        return model;
    868892}
     893}/* End namespace Bonmin. */
  • branches/devel/Bonmin/src/OaAlgorithms/BonOACutGenerator2.hpp

    r62 r105  
    1919
    2020#include "CoinTime.hpp"
     21
     22class OsiClpSolverInterface;
    2123
    2224namespace Bonmin
     
    9193      return nSolve_;
    9294    }
     95
    9396    /// Set value for cutoff increment
    9497    void setcbcCutoffIncrement (double value)
     
    138141      subMilpLogLevel_ = value;
    139142    }
     143
     144  protected:
     145    ///Setup a new instance of Cbc with correct parameters
     146    CbcModel * setupNewCbc(OsiClpSolverInterface *clp,
     147                           CbcStrategy * strategy,
     148                           double cutoff);
     149
    140150  private:
    141151    /// Set the node limit to the interface
  • branches/devel/Bonmin/src/OaAlgorithms/Makefile.in

    r83 r105  
    4747@COIN_HAS_CPX_TRUE@     -I`$(CYGPATH_W) $(CPXINCDIR)`
    4848
    49 subdir = src/OaInterface
     49subdir = src/OaAlgorithms
    5050DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
    5151ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    357357          esac; \
    358358        done; \
    359         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/OaInterface/Makefile'; \
     359        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/OaAlgorithms/Makefile'; \
    360360        cd $(top_srcdir) && \
    361           $(AUTOMAKE) --foreign  src/OaInterface/Makefile
     361          $(AUTOMAKE) --foreign  src/OaAlgorithms/Makefile
    362362.PRECIOUS: Makefile
    363363Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Note: See TracChangeset for help on using the changeset viewer.