Changeset 134


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

merged trunk revision with Ipopt exception handling

Location:
stable/0.1/Couenne
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • stable/0.1/Couenne

  • stable/0.1/Couenne/acinclude.m4

    r105 r134  
    63966396AC_MSG_RESULT([$SED])
    63976397])
    6398 # Copyright (C) 2006, 2007 International Business Machines.
     6398# Copyright (C) 2006, 2009 International Business Machines.
    63996399# All Rights Reserved.
    64006400# This file is distributed under the Common Public License.
    64016401#
    6402 ## $Id: coin.m4 1239 2009-03-10 20:09:53Z andreasw $
     6402## $Id: coin.m4 1272 2009-04-24 16:33:02Z andreasw $
    64036403#
    64046404# Author: Andreas Wachter    IBM      2006-04-14
     
    95579557
    95589558###########################################################################
     9559#                            COIN_HAS_METIS                               #
     9560###########################################################################
     9561
     9562# This macro checks for a library containing the METIS library.  It
     9563# checks if the user has provided an argument for the METIS library,
     9564# and if not, it checks whether the METIS ThirdParty/Metis directory has
     9565# been configured.  It adds to ADDLIBS any flags required to link with
     9566# an externally provided METIS.  It defines the makefile conditional
     9567# and preprocessor macro COIN_HAS_METIS, if METIS is available, and it
     9568# defines the makefile conditional COIN_BUILD_METIS, if METIS is
     9569# compiled within COIN.
     9570
     9571AC_DEFUN([AC_COIN_HAS_METIS],
     9572[
     9573case "$PACKAGE_NAME" in
     9574  ThirdParty*)
     9575    coin_metisobjdir=../Metis
     9576    ;;
     9577  *)
     9578    coin_metisobjdir=../ThirdParty/Metis
     9579    ;;
     9580esac
     9581
     9582MAKEOKFILE=.MakeOk
     9583
     9584#check if user provides a METIS library (that works)
     9585AC_LANG_PUSH(C)
     9586AC_ARG_WITH(metis,
     9587   AS_HELP_STRING([--with-metis], [specify flags to link with METIS library]),
     9588   [METISLIB="$withval"; coin_has_metis=true], [coin_has_metis=no])
     9589
     9590if test $coin_has_metis = true; then
     9591  coin_save_LIBS="$LIBS"
     9592  LIBS="$METISLIB $ADDLIBS"
     9593  AC_MSG_CHECKING([whether symbol metis_nodend is available with ])
     9594  AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[metis_nodend()]])],
     9595     [AC_MSG_RESULT(yes)],
     9596     [AC_MSG_RESULT(no)
     9597      AC_MSG_ERROR([User-supplied METIS library does not work])])
     9598  LIBS="$coin_save_LIBS"
     9599fi
     9600AC_LANG_POP(C)
     9601
     9602if test "$coin_has_metis" = "true"; then  # user provided metis library
     9603  use_metis=yes
     9604  coin_has_metis=yes
     9605
     9606  ADDLIBS="$METISLIB $ADDLIBS"
     9607
     9608else # no user provided library, so we try to build our own
     9609  use_metis=BUILD
     9610
     9611  # Check if the METIS' ThirdParty project has been configured
     9612  if test "$PACKAGE_NAME" != ThirdPartyMetis; then
     9613    if test -r $coin_metisobjdir/.MakeOk; then
     9614      use_metis=BUILD
     9615    else
     9616      use_metis=
     9617    fi
     9618  fi
     9619
     9620  if test x"$use_metis" != x; then
     9621    coin_has_metis=yes
     9622  else
     9623    coin_has_metis=no
     9624  fi
     9625  AC_MSG_CHECKING([whether METIS is available])
     9626  AC_MSG_RESULT([$coin_has_metis])
     9627fi
     9628
     9629AM_CONDITIONAL([COIN_HAS_METIS],[test $coin_has_metis = yes])
     9630if test $coin_has_metis = yes; then
     9631  AC_DEFINE([COIN_HAS_METIS],[1],[If defined, the METIS library is available.])
     9632fi
     9633
     9634]) # AC_COIN_HAS_METIS
     9635
     9636
     9637###########################################################################
    95599638#                             COIN_HAS_GLPK                               #
    95609639###########################################################################
  • stable/0.1/Couenne/src/bound_tightening/aggressiveBT.cpp

    r1 r134  
    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;
  • stable/0.1/Couenne/src/main/BonCouenneInterface.cpp

    r132 r134  
    124124    }
    125125
    126     if (is_feasible)
    127       initialSolve ();
     126    if (is_feasible) {
     127      try {
     128        initialSolve ();
     129      }
     130      catch(TNLPSolver::UnsolvedError *E) {
     131      }
     132    }
    128133    else {
    129134      OsiAuxInfo * auxInfo = si.getAuxiliaryInfo ();
     
    202207            setColSolution (Y); // use initial solution given
    203208
    204             resolve (); // solve with integer variables fixed
     209            try {
     210              resolve (); // solve with integer variables fixed
     211            }
     212            catch(TNLPSolver::UnsolvedError *E) {
     213            }
     214
     215            //resolve ();
    205216
    206217            obj      = getObjValue ();
  • stable/0.1/Couenne/src/main/BonNlpHeuristic.cpp

    r1 r134  
    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;
  • stable/0.1/Couenne/src/problem/CouenneProblem.hpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/problem/CouenneSolverInterface.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/problem/getIntegerCandidate.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/readnl/invmap.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/readnl/nl2e.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/readnl/readnl.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.