Changeset 133


Ignore:
Timestamp:
May 13, 2009 6:39:29 PM (13 years ago)
Author:
pbelotti
Message:

avoid aborting when Ipopt fails

Location:
trunk/Couenne/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/bound_tightening/Makefile.am

    r102 r133  
    3737        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
    3838        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src`  \
     39        -I`$(CYGPATH_W) $(BONMINSRCDIR)/src/Interfaces` \
    3940        -I`$(CYGPATH_W) $(BONMINOBJDIR)/inc` \
    4041        -I`$(CYGPATH_W) $(BONMINSRCDIR)/src/Interfaces` \
  • trunk/Couenne/src/bound_tightening/Makefile.in

    r102 r133  
    302302# "cygpath" stuff is necessary to compile with native compilers on Windows
    303303AM_CPPFLAGS = -I`$(CYGPATH_W) $(CGLSRCDIR)/src` -I`$(CYGPATH_W) \
    304         $(COINUTILSSRCDIR)/src` -I`$(CYGPATH_W) $(BONMINOBJDIR)/inc` \
    305         -I`$(CYGPATH_W) $(BONMINSRCDIR)/src/Interfaces` \
    306         -I`$(CYGPATH_W) $(BONMINSRCDIR)/src/Algorithms/OaGenerators` \
    307         -I`$(CYGPATH_W) $(COINUTILSOBJDIR)/inc` -I`$(CYGPATH_W) \
     304        $(COINUTILSSRCDIR)/src` -I`$(CYGPATH_W) \
     305        $(BONMINSRCDIR)/src/Interfaces` -I`$(CYGPATH_W) \
     306        $(BONMINOBJDIR)/inc` -I`$(CYGPATH_W) \
     307        $(BONMINSRCDIR)/src/Interfaces` -I`$(CYGPATH_W) \
     308        $(BONMINSRCDIR)/src/Algorithms/OaGenerators` -I`$(CYGPATH_W) \
     309        $(COINUTILSOBJDIR)/inc` -I`$(CYGPATH_W) \
    308310        $(OSISRCDIR)/src/OsiClp` -I`$(CYGPATH_W) $(IPOPTOBJDIR)/inc` \
    309311        -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Common` -I`$(CYGPATH_W) \
  • trunk/Couenne/src/bound_tightening/aggressiveBT.cpp

    r131 r133  
    66 *          bounds/infeasibility
    77 *
    8  * (C) Carnegie-Mellon University, 2007-08.
     8 * (C) Carnegie-Mellon University, 2007-09.
    99 * This file is licensed under the Common Public License (CPL)
    1010 */
    1111
     12#include "BonTNLPSolver.hpp"
     13#include "BonNlpHeuristic.hpp"
    1214#include "CoinHelperFunctions.hpp"
    1315#include "BonCouenneInfo.hpp"
     
    115117    nlp -> setColSolution (Y);
    116118
    117     nlp -> initialSolve ();
    118 
     119    try {
     120      nlp -> initialSolve ();
     121    }
     122    catch (Bonmin::TNLPSolver::UnsolvedError *E) {
     123    }
     124   
    119125    delete [] Y;
    120126    delete [] lower;
  • trunk/Couenne/src/main/BonCouenneInterface.cpp

    r115 r133  
    126126    }
    127127
    128     if (is_feasible)
    129       initialSolve ();
     128    if (is_feasible) {
     129      try {
     130        initialSolve ();
     131      }
     132      catch(TNLPSolver::UnsolvedError *E) {
     133      }
     134    }
    130135    else {
    131136      OsiAuxInfo * auxInfo = si.getAuxiliaryInfo ();
     
    204209            setColSolution (Y); // use initial solution given
    205210
    206             resolve (); // solve with integer variables fixed
     211            try {
     212              resolve (); // solve with integer variables fixed
     213            }
     214            catch(TNLPSolver::UnsolvedError *E) {
     215            }
     216
     217            //resolve ();
    207218
    208219            obj      = getObjValue ();
  • trunk/Couenne/src/main/BonNlpHeuristic.cpp

    r115 r133  
    280280
    281281      // apply NLP solver /////////////////////////////////
    282       nlp_ -> initialSolve ();
     282      try {
     283        nlp_ -> initialSolve ();
     284      }
     285      catch (TNLPSolver::UnsolvedError *E) {}
    283286
    284287      double obj = (nlp_ -> isProvenOptimal()) ? nlp_ -> getObjValue (): COIN_DBL_MAX;
Note: See TracChangeset for help on using the changeset viewer.