Changeset 201


Ignore:
Timestamp:
Jul 7, 2009 6:28:24 AM (11 years ago)
Author:
pbelotti
Message:

merged Couenne/trunk changes 179-200

Location:
stable/0.2
Files:
29 edited
2 copied

Legend:

Unmodified
Added
Removed
  • stable/0.2

  • stable/0.2/Couenne/configure

    r170 r201  
    2146321463}
    2146421464
     21465# for readnl.cpp
     21466
     21467ac_ext=cc
     21468ac_cpp='$CXXCPP $CPPFLAGS'
     21469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     21470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     21471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     21472
     21473#if test x"" = x; then
     21474#  hdr="#include <cstdint>"
     21475#else
     21476#  hdr=""
     21477#fi
     21478#AC_CHECK_HEADERS([cstdint],[],[],[$hdr])
     21479
     21480for ac_header in cstdint
     21481do
     21482as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     21483if eval "test \"\${$as_ac_Header+set}\" = set"; then
     21484  echo "$as_me:$LINENO: checking for $ac_header" >&5
     21485echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     21486if eval "test \"\${$as_ac_Header+set}\" = set"; then
     21487  echo $ECHO_N "(cached) $ECHO_C" >&6
     21488fi
     21489echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     21490echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     21491else
     21492  # Is the header compilable?
     21493echo "$as_me:$LINENO: checking $ac_header usability" >&5
     21494echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     21495cat >conftest.$ac_ext <<_ACEOF
     21496/* confdefs.h.  */
     21497_ACEOF
     21498cat confdefs.h >>conftest.$ac_ext
     21499cat >>conftest.$ac_ext <<_ACEOF
     21500/* end confdefs.h.  */
     21501$ac_includes_default
     21502#include <$ac_header>
     21503_ACEOF
     21504rm -f conftest.$ac_objext
     21505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     21506  (eval $ac_compile) 2>conftest.er1
     21507  ac_status=$?
     21508  grep -v '^ *+' conftest.er1 >conftest.err
     21509  rm -f conftest.er1
     21510  cat conftest.err >&5
     21511  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21512  (exit $ac_status); } &&
     21513         { ac_try='test -z "$ac_cxx_werror_flag"
     21514                         || test ! -s conftest.err'
     21515  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     21516  (eval $ac_try) 2>&5
     21517  ac_status=$?
     21518  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21519  (exit $ac_status); }; } &&
     21520         { ac_try='test -s conftest.$ac_objext'
     21521  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     21522  (eval $ac_try) 2>&5
     21523  ac_status=$?
     21524  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21525  (exit $ac_status); }; }; then
     21526  ac_header_compiler=yes
     21527else
     21528  echo "$as_me: failed program was:" >&5
     21529sed 's/^/| /' conftest.$ac_ext >&5
     21530
     21531ac_header_compiler=no
     21532fi
     21533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     21534echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     21535echo "${ECHO_T}$ac_header_compiler" >&6
     21536
     21537# Is the header present?
     21538echo "$as_me:$LINENO: checking $ac_header presence" >&5
     21539echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     21540cat >conftest.$ac_ext <<_ACEOF
     21541/* confdefs.h.  */
     21542_ACEOF
     21543cat confdefs.h >>conftest.$ac_ext
     21544cat >>conftest.$ac_ext <<_ACEOF
     21545/* end confdefs.h.  */
     21546#include <$ac_header>
     21547_ACEOF
     21548if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     21549  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     21550  ac_status=$?
     21551  grep -v '^ *+' conftest.er1 >conftest.err
     21552  rm -f conftest.er1
     21553  cat conftest.err >&5
     21554  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21555  (exit $ac_status); } >/dev/null; then
     21556  if test -s conftest.err; then
     21557    ac_cpp_err=$ac_cxx_preproc_warn_flag
     21558    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
     21559  else
     21560    ac_cpp_err=
     21561  fi
     21562else
     21563  ac_cpp_err=yes
     21564fi
     21565if test -z "$ac_cpp_err"; then
     21566  ac_header_preproc=yes
     21567else
     21568  echo "$as_me: failed program was:" >&5
     21569sed 's/^/| /' conftest.$ac_ext >&5
     21570
     21571  ac_header_preproc=no
     21572fi
     21573rm -f conftest.err conftest.$ac_ext
     21574echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     21575echo "${ECHO_T}$ac_header_preproc" >&6
     21576
     21577# So?  What about this header?
     21578case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
     21579  yes:no: )
     21580    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     21581echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     21582    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     21583echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     21584    ac_header_preproc=yes
     21585    ;;
     21586  no:yes:* )
     21587    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     21588echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     21589    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     21590echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     21591    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     21592echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     21593    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     21594echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     21595    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     21596echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     21597    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     21598echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     21599    (
     21600      cat <<\_ASBOX
     21601## --------------------------------- ##
     21602## Report this to belotti@lehigh.edu ##
     21603## --------------------------------- ##
     21604_ASBOX
     21605    ) |
     21606      sed "s/^/$as_me: WARNING:     /" >&2
     21607    ;;
     21608esac
     21609echo "$as_me:$LINENO: checking for $ac_header" >&5
     21610echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     21611if eval "test \"\${$as_ac_Header+set}\" = set"; then
     21612  echo $ECHO_N "(cached) $ECHO_C" >&6
     21613else
     21614  eval "$as_ac_Header=\$ac_header_preproc"
     21615fi
     21616echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     21617echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     21618
     21619fi
     21620if test `eval echo '${'$as_ac_Header'}'` = yes; then
     21621  cat >>confdefs.h <<_ACEOF
     21622#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     21623_ACEOF
     21624
     21625fi
     21626
     21627done
     21628
     21629
     21630if test "$ac_cv_header_cstdint" != "yes"; then
     21631  #if test x"" = x; then
     21632#  hdr="#include <stdint.h>"
     21633#else
     21634#  hdr=""
     21635#fi
     21636#AC_CHECK_HEADERS([stdint.h],[],[],[$hdr])
     21637
     21638for ac_header in stdint.h
     21639do
     21640as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     21641if eval "test \"\${$as_ac_Header+set}\" = set"; then
     21642  echo "$as_me:$LINENO: checking for $ac_header" >&5
     21643echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     21644if eval "test \"\${$as_ac_Header+set}\" = set"; then
     21645  echo $ECHO_N "(cached) $ECHO_C" >&6
     21646fi
     21647echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     21648echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     21649else
     21650  # Is the header compilable?
     21651echo "$as_me:$LINENO: checking $ac_header usability" >&5
     21652echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     21653cat >conftest.$ac_ext <<_ACEOF
     21654/* confdefs.h.  */
     21655_ACEOF
     21656cat confdefs.h >>conftest.$ac_ext
     21657cat >>conftest.$ac_ext <<_ACEOF
     21658/* end confdefs.h.  */
     21659$ac_includes_default
     21660#include <$ac_header>
     21661_ACEOF
     21662rm -f conftest.$ac_objext
     21663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     21664  (eval $ac_compile) 2>conftest.er1
     21665  ac_status=$?
     21666  grep -v '^ *+' conftest.er1 >conftest.err
     21667  rm -f conftest.er1
     21668  cat conftest.err >&5
     21669  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21670  (exit $ac_status); } &&
     21671         { ac_try='test -z "$ac_cxx_werror_flag"
     21672                         || test ! -s conftest.err'
     21673  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     21674  (eval $ac_try) 2>&5
     21675  ac_status=$?
     21676  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21677  (exit $ac_status); }; } &&
     21678         { ac_try='test -s conftest.$ac_objext'
     21679  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     21680  (eval $ac_try) 2>&5
     21681  ac_status=$?
     21682  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21683  (exit $ac_status); }; }; then
     21684  ac_header_compiler=yes
     21685else
     21686  echo "$as_me: failed program was:" >&5
     21687sed 's/^/| /' conftest.$ac_ext >&5
     21688
     21689ac_header_compiler=no
     21690fi
     21691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     21692echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     21693echo "${ECHO_T}$ac_header_compiler" >&6
     21694
     21695# Is the header present?
     21696echo "$as_me:$LINENO: checking $ac_header presence" >&5
     21697echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     21698cat >conftest.$ac_ext <<_ACEOF
     21699/* confdefs.h.  */
     21700_ACEOF
     21701cat confdefs.h >>conftest.$ac_ext
     21702cat >>conftest.$ac_ext <<_ACEOF
     21703/* end confdefs.h.  */
     21704#include <$ac_header>
     21705_ACEOF
     21706if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     21707  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     21708  ac_status=$?
     21709  grep -v '^ *+' conftest.er1 >conftest.err
     21710  rm -f conftest.er1
     21711  cat conftest.err >&5
     21712  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     21713  (exit $ac_status); } >/dev/null; then
     21714  if test -s conftest.err; then
     21715    ac_cpp_err=$ac_cxx_preproc_warn_flag
     21716    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
     21717  else
     21718    ac_cpp_err=
     21719  fi
     21720else
     21721  ac_cpp_err=yes
     21722fi
     21723if test -z "$ac_cpp_err"; then
     21724  ac_header_preproc=yes
     21725else
     21726  echo "$as_me: failed program was:" >&5
     21727sed 's/^/| /' conftest.$ac_ext >&5
     21728
     21729  ac_header_preproc=no
     21730fi
     21731rm -f conftest.err conftest.$ac_ext
     21732echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     21733echo "${ECHO_T}$ac_header_preproc" >&6
     21734
     21735# So?  What about this header?
     21736case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
     21737  yes:no: )
     21738    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     21739echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     21740    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     21741echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     21742    ac_header_preproc=yes
     21743    ;;
     21744  no:yes:* )
     21745    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     21746echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     21747    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     21748echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     21749    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     21750echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     21751    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     21752echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     21753    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     21754echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     21755    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     21756echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     21757    (
     21758      cat <<\_ASBOX
     21759## --------------------------------- ##
     21760## Report this to belotti@lehigh.edu ##
     21761## --------------------------------- ##
     21762_ASBOX
     21763    ) |
     21764      sed "s/^/$as_me: WARNING:     /" >&2
     21765    ;;
     21766esac
     21767echo "$as_me:$LINENO: checking for $ac_header" >&5
     21768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     21769if eval "test \"\${$as_ac_Header+set}\" = set"; then
     21770  echo $ECHO_N "(cached) $ECHO_C" >&6
     21771else
     21772  eval "$as_ac_Header=\$ac_header_preproc"
     21773fi
     21774echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     21775echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     21776
     21777fi
     21778if test `eval echo '${'$as_ac_Header'}'` = yes; then
     21779  cat >>confdefs.h <<_ACEOF
     21780#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     21781_ACEOF
     21782
     21783fi
     21784
     21785done
     21786
     21787
     21788fi
     21789ac_ext=c
     21790ac_cpp='$CPP $CPPFLAGS'
     21791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     21792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     21793ac_compiler_gnu=$ac_cv_c_compiler_gnu
     21794
     21795
     21796
    2146521797#############################################################################
    2146621798#                              COIN components                              #
  • stable/0.2/Couenne/configure.ac

    r170 r201  
    5252# Initialize automake and libtool
    5353AC_COIN_INIT_AUTO_TOOLS
     54
     55# for readnl.cpp
     56AC_COIN_CHECK_CXX_CHEADER(stdint)
    5457
    5558#############################################################################
  • stable/0.2/Couenne/inc/config_couenne.h.in

    r66 r201  
    3939/* Define to 1 if the ThirdParty package is used */
    4040#undef COIN_HAS_THIRDPARTY
     41
     42/* Define to 1 if you have the <cstdint> header file. */
     43#undef HAVE_CSTDINT
    4144
    4245/* Define to 1 if you have the <dlfcn.h> header file. */
  • stable/0.2/Couenne/src/bound_tightening/tightenBounds.cpp

    r159 r201  
    5151      continue;
    5252
     53    CouNumber &lower_i = Lb (i);
     54    CouNumber &upper_i = Ub (i);
     55
    5356    // early test to avoid a loop
    5457
    55     if ((Lb (i) > Ub (i) + COUENNE_EPS * (1 + CoinMin (fabs (Lb (i)), fabs (Ub (i))))) ||
    56         (Ub (i) < - MAX_BOUND) ||
    57         (Lb (i) >   MAX_BOUND)) {
     58    if ((lower_i > upper_i + COUENNE_EPS * (1 + CoinMin (fabs (lower_i), fabs (upper_i)))) ||
     59        (upper_i < - MAX_BOUND) ||
     60        (lower_i >   MAX_BOUND)) {
    5861
    5962      if (Jnlst()->ProduceOutput(J_ITERSUMMARY, J_BOUNDTIGHTENING)) {
    6063
    6164        Jnlst()->Printf(J_ITERSUMMARY, J_BOUNDTIGHTENING,
    62                         "pre-check: w_%d has infeasible bounds [%.10e,%.10e]. ", i, Lb (i), Ub (i));
     65                        "pre-check: w_%d has infeasible bounds [%.10e,%.10e]. ", i, lower_i, upper_i);
    6366
    6467        if (Jnlst()->ProduceOutput(J_DETAILED, J_BOUNDTIGHTENING)) {
     
    7679    /*if ((Var (i) -> Type () == VAR) &&
    7780        (Var (i) -> isInteger ())) {
    78       Lb (i) = ceil  (Lb (i) - COUENNE_EPS);
    79       Ub (i) = floor (Ub (i) + COUENNE_EPS);
     81      lower_i = ceil  (lower_i - COUENNE_EPS);
     82      upper_i = floor (upper_i + COUENNE_EPS);
    8083      }*/
    8184
    8285    if (Var (i) -> Type () == AUX) {
    83         // TODO: also test if any indep variable of this expression
    84         // have changed. If not, skip
     86      // TODO: also test if any indep variable of this expression
     87      // have changed. If not, skip
    8588
    8689      CouNumber ll, uu;
     
    116119      // check if lower bound got higher
    117120      if ((ll > - COUENNE_INFINITY) &&
    118           (ll >= Lb (i) + COUENNE_EPS) &&
     121          (ll >= lower_i + COUENNE_EPS) &&
    119122          ((fabs (ll)        < COUENNE_EPS) ||
    120            (fabs (Lb (i)) < COUENNE_EPS) ||
    121            (fabs (ll / (Lb (i)) - 1) > COUENNE_EPS)) ) {
     123           (fabs (lower_i) < COUENNE_EPS) ||
     124           (fabs (ll / (lower_i) - 1) > COUENNE_EPS)) ) {
    122125
    123126        if (Jnlst()->ProduceOutput(J_DETAILED, J_BOUNDTIGHTENING)) {
     
    125128          Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING,
    126129                          "  prop L %2d [%g,(%g)] -> [%g,(%g)] (%g) ",
    127                           i, Lb (i), Ub (i), ll, uu, Lb (i) - ll);
     130                          i, lower_i, upper_i, ll, uu, lower_i - ll);
    128131          Var (i) -> print (std::cout);
    129132
     
    136139
    137140          if (optimum_ &&
    138               (optimum_ [i] >= Lb (i)) &&
     141              (optimum_ [i] >= lower_i) &&
    139142              (optimum_ [i] <= ll - COUENNE_EPS)) {
    140143
    141144            Jnlst()->Printf(J_STRONGWARNING, J_BOUNDTIGHTENING,
    142145                            "Couenne: propagating l_%d cuts optimum: [%g --> %g -X-> %g] :: ",
    143                             i, Lb (i), optimum_ [i], ll);
     146                            i, lower_i, optimum_ [i], ll);
    144147            Var (i) -> Lb () -> print (std::cout);
    145148            Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING," --- ");
     
    149152        }
    150153
    151         Lb (i) = ll;
    152 
    153         if (ll > Ub (i) + COUENNE_EPS * (1. + CoinMin (fabs (ll), fabs (Ub (i))))) {
     154        lower_i = ll;
     155
     156        if (ll > upper_i + COUENNE_EPS * (1. + CoinMin (fabs (ll), fabs (upper_i)))) {
    154157          Jnlst () -> Printf (J_ITERSUMMARY, J_BOUNDTIGHTENING,
    155                               "just-check: w_%d has infeasible bounds [%g,%g]. ", i, Lb (i), Ub (i));
     158                              "just-check: w_%d has infeasible bounds [%g,%g]. ", i, lower_i, upper_i);
    156159          return -1;
    157160        }
     
    163166      // check if upper bound got lower
    164167      if ((uu < COUENNE_INFINITY) &&
    165           (uu <= Ub (i) - COUENNE_EPS) &&
     168          (uu <= upper_i - COUENNE_EPS) &&
    166169          ((fabs (uu)      < COUENNE_EPS) ||
    167            (fabs (Ub (i)) < COUENNE_EPS) ||
    168            (fabs (uu / (Ub (i)) - 1) > COUENNE_EPS)) ) {
     170           (fabs (upper_i) < COUENNE_EPS) ||
     171           (fabs (uu / (upper_i) - 1) > COUENNE_EPS)) ) {
    169172        //      if ((uu < COUENNE_INFINITY) && (uu <= ub_ [i+j] - COUENNE_EPS)) {
    170173
     
    178181          Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING,
    179182                          "  prop U %2d [(%g),%g] -> [(%g),%g] (%g) ",
    180                           i, Lb (i), Ub (i), ll, uu, Ub (i) - uu);
     183                          i, lower_i, upper_i, ll, uu, upper_i - uu);
    181184          Var (i) -> print (std::cout);
    182185
     
    189192
    190193          if (optimum_ &&
    191               (optimum_ [i] <= Ub (i)) &&
     194              (optimum_ [i] <= upper_i) &&
    192195              (optimum_ [i] >= uu + COUENNE_EPS)) {
    193196
    194197            Jnlst()->Printf(J_STRONGWARNING, J_BOUNDTIGHTENING,
    195198                            "Couenne: propagating u_%d cuts optimum: [%g <-X- %g <-- %g] :: ",
    196                             i, uu, optimum_ [i], Ub (i));
     199                            i, uu, optimum_ [i], upper_i);
    197200            Var (i) -> Lb () -> print (std::cout);
    198201            Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING," --- ");
     
    202205        }
    203206
    204         Ub (i) = uu;
    205 
    206         if (uu < Lb (i) - COUENNE_EPS) {
     207        upper_i = uu;
     208
     209        if (uu < lower_i - COUENNE_EPS) {
    207210          Jnlst () -> Printf (J_ITERSUMMARY, J_BOUNDTIGHTENING,
    208                               "just-check: w_%d has infeasible bounds [%g,%g]. ", i, Lb (i), Ub (i));
     211                              "just-check: w_%d has infeasible bounds [%g,%g]. ", i, lower_i, upper_i);
    209212          return -1;
    210213        }
  • stable/0.2/Couenne/src/branch/CouenneBranchingObject.cpp

    r159 r201  
    1 /* $Id: CouenneBranchingObject.cpp 141 2009-06-03 04:19:19Z pbelotti $ */
    2 /*
     1/* $Id$
     2 *
    33 * Name:    CouenneBranchingObject.cpp
    44 * Authors: Pierre Bonami, IBM Corp.
  • stable/0.2/Couenne/src/branch/CouenneChooseStrong.cpp

    r159 r201  
    1313#include "CouenneBranchingObject.hpp"
    1414
    15 namespace Bonmin {
     15//namespace Bonmin {
    1616
    1717  /// constructor
    18   CouenneChooseStrong::CouenneChooseStrong (BabSetupBase &b, CouenneProblem* p, JnlstPtr jnlst) :
     18  CouenneChooseStrong::CouenneChooseStrong (Bonmin::BabSetupBase &b,
     19                                            CouenneProblem* p, JnlstPtr jnlst) :
    1920
    2021    BonChooseVariable (b, b.continuousSolver()),
     
    145146    return problem_ -> checkNLP (solution, obj);
    146147  }
    147 }
     148//}
  • stable/0.2/Couenne/src/branch/CouenneChooseStrong.hpp

    r159 r201  
    2020class CouenneSolverInterface;
    2121
    22 namespace Bonmin {
     22//namespace Bonmin {
    2323
    24   class CouenneChooseStrong : public BonChooseVariable  {
     24class CouenneChooseStrong : public Bonmin::BonChooseVariable  {
    2525
    2626  public:
    2727
    2828    /// Constructor from solver (so we can set up arrays etc)
    29     CouenneChooseStrong (BabSetupBase& b, CouenneProblem* problem, JnlstPtr jnlst);
     29  CouenneChooseStrong (Bonmin::BabSetupBase& b, CouenneProblem* problem, JnlstPtr jnlst);
    3030
    3131    /// Copy constructor
     
    9292    JnlstPtr jnlst_;
    9393  };
    94 }
     94//}
    9595
    9696#endif
  • stable/0.2/Couenne/src/branch/CouenneObject.cpp

    r159 r201  
    498498  if (info &&
    499499      ((pseudoMultType_ == INTERVAL_LP) ||
    500        (pseudoMultType_ == INTERVAL_LP_REV))) {
     500       (pseudoMultType_ == INTERVAL_LP_REV)))
    501501
    502502    point = info -> solution_ [index];
    503503
    504     CouNumber delta = closeToBounds * (info -> upper_ [index] - info -> lower_ [index]);
    505 
    506     if      (point < info -> lower_ [index] + delta)
    507       point        = info -> lower_ [index] + delta;
    508     else if (point > info -> upper_ [index] - delta)
    509       point        = info -> upper_ [index] - delta;
    510   }
    511504  else if (brpoint &&
    512505           ((pseudoMultType_ == INTERVAL_BR) ||
     
    514507   
    515508    point = *brpoint;
     509
     510  // now move it away from the bounds
     511
     512  point = midInterval (point,
     513                       info -> lower_ [index],
     514                       info -> upper_ [index]);
     515
     516  CouNumber delta = closeToBounds * (info -> upper_ [index] - info -> lower_ [index]);
     517
     518  if      (point < info -> lower_ [index] + delta)
     519    point        = info -> lower_ [index] + delta;
     520  else if (point > info -> upper_ [index] - delta)
     521    point        = info -> upper_ [index] - delta;
    516522
    517523  ///////////////////////////////////////////////////////////
     
    540546  }
    541547
     548//   if (downEstimate_ <= 0.0 || upEstimate_ <= 0.0)
     549//     printf ("%g [%g,%g] ---> [%g,%g]\n",
     550//          point,
     551//          info -> lower_ [index],
     552//          info -> upper_ [index],
     553//          downEstimate_, upEstimate_);
     554
    542555  if (reference_ -> isInteger ()) {
    543556    if (downEstimate_ <       point  - floor (point)) downEstimate_ =       point  - floor (point);
  • stable/0.2/Couenne/src/branch/doStrongBranching.cpp

    r159 r201  
    1 /* $Id: doStrongBranching.cpp 141 2009-06-03 04:19:19Z pbelotti $ */
    2 /*
     1/* $Id$
     2 *
    33 * Name:    doStrongBranching.cpp
    44 * Authors: Andreas Waechter, IBM Corp.
     
    66 * Purpose: actual strong branching method
    77 *
    8  * (C) Carnegie-Mellon University, 2008.
     8 * (C) Carnegie-Mellon University, 2008-09.
    99 * This file is licensed under the Common Public License (CPL)
    1010 */
     
    4242
    4343
    44 namespace Bonmin {
     44//namespace Bonmin {
    4545
    4646  /**  This is a utility function which does strong branching on
     
    5858  int CouenneChooseStrong::doStrongBranching (CouenneSolverInterface * solver,
    5959                                              OsiBranchingInformation *info,
    60                                               int numberToDo, int returnCriterion)
    61   {
     60                                              int numberToDo, int returnCriterion) {
    6261
    6362    jnlst_ -> Printf (J_ITERSUMMARY, J_BRANCHING,
     
    9998    for (;iDo < numberToDo; iDo++) {
    10099
    101       HotInfo * result = results_ () + iDo; // retrieve i-th object to test
    102 
    103       CouenneObject *CouObj = dynamic_cast <CouenneObject *>
    104         (solver_ -> objects () [result -> whichObject ()]);
     100      Bonmin::HotInfo * result = results_ () + iDo; // retrieve i-th object to test
     101
     102      OsiObject     *Object = solver_ -> objects () [result -> whichObject ()];
     103      CouenneObject *CouObj = dynamic_cast <CouenneObject *> (Object);
    105104
    106105      // For now just 2 way
     
    113112      /* Try the first direction.  Each subsequent call to branch()
    114113         performs the specified branch and advances the branch object
    115          state to the next branch alternative.) */
     114         state to the next branch alternative. */
    116115
    117116      int
     
    130129        else { // branch is feasible, solve and compare
    131130
    132           solver -> solveFromHotStart ();
    133           if (pseudoUpdateLP_ && CouObj && solver -> isProvenOptimal ()) {
    134             CouNumber dist = distance (lpSol, solver -> getColSolution (), numberColumns);
    135             if (dist > COUENNE_EPS)
    136               CouObj -> setEstimate (dist, 0);
     131          bool infeasible = false;
     132
     133          // Bound tightening if not a CouenneObject -- explicit bound tightening
     134          if (!CouObj) {
     135
     136            int
     137              indVar = Object   -> columnNumber (),
     138              nvars  = problem_ -> nVars ();
     139
     140            t_chg_bounds *chg_bds = new t_chg_bounds [nvars];
     141
     142            chg_bds [indVar].setUpper (t_chg_bounds::CHANGED);
     143
     144            if (problem_ -> doFBBT ()) {         // problem allowed to do FBBT
     145
     146              problem_ -> installCutOff ();
     147
     148              if (!problem_ -> btCore (chg_bds)) // done FBBT and this branch is infeasible
     149                infeasible = true;        // ==> report it
     150
     151              else {
     152                const double
     153                  *lb = solver -> getColLower (),
     154                  *ub = solver -> getColUpper ();
     155
     156                for (int i=0; i<nvars; i++) {
     157                  if (problem_ -> Lb (i) > lb [i]) solver -> setColLower (i, problem_ -> Lb (i));
     158                  if (problem_ -> Ub (i) < ub [i]) solver -> setColUpper (i, problem_ -> Ub (i));
     159                }
     160              }
     161            }
     162
     163            delete [] chg_bds;
     164          }
     165
     166          if (infeasible) result -> setDownStatus (status0 = 1);
     167          else {
     168            solver -> solveFromHotStart ();
     169            //solver -> solveFromHotStart ();
     170
     171            if (pseudoUpdateLP_ && CouObj && solver -> isProvenOptimal ()) {
     172              CouNumber dist = distance (lpSol, solver -> getColSolution (), numberColumns);
     173              if (dist > COUENNE_EPS)
     174                CouObj -> setEstimate (dist, 0);
     175            }
    137176          }
    138177        }
     
    156195            if (dist > COUENNE_EPS)
    157196              CouObj -> setEstimate (dist, 0);
    158             //CouObj -> setEstimate (distance (lpSol, thisSolver->getColSolution (),numberColumns), 0);
    159197          }
    160198        }
     
    163201      // can check if we got solution
    164202      // status is 0 finished, 1 infeasible and 2 unfinished and 3 is solution
     203
     204      /*if (CouObj)
     205        jnlst_ -> Printf (J_ITERSUMMARY, J_BRANCHING, "dnEst %g upEst %g\n",
     206                          CouObj->downEstimate(),
     207                          CouObj->upEstimate());*/
    165208
    166209      // only update information if this branch is feasible
     
    202245
    203246        else {
    204           solver -> solveFromHotStart ();
    205           if (pseudoUpdateLP_ && CouObj && solver -> isProvenOptimal ()) {
    206             CouNumber dist = distance (lpSol, solver -> getColSolution (), numberColumns);
    207             if (dist > COUENNE_EPS)
    208               CouObj -> setEstimate (dist, 1);
    209             //CouObj -> setEstimate (distance (lpSol, solver -> getColSolution (), numberColumns), 1);
     247
     248          bool infeasible = false;
     249
     250          // Bound tightening if not a CouenneObject -- explicit bound tightening
     251          if (!CouObj) {
     252
     253            int
     254              indVar = Object   -> columnNumber (),
     255              nvars  = problem_ -> nVars ();
     256
     257            t_chg_bounds *chg_bds = new t_chg_bounds [nvars];
     258
     259            chg_bds [indVar].setLower (t_chg_bounds::CHANGED);
     260
     261            if (problem_ -> doFBBT ()) {         // problem allowed to do FBBT
     262
     263              problem_ -> installCutOff ();
     264
     265              if (!problem_ -> btCore (chg_bds)) // done FBBT and this branch is infeasible
     266                infeasible = true;        // ==> report it
     267
     268              else {
     269                const double
     270                  *lb = solver -> getColLower (),
     271                  *ub = solver -> getColUpper ();
     272
     273                for (int i=0; i<nvars; i++) {
     274                  if (problem_ -> Lb (i) > lb [i]) solver -> setColLower (i, problem_ -> Lb (i));
     275                  if (problem_ -> Ub (i) < ub [i]) solver -> setColUpper (i, problem_ -> Ub (i));
     276                }
     277              }
     278            }
     279
     280            delete [] chg_bds;
     281          }
     282
     283          if (infeasible) result -> setUpStatus (status0 = 1);
     284          else {
     285
     286            solver -> solveFromHotStart ();
     287
     288            if (pseudoUpdateLP_ && CouObj && solver -> isProvenOptimal ()) {
     289              CouNumber dist = distance (lpSol, solver -> getColSolution (), numberColumns);
     290              if (dist > COUENNE_EPS)
     291                CouObj -> setEstimate (dist, 1);
     292            }
    210293          }
    211294        }
     
    228311            if (dist > COUENNE_EPS)
    229312              CouObj -> setEstimate (dist, 1);
    230             //CouObj -> setEstimate (distance (lpSol, thisSolver->getColSolution (),numberColumns), 1);
    231313          }
    232314        }
     
    235317      // can check if we got solution
    236318      // status is 0 finished, 1 infeasible and 2 unfinished and 3 is solution
     319
     320      /*if (CouObj)
     321        jnlst_ -> Printf (J_ITERSUMMARY, J_BRANCHING, "dnEst %g upEst %g\n",
     322                          CouObj->downEstimate(),
     323                          CouObj->upEstimate());*/
    237324
    238325      // only update information if this branch is feasible
     
    375462    return returnCode;
    376463  }
    377 }
     464//}
  • stable/0.2/Couenne/src/convex/CouenneCutGenerator.cpp

    r159 r201  
    3434  BabPtr_         (NULL),
    3535  infeasNode_     (false),
    36   jnlst_          (base -> journalist ()),
     36  jnlst_          (base ? base -> journalist () : NULL),
    3737  rootTime_       (-1.) {
    3838
    39   base -> options () -> GetIntegerValue ("convexification_points", nSamples_, "couenne.");
    40 
    41   std::string s;
    42 
    43   base -> options () -> GetStringValue ("convexification_type", s, "couenne.");
    44   if      (s == "current-point-only") convtype_ = CURRENT_ONLY;
    45   else if (s == "uniform-grid")       convtype_ = UNIFORM_GRID;
    46   else                                convtype_ = AROUND_CURPOINT;
    47 
    48   base -> options () -> GetStringValue ("violated_cuts_only", s, "couenne.");
    49   addviolated_ = (s == "yes");
    50 
    51   base -> options () -> GetStringValue ("check_lp", s, "couenne.");
    52   check_lp_ = (s == "yes");
     39  if (base) {
     40
     41    base -> options () -> GetIntegerValue ("convexification_points", nSamples_, "couenne.");
     42
     43    std::string s;
     44
     45    base -> options () -> GetStringValue ("convexification_type", s, "couenne.");
     46    if      (s == "current-point-only") convtype_ = CURRENT_ONLY;
     47    else if (s == "uniform-grid")       convtype_ = UNIFORM_GRID;
     48    else                                convtype_ = AROUND_CURPOINT;
     49
     50    base -> options () -> GetStringValue ("violated_cuts_only", s, "couenne.");
     51    addviolated_ = (s == "yes");
     52
     53    base -> options () -> GetStringValue ("check_lp", s, "couenne.");
     54    check_lp_ = (s == "yes");
     55
     56    base -> options () -> GetStringValue ("enable_lp_implied_bounds", s, "couenne.");
     57    enable_lp_implied_bounds_ = (s == "yes");
     58
     59  } else {
     60
     61    nSamples_                 = 4;
     62    convtype_                 = CURRENT_ONLY;
     63    addviolated_              = true;
     64    check_lp_                 = false;
     65    enable_lp_implied_bounds_ = false;
     66  }
    5367
    5468  if (asl) // deal with problems not originating from AMPL
     
    8195  jnlst_       (src. jnlst_),
    8296  rootTime_    (src. rootTime_),
    83   check_lp_    (src. check_lp_)
     97  check_lp_    (src. check_lp_),
     98  enable_lp_implied_bounds_ (src.enable_lp_implied_bounds_)
    8499{}
    85100
     
    177192     "yes","");
    178193
    179   CouenneProblem                :: registerOptions (roptions);
    180   Bonmin::CouenneChooseStrong   :: registerOptions (roptions);
    181   CouenneChooseVariable         :: registerOptions (roptions);
     194  roptions -> AddStringOption2
     195    ("enable_lp_implied_bounds",
     196     "Enable OsiSolverInterface::tightenBounds () -- warning: it has caused "
     197     "some trouble to Couenne",
     198     "no",
     199     "no","",
     200     "yes","");
     201
     202  CouenneProblem        :: registerOptions (roptions);
     203  CouenneChooseStrong   :: registerOptions (roptions);
     204  CouenneChooseVariable :: registerOptions (roptions);
    182205}
  • stable/0.2/Couenne/src/convex/CouenneCutGenerator.hpp

    r159 r201  
    1 /* $Id: CouenneCutGenerator.hpp 141 2009-06-03 04:19:19Z pbelotti $ */
    2 /*
     1/* $Id$
     2 *
    33 * Name:    CouenneCutGenerator.hpp
    44 * Author:  Pietro Belotti
     
    8686  bool check_lp_;
    8787
     88  /// Take advantage of OsiClpSolverInterface::tightenBounds (), known
     89  /// to have caused some problems some time ago
     90  bool enable_lp_implied_bounds_;
     91
    8892 public:
    8993
     
    105109  /// return pointer to symbolic problem
    106110  inline CouenneProblem *Problem () const
    107     {return problem_;}
     111  {return problem_;}
    108112
    109113  /// return pointer to symbolic problem
    110114  inline void setProblem (CouenneProblem *p)
    111     {problem_ = p;}
     115  {problem_ = p;}
    112116
    113117  /// total number of variables (original + auxiliary)
     
    116120  /// has generateCuts been called yet?
    117121  inline bool isFirst () const
    118     {return firstcall_;}
     122  {return firstcall_;}
    119123
    120124  /// should we add the violated cuts only (true), or all of them (false)?
    121125  inline bool addViolated () const
    122     {return addviolated_;}
     126  {return addviolated_;}
    123127
    124128  /// get convexification type (see CouenneTypes.h)
    125129  inline enum conv_type ConvType () const
    126     {return convtype_;}
     130  {return convtype_;}
    127131
    128132  /// get number of convexification samples
    129133  inline int nSamples () const
    130     {return nSamples_;}
     134  {return nSamples_;}
    131135
    132136  /// the main CglCutGenerator
     
    217221  {return ConstPtr (jnlst_);}
    218222
     223  void setJnlst(JnlstPtr jnlst__)
     224  { jnlst_ = jnlst__; }
     225
    219226  /// Time spent at root node
    220227  double &rootTime ()
     
    222229
    223230  /// return check_lp flag (used in CouenneSolverInterface)
    224   bool check_lp ()
     231  bool check_lp () const
    225232  {return check_lp_;}
     233
     234  /// returns value of enable_lp_implied_bounds_
     235  bool enableLpImpliedBounds () const
     236  {return enable_lp_implied_bounds_;}
    226237};
    227238
  • stable/0.2/Couenne/src/convex/generateCuts.cpp

    r159 r201  
    1616#include "CouenneSolverInterface.hpp"
    1717
    18 #define Couenne_large_bound2 9.99e30
     18#define Couenne_large_bound2 9.99e12
    1919
    2020// checks bad cuts against known optimum
  • stable/0.2/Couenne/src/convex/operators/conv-exprGroup.cpp

    r159 r201  
    176176    }
    177177
    178     if (inf_lb) lb = -COUENNE_INFINITY;
    179     if (inf_ub) ub =  COUENNE_INFINITY;
    180 
    181     if (inf_lb && inf_ub) break; // no need to keep computing...
     178    if (inf_lb)
     179      lb = -COUENNE_INFINITY;
     180
     181    if (inf_ub) {
     182      ub =  COUENNE_INFINITY;
     183      if (inf_lb)
     184        break;
     185    }
     186
     187    //if (inf_lb && inf_ub) break; // no need to keep computing...
    182188  }
    183189}
  • stable/0.2/Couenne/src/disjunctive/separateWithDisjunction.cpp

    r159 r201  
    7979  sparse2dense (ncols, chg, changed, nchanged);
    8080
    81   couenneCG_ -> genRowCuts (si, *cuts,
    82                             nchanged, changed, // nchanged and changed are NULL for now
    83                             chg);
     81  couenneCG_ -> genRowCuts (si, *cuts, nchanged, changed, chg);
    8482
    8583  p -> domain () -> pop ();
     
    8785  delete [] chg;
    8886
     87  if (changed)
     88    free (changed);
     89
    8990  return COUENNE_FEASIBLE;
    9091}
  • stable/0.2/Couenne/src/expression/exprAux.cpp

    r159 r201  
    277277                                     JnlstPtr jnlst) {
    278278
    279   CouenneObject *retp = NULL;
    280 
    281279  /*if (image_ -> code () == COU_EXPRMUL) printf ("OK1\n");
    282280  if (image_ -> ArgList () [0] -> Index () >= 0) printf ("OK2\n");
     
    302300    return obj;
    303301  }
    304 
    305   //  return (*retp);
    306 }
     302}
  • stable/0.2/Couenne/src/main/Makefile.am

    r104 r201  
    2929        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
    3030        $(BONMINOBJDIR)/src/CbcBonmin/libbonmin.la \
     31        $(BONMINOBJDIR)/src/Algorithms/Branching/libbonbranching.la \
    3132        $(BONMINOBJDIR)/src/Interfaces/libbonmininterfaces.la \
    3233        $(IPOPTOBJDIR)/src/Interfaces/libipopt.la \
  • stable/0.2/Couenne/src/main/Makefile.in

    r104 r201  
    8484        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
    8585        $(BONMINOBJDIR)/src/CbcBonmin/libbonmin.la \
     86        $(BONMINOBJDIR)/src/Algorithms/Branching/libbonbranching.la \
    8687        $(BONMINOBJDIR)/src/Interfaces/libbonmininterfaces.la \
    8788        $(IPOPTOBJDIR)/src/Interfaces/libipopt.la \
     
    302303        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
    303304        $(BONMINOBJDIR)/src/CbcBonmin/libbonmin.la \
     305        $(BONMINOBJDIR)/src/Algorithms/Branching/libbonbranching.la \
    304306        $(BONMINOBJDIR)/src/Interfaces/libbonmininterfaces.la \
    305307        $(IPOPTOBJDIR)/src/Interfaces/libipopt.la \
  • stable/0.2/Couenne/src/problem/CouenneLPtightenBounds.cpp

    r159 r201  
    1 /* $Id: CouenneLPtightenBounds.cpp 154 2009-06-16 18:52:53Z pbelotti $ */
    2 /*
    3  * Name:    CouenneLPtightenBounds.hpp
     1/* $Id$
     2 *
     3 * Name:    CouenneLPtightenBounds.cpp
    44 * Authors: Pietro Belotti, Carnegie Mellon University
    55 * Purpose: tighten LP bounds on all variables (including continuous)
    66 *
    7  * (C) Carnegie-Mellon University, 2008.
     7 * (C) Carnegie-Mellon University, 2008-09.
    88 * This file is licensed under the Common Public License (CPL)
    99 */
     
    1717int CouenneSolverInterface::tightenBounds (int lightweight) {
    1818
    19   // not yet...
    20   return OsiClpSolverInterface::tightenBounds (lightweight);
     19  if (!(cutgen_ -> enableLpImpliedBounds ()))
     20    return 0;
    2121
    2222  int
     
    3131  CoinCopyN (getColUpper (), ncols, oldUpper);
    3232
    33   nTightened = OsiClpSolverInterface::tightenBounds (lightweight);
     33//   printf ("-------- BOUNDS BEFORE ------------\n  ");
     34//   int j=0;
     35//   for (int i=0; i < ncols; i++) {
     36//     printf("x_%03d [%+15.8g %+15.8g] ", i, oldLower [i], oldUpper [i]);
     37//     if (!(++j % 6)) printf ("\n  ");
     38//   }
     39//   if (j % 6) printf ("\n");
     40
     41  nTightened = tightenBoundsCLP (lightweight);
     42
     43  if (nTightened < 0)
     44    return nTightened;
     45
     46//   printf ("-------- BOUNDS DURING ------------\n  ");
     47//   j=0;
     48//   for (int i=0; i < ncols; i++) {
     49//     printf("x_%03d [%+15.8g %+15.8g] ", i, getColLower () [i], getColUpper () [i]);
     50//     if (!(++j % 6)) printf ("\n  ");
     51//   }
     52//   if (j % 6) printf ("\n");
    3453
    3554  if (nTightened > 0) {
     
    7493    }
    7594
     95    const double
     96      *newerLower = cutgen_ -> Problem () -> Lb (),
     97      *newerUpper = cutgen_ -> Problem () -> Ub ();
     98
     99//     printf ("-------- BOUNDS AFTER ------------\n  ");
     100//     for (int i=0; i < ncols; i++) {
     101//       printf("x_%03d [%+15.8g %+15.8g] ", i, newerLower [i], newerUpper [i]);
     102//       if (!(++j % 6)) printf ("\n  ");
     103//     }
     104//     if (j % 6) printf ("\n");
     105
    76106    cutgen_ -> Problem () -> domain () -> pop ();
    77107
  • stable/0.2/Couenne/src/problem/CouenneSolverInterface.cpp

    r159 r201  
    1 /* $Id: CouenneSolverInterface.cpp 154 2009-06-16 18:52:53Z pbelotti $ */
    2 /*
     1/* $Id$
     2 *
    33 * Name:    CouenneSolverInterface.cpp
    44 * Authors: Pietro Belotti, Carnegie Mellon University
     
    2626
    2727  // prevents from running OsiClpSolverInterface::tightenBounds()
    28   specialOptions_ = specialOptions_ | 262144;
     28  if (cutgen_ && !(cutgen_ -> enableLpImpliedBounds ()))
     29    specialOptions_ = specialOptions_ | 262144;
    2930}
    3031
  • stable/0.2/Couenne/src/problem/CouenneSolverInterface.hpp

    r159 r201  
    5555  /// pointer due to cut generator cloning (it happens twice in the
    5656  /// algorithm)
    57   void setCutGenPtr (CouenneCutGenerator *cg)
    58   {cutgen_ = cg;}
     57  void setCutGenPtr (CouenneCutGenerator *cg) {
     58    cutgen_ = cg;
     59    if (cutgen_ && !(cutgen_ -> enableLpImpliedBounds ()))
     60      specialOptions_ = specialOptions_ | 262144;
     61  }
    5962
    6063  /// Solve initial LP relaxation
     
    8386  /// Tighten bounds on all variables (including continuous).
    8487  virtual int tightenBounds (int lightweight);
     88
     89  /// Copy of the Clp version --- not light version
     90  virtual int tightenBoundsCLP (int lightweight);
     91
     92  /// Copy of the Clp version --- light version
     93  virtual int tightenBoundsCLP_Light (int lightweight);
    8594
    8695  /// Returns pointer to CLP structure.
  • stable/0.2/Couenne/src/problem/Makefile.am

    r110 r201  
    2121        CouenneSolverInterface.cpp \
    2222        CouenneLPtightenBounds.cpp \
     23        CouenneLPtightenBoundsCLP.cpp \
     24        CouenneLPtightenBoundsCLP-light.cpp \
    2325        checkNLP.cpp \
    2426        getIntegerCandidate.cpp \
     
    3032        depGraph/depGraph.cpp \
    3133        depGraph/checkCycles.cpp
    32        
     34
    3335if COIN_HAS_ASL
    3436libCouenneProblem_la_SOURCES += \
  • stable/0.2/Couenne/src/problem/Makefile.in

    r110 r201  
    7575        fillQuadIndices.cpp fillDependence.cpp \
    7676        CouenneSolverInterface.cpp CouenneLPtightenBounds.cpp \
    77         checkNLP.cpp getIntegerCandidate.cpp testIntFix.cpp \
    78         CouenneSOS.cpp CouenneProblemConstructors.cpp \
    79         CouenneRestoreUnused.cpp reformulate.cpp depGraph/depGraph.cpp \
    80         depGraph/checkCycles.cpp ../readnl/readnl.cpp \
    81         ../readnl/nl2e.cpp ../readnl/invmap.cpp \
     77        CouenneLPtightenBoundsCLP.cpp \
     78        CouenneLPtightenBoundsCLP-light.cpp checkNLP.cpp \
     79        getIntegerCandidate.cpp testIntFix.cpp CouenneSOS.cpp \
     80        CouenneProblemConstructors.cpp CouenneRestoreUnused.cpp \
     81        reformulate.cpp depGraph/depGraph.cpp depGraph/checkCycles.cpp \
     82        ../readnl/readnl.cpp ../readnl/nl2e.cpp ../readnl/invmap.cpp \
    8283        ../readnl/readASLfg.cpp
    8384@COIN_HAS_ASL_TRUE@am__objects_1 = readnl.lo nl2e.lo invmap.lo \
     
    8687        problemIO.lo writeAMPL.lo writeGAMS.lo constraint.lo \
    8788        fillQuadIndices.lo fillDependence.lo CouenneSolverInterface.lo \
    88         CouenneLPtightenBounds.lo checkNLP.lo getIntegerCandidate.lo \
    89         testIntFix.lo CouenneSOS.lo CouenneProblemConstructors.lo \
    90         CouenneRestoreUnused.lo reformulate.lo depGraph.lo \
    91         checkCycles.lo $(am__objects_1)
     89        CouenneLPtightenBounds.lo CouenneLPtightenBoundsCLP.lo \
     90        CouenneLPtightenBoundsCLP-light.lo checkNLP.lo \
     91        getIntegerCandidate.lo testIntFix.lo CouenneSOS.lo \
     92        CouenneProblemConstructors.lo CouenneRestoreUnused.lo \
     93        reformulate.lo depGraph.lo checkCycles.lo $(am__objects_1)
    9294libCouenneProblem_la_OBJECTS = $(am_libCouenneProblem_la_OBJECTS)
    9395DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/inc
     
    300302        fillQuadIndices.cpp fillDependence.cpp \
    301303        CouenneSolverInterface.cpp CouenneLPtightenBounds.cpp \
    302         checkNLP.cpp getIntegerCandidate.cpp testIntFix.cpp \
    303         CouenneSOS.cpp CouenneProblemConstructors.cpp \
    304         CouenneRestoreUnused.cpp reformulate.cpp depGraph/depGraph.cpp \
    305         depGraph/checkCycles.cpp $(am__append_1)
     304        CouenneLPtightenBoundsCLP.cpp \
     305        CouenneLPtightenBoundsCLP-light.cpp checkNLP.cpp \
     306        getIntegerCandidate.cpp testIntFix.cpp CouenneSOS.cpp \
     307        CouenneProblemConstructors.cpp CouenneRestoreUnused.cpp \
     308        reformulate.cpp depGraph/depGraph.cpp depGraph/checkCycles.cpp \
     309        $(am__append_1)
    306310libCouenneProblem_la_DEPENDENCIES = $(libCouenneProblem_la_LIBADD)
    307311
     
    377381
    378382@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CouenneLPtightenBounds.Plo@am__quote@
     383@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CouenneLPtightenBoundsCLP-light.Plo@am__quote@
     384@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CouenneLPtightenBoundsCLP.Plo@am__quote@
    379385@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CouenneProblem.Plo@am__quote@
    380386@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CouenneProblemConstructors.Plo@am__quote@
  • stable/0.2/Couenne/src/readnl/readnl.cpp

    r159 r201  
    1 /* $Id: readnl.cpp 154 2009-06-16 18:52:53Z pbelotti $ */
    2 /*
     1/* $Id$
     2 *
    33 * Name:    readnl.cpp
    44 * Author:  Pietro Belotti
     
    1010
    1111#include "CouenneProblem.hpp"
     12
     13#if   defined HAVE_CSTDINT
     14#include "cstdint"
     15#elif defined HAVE_STDINT_H
     16#include "stdint.h"
     17#endif
    1218
    1319#include "CouenneTypes.hpp"
  • stable/0.2/Couenne/src/standardize/standardize.cpp

    r159 r201  
    278278
    279279  std::string delete_redund;
    280   bonBase_ -> options () -> GetStringValue ("delete_redundant", delete_redund, "couenne.");
     280  if (bonBase_)
     281    bonBase_ -> options () -> GetStringValue ("delete_redundant", delete_redund, "couenne.");
     282  else
     283    delete_redund = "yes";
    281284
    282285  if (delete_redund == "yes")
  • stable/0.2/Makefile.am

    r5 r201  
    3838
    3939doxydoc:
    40         doxygen doxydoc/doxygen.conf
     40        cd ${srcdir}; doxygen doxydoc/doxygen.conf
    4141
    4242.PHONY: test unitTest tests unitTests doxydoc
  • stable/0.2/Makefile.in

    r13 r201  
    684684
    685685doxydoc:
    686         doxygen doxydoc/doxygen.conf
     686        cd ${srcdir}; doxygen doxydoc/doxygen.conf
    687687
    688688.PHONY: test unitTest tests unitTests doxydoc
  • stable/0.2/doxydoc/doxygen.conf

    r58 r201  
    22PROJECT_NAME           = Couenne
    33
    4 PROJECT_NUMBER         = 0.1
    5 
    6 OUTPUT_DIRECTORY       = Doc
     4PROJECT_NUMBER         = 0.2
     5
     6OUTPUT_DIRECTORY       = doxydoc
    77
    88CREATE_SUBDIRS         = NO
     
    118118WARN_LOGFILE           =
    119119
    120 INPUT                  = /home/pietro/res/minlp/global/Couenne-trunk/Couenne/src
    121 
    122 FILE_PATTERNS          = *.hpp *.h
     120INPUT                  = Couenne/src/ Couenne/doc/
     121
     122FILE_PATTERNS          = *.hpp *.h *.dox
    123123
    124124RECURSIVE              = YES
  • stable/0.2/doxydoc/doxygen.conf.in

    r61 r201  
    22PROJECT_NAME           = Couenne
    33
    4 PROJECT_NUMBER         = 0.1
    5 
    6 OUTPUT_DIRECTORY       = Doc
     4PROJECT_NUMBER         = 0.2
     5
     6OUTPUT_DIRECTORY       = doxydoc
    77
    88CREATE_SUBDIRS         = NO
     
    118118WARN_LOGFILE           =
    119119
    120 INPUT                  = @abs_source_dir@/Couenne/src @abs_source_dir@/Couenne/doc
     120INPUT                  = Couenne/src Couenne/doc
    121121
    122122FILE_PATTERNS          = *.hpp *.h *.dox
Note: See TracChangeset for help on using the changeset viewer.