Changeset 640


Ignore:
Timestamp:
Jun 26, 2007 5:17:15 AM (12 years ago)
Author:
forrest
Message:

trunk from branches/devel

Location:
trunk
Files:
23 added
55 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:externals
      •  

        old new  
        1 MSVisualStudio   https://projects.coin-or.org/svn/MSVisualStudio/trunk/ExternalsDirs/Cbc
        2 BuildTools    https://projects.coin-or.org/svn/BuildTools/stable/0.5
         1MSVisualStudio   https://projects.coin-or.org/svn/MSVisualStudio/branches/devel/ExternalsDirs/Cbc
         2BuildTools    https://projects.coin-or.org/svn/BuildTools/trunk
        33ThirdParty/ASL https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/stable/1.0
         4ThirdParty/Blas https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/stable/1.0
         5ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/stable/1.0
        46Data/Netlib   https://projects.coin-or.org/svn/Data/stable/1.0/Netlib
        57Data/Sample   https://projects.coin-or.org/svn/Data/stable/1.0/Sample
  • trunk/Cbc/Makefile.am

    r527 r640  
    5858        examples/CbcSolverLongThin.cpp \
    5959        examples/CbcSolverLongThin.hpp \
     60        examples/CbcSolverLink.hpp \
     61        examples/CbcSolverLink.cpp \
    6062        examples/ClpQuadInterface.cpp \
    6163        examples/ClpQuadInterface.hpp \
     64        examples/OsiBranchLink.cpp \
     65        examples/OsiBranchLink.hpp \
     66        examples/OsiSolverLink.hpp \
     67        examples/OsiSolverLink.cpp \
    6268        examples/crew.cpp \
    6369        examples/driver2.cpp \
  • trunk/Cbc/Makefile.in

    r527 r640  
    6262        $(srcdir)/../ltmain.sh $(srcdir)/../missing \
    6363        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
    64         $(srcdir)/cbc_addlibs.txt.in \
    65         $(top_srcdir)/../Clp/src/CbcOrClpParam.cpp \
    66         $(top_srcdir)/../Clp/src/CbcOrClpParam.hpp \
    67         $(top_srcdir)/configure $(top_srcdir)/examples/Makefile.in \
     64        $(srcdir)/cbc_addlibs.txt.in $(top_srcdir)/configure \
     65        $(top_srcdir)/examples/Makefile.in \
    6866        $(top_srcdir)/inc/config_cbc.h.in AUTHORS
    6967@HAVE_EXTERNALS_TRUE@am__append_2 = Externals
     
    122120CBCOBJDIR = @CBCOBJDIR@
    123121CBCSRCDIR = @CBCSRCDIR@
     122CBC_BUILD_CBC_GENERIC_FALSE = @CBC_BUILD_CBC_GENERIC_FALSE@
     123CBC_BUILD_CBC_GENERIC_TRUE = @CBC_BUILD_CBC_GENERIC_TRUE@
    124124CC = @CC@
    125125CCDEPMODE = @CCDEPMODE@
     
    320320        examples/CbcSolver2.hpp examples/CbcSolver3.cpp \
    321321        examples/CbcSolver3.hpp examples/CbcSolverLongThin.cpp \
    322         examples/CbcSolverLongThin.hpp examples/ClpQuadInterface.cpp \
    323         examples/ClpQuadInterface.hpp examples/crew.cpp \
     322        examples/CbcSolverLongThin.hpp examples/CbcSolverLink.hpp \
     323        examples/CbcSolverLink.cpp examples/ClpQuadInterface.cpp \
     324        examples/ClpQuadInterface.hpp examples/OsiBranchLink.cpp \
     325        examples/OsiBranchLink.hpp examples/OsiSolverLink.hpp \
     326        examples/OsiSolverLink.cpp examples/crew.cpp \
    324327        examples/driver2.cpp examples/driver.cpp \
    325328        examples/fast0507b.cpp examples/fast0507.cpp examples/gear.cpp \
     
    546549        $(am__remove_distdir)
    547550        mkdir $(distdir)
    548         $(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../BuildTools $(distdir)/../Clp/src $(distdir)/doc $(distdir)/examples $(distdir)/inc
     551        $(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../BuildTools $(distdir)/doc $(distdir)/examples $(distdir)/inc
    549552        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    550553        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
  • trunk/Cbc/configure

    r567 r640  
    473473#endif"
    474474
    475 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os ADDLIBS FADDLIBS ALWAYS_FALSE_TRUE ALWAYS_FALSE_FALSE CDEFS ADD_CFLAGS DBG_CFLAGS OPT_CFLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT MPICC CXXDEFS ADD_CXXFLAGS DBG_CXXFLAGS OPT_CXXFLAGS CXX CXXFLAGS ac_ct_CXX MPICXX EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOLM4 have_autoconf have_automake have_svn BUILDTOOLSDIR AUX_DIR abs_source_dir abs_lib_dir abs_include_dir abs_bin_dir HAVE_EXTERNALS_TRUE HAVE_EXTERNALS_FALSE host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ac_c_preproc_warn_flag ac_cxx_preproc_warn_flag RPATH_FLAGS LT_LDFLAGS CBCSRCDIR CBCOBJDIR COIN_HAS_CBC_TRUE COIN_HAS_CBC_FALSE CGLSRCDIR CGLOBJDIR COIN_HAS_CGL_TRUE COIN_HAS_CGL_FALSE CLPSRCDIR CLPOBJDIR COIN_HAS_CLP_TRUE COIN_HAS_CLP_FALSE COINUTILSSRCDIR COINUTILSOBJDIR COIN_HAS_COINUTILS_TRUE COIN_HAS_COINUTILS_FALSE DYLPSRCDIR DYLPOBJDIR COIN_HAS_DYLP_TRUE COIN_HAS_DYLP_FALSE OSISRCDIR OSIOBJDIR COIN_HAS_OSI_TRUE COIN_HAS_OSI_FALSE SYMSRCDIR SYMOBJDIR COIN_HAS_SYM_TRUE COIN_HAS_SYM_FALSE VOLSRCDIR VOLOBJDIR COIN_HAS_VOL_TRUE COIN_HAS_VOL_FALSE CPXINCDIR CPXLIB COIN_HAS_CPX_TRUE COIN_HAS_CPX_FALSE GLPKINCDIR GLPKLIB COIN_HAS_GLPK_TRUE COIN_HAS_GLPK_FALSE FMPINCDIR FMPLIB COIN_HAS_FMP_TRUE COIN_HAS_FMP_FALSE MSKINCDIR MSKLIB COIN_HAS_MSK_TRUE COIN_HAS_MSK_FALSE OSLINCDIR OSLLIB COIN_HAS_OSL_TRUE COIN_HAS_OSL_FALSE SPXINCDIR SPXLIB COIN_HAS_SPX_TRUE COIN_HAS_SPX_FALSE XPRINCDIR XPRLIB COIN_HAS_XPR_TRUE COIN_HAS_XPR_FALSE ASLLIB ASL_CPPFLAGS COIN_HAS_ASL_TRUE COIN_HAS_ASL_FALSE LIBEXT VPATH_DISTCLEANFILES LIBOBJS LTLIBOBJS'
     475ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os ADDLIBS FADDLIBS ALWAYS_FALSE_TRUE ALWAYS_FALSE_FALSE CDEFS ADD_CFLAGS DBG_CFLAGS OPT_CFLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT MPICC CXXDEFS ADD_CXXFLAGS DBG_CXXFLAGS OPT_CXXFLAGS CXX CXXFLAGS ac_ct_CXX MPICXX EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOLM4 have_autoconf have_automake have_svn BUILDTOOLSDIR AUX_DIR abs_source_dir abs_lib_dir abs_include_dir abs_bin_dir HAVE_EXTERNALS_TRUE HAVE_EXTERNALS_FALSE host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ac_c_preproc_warn_flag ac_cxx_preproc_warn_flag RPATH_FLAGS LT_LDFLAGS CBCSRCDIR CBCOBJDIR COIN_HAS_CBC_TRUE COIN_HAS_CBC_FALSE CGLSRCDIR CGLOBJDIR COIN_HAS_CGL_TRUE COIN_HAS_CGL_FALSE CLPSRCDIR CLPOBJDIR COIN_HAS_CLP_TRUE COIN_HAS_CLP_FALSE COINUTILSSRCDIR COINUTILSOBJDIR COIN_HAS_COINUTILS_TRUE COIN_HAS_COINUTILS_FALSE DYLPSRCDIR DYLPOBJDIR COIN_HAS_DYLP_TRUE COIN_HAS_DYLP_FALSE OSISRCDIR OSIOBJDIR COIN_HAS_OSI_TRUE COIN_HAS_OSI_FALSE SYMSRCDIR SYMOBJDIR COIN_HAS_SYM_TRUE COIN_HAS_SYM_FALSE VOLSRCDIR VOLOBJDIR COIN_HAS_VOL_TRUE COIN_HAS_VOL_FALSE CPXINCDIR CPXLIB COIN_HAS_CPX_TRUE COIN_HAS_CPX_FALSE GLPKINCDIR GLPKLIB COIN_HAS_GLPK_TRUE COIN_HAS_GLPK_FALSE FMPINCDIR FMPLIB COIN_HAS_FMP_TRUE COIN_HAS_FMP_FALSE MSKINCDIR MSKLIB COIN_HAS_MSK_TRUE COIN_HAS_MSK_FALSE OSLINCDIR OSLLIB COIN_HAS_OSL_TRUE COIN_HAS_OSL_FALSE SPXINCDIR SPXLIB COIN_HAS_SPX_TRUE COIN_HAS_SPX_FALSE XPRINCDIR XPRLIB COIN_HAS_XPR_TRUE COIN_HAS_XPR_FALSE ASLLIB ASL_CPPFLAGS COIN_HAS_ASL_TRUE COIN_HAS_ASL_FALSE CBC_BUILD_CBC_GENERIC_TRUE CBC_BUILD_CBC_GENERIC_FALSE LIBEXT VPATH_DISTCLEANFILES LIBOBJS LTLIBOBJS'
    476476ac_subst_files=''
    477477
     
    11101110                          use disable-xpress-libcheck to skip the
    11111111                          link check at configuration time
     1112  --enable-cbc-parallel   enables compilation of the SMP version of Cbc
    11121113
    11131114Optional Packages:
     
    11211122  --with-tags[=TAGS]
    11221123                          include additional configurations [automatic]
    1123   --with-cbc-default-solver
    1124                           specify default solver for Cbc in lower case letters
    1125                           (if not given, clp is assumed)
    1126   --with-cplex-incdir specify the directory with the header files for library
    1127                           Cplex
    1128   --with-cplex-lib specify the flags to link with the library Cplex
    1129   --with-glpk-incdir specify the directory with the header files for library
    1130                           Glpk
    1131   --with-glpk-lib specify the flags to link with the library Glpk
    1132   --with-fortmp-incdir specify the directory with the header files for library
    1133                           FortMP
    1134   --with-fortmp-lib specify the flags to link with the library FortMP
    1135   --with-mosek-incdir specify the directory with the header files for library
    1136                           Mosek
    1137   --with-mosek-lib specify the flags to link with the library Mosek
    1138   --with-osl-incdir specify the directory with the header files for library
    1139                           Osl
    1140   --with-osl-lib specify the flags to link with the library Osl
    1141   --with-soplex-incdir specify the directory with the header files for library
    1142                           Soplex
    1143   --with-soplex-lib specify the flags to link with the library Soplex
    1144   --with-xpress-incdir specify the directory with the header files for library
    1145                           Xpress
    1146   --with-xpress-lib specify the flags to link with the library Xpress
     1124  --with-cplex-incdir specify the header file directory for library Cplex
     1125  --with-cplex-lib specify the flags used to link with the library Cplex
     1126  --with-glpk-incdir specify the header file directory for library Glpk
     1127  --with-glpk-lib specify the flags used to link with the library Glpk
     1128  --with-fortmp-incdir specify the header file directory for library FortMP
     1129  --with-fortmp-lib specify the flags used to link with the library FortMP
     1130  --with-mosek-incdir specify the header file directory for library Mosek
     1131  --with-mosek-lib specify the flags used to link with the library Mosek
     1132  --with-osl-incdir specify the header file directory for library Osl
     1133  --with-osl-lib specify the flags used to link with the library Osl
     1134  --with-soplex-incdir specify the header file directory for library Soplex
     1135  --with-soplex-lib specify the flags used to link with the library Soplex
     1136  --with-xpress-incdir specify the header file directory for library Xpress
     1137  --with-xpress-lib specify the flags used to link with the library Xpress
    11471138  --with-asldir           specify path to AMPL solver directory (or BUILD for
    11481139                          compilation, or "no" for disabling AMPL)
     1140  --with-cbc-generic      specify whether to build cbc-generic (default: no)
     1141  --with-cbc-generic-solver
     1142                          specify default solver for cbc-generic in lower case
     1143                          letters (if not given, clp is assumed)
    11491144
    11501145Some influential environment variables:
     
    17911786if test "${with_cbc_verbosity+set}" = set; then
    17921787  withval="$with_cbc_verbosity"
    1793   coin_cbc_verbosity=$withval
     1788  if test "$withval" = yes; then
     1789                withval=1
     1790              fi
     1791              coin_cbc_verbosity=$withval
    17941792else
    17951793  coin_cbc_verbosity=0
     
    18051803if test "${with_cbc_checklevel+set}" = set; then
    18061804  withval="$with_cbc_checklevel"
    1807   coin_cbc_checklevel=$withval
     1805  if test "$withval" = yes; then
     1806                withval=1
     1807              fi
     1808              coin_cbc_checklevel=$withval
    18081809else
    18091810  coin_cbc_checklevel=0
     
    56695670*-*-irix6*)
    56705671  # Find out which ABI we are using.
    5671   echo '#line 5671 "configure"' > conftest.$ac_ext
     5672  echo '#line 5672 "configure"' > conftest.$ac_ext
    56725673  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    56735674  (eval $ac_compile) 2>&5
     
    68036804
    68046805# Provide some information about the compiler.
    6805 echo "$as_me:6805:" \
     6806echo "$as_me:6806:" \
    68066807     "checking for Fortran 77 compiler version" >&5
    68076808ac_compiler=`set X $ac_compile; echo $2`
     
    78707871   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    78717872   -e 's:$: $lt_compiler_flag:'`
    7872    (eval echo "\"\$as_me:7872: $lt_compile\"" >&5)
     7873   (eval echo "\"\$as_me:7873: $lt_compile\"" >&5)
    78737874   (eval "$lt_compile" 2>conftest.err)
    78747875   ac_status=$?
    78757876   cat conftest.err >&5
    7876    echo "$as_me:7876: \$? = $ac_status" >&5
     7877   echo "$as_me:7877: \$? = $ac_status" >&5
    78777878   if (exit $ac_status) && test -s "$ac_outfile"; then
    78787879     # The compiler can only warn and ignore the option if not recognized
     
    81388139   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81398140   -e 's:$: $lt_compiler_flag:'`
    8140    (eval echo "\"\$as_me:8140: $lt_compile\"" >&5)
     8141   (eval echo "\"\$as_me:8141: $lt_compile\"" >&5)
    81418142   (eval "$lt_compile" 2>conftest.err)
    81428143   ac_status=$?
    81438144   cat conftest.err >&5
    8144    echo "$as_me:8144: \$? = $ac_status" >&5
     8145   echo "$as_me:8145: \$? = $ac_status" >&5
    81458146   if (exit $ac_status) && test -s "$ac_outfile"; then
    81468147     # The compiler can only warn and ignore the option if not recognized
     
    82428243   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    82438244   -e 's:$: $lt_compiler_flag:'`
    8244    (eval echo "\"\$as_me:8244: $lt_compile\"" >&5)
     8245   (eval echo "\"\$as_me:8245: $lt_compile\"" >&5)
    82458246   (eval "$lt_compile" 2>out/conftest.err)
    82468247   ac_status=$?
    82478248   cat out/conftest.err >&5
    8248    echo "$as_me:8248: \$? = $ac_status" >&5
     8249   echo "$as_me:8249: \$? = $ac_status" >&5
    82498250   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    82508251   then
     
    1058710588  lt_status=$lt_dlunknown
    1058810589  cat > conftest.$ac_ext <<EOF
    10589 #line 10589 "configure"
     10590#line 10590 "configure"
    1059010591#include "confdefs.h"
    1059110592
     
    1068710688  lt_status=$lt_dlunknown
    1068810689  cat > conftest.$ac_ext <<EOF
    10689 #line 10689 "configure"
     10690#line 10690 "configure"
    1069010691#include "confdefs.h"
    1069110692
     
    1303113032   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1303213033   -e 's:$: $lt_compiler_flag:'`
    13033    (eval echo "\"\$as_me:13033: $lt_compile\"" >&5)
     13034   (eval echo "\"\$as_me:13034: $lt_compile\"" >&5)
    1303413035   (eval "$lt_compile" 2>conftest.err)
    1303513036   ac_status=$?
    1303613037   cat conftest.err >&5
    13037    echo "$as_me:13037: \$? = $ac_status" >&5
     13038   echo "$as_me:13038: \$? = $ac_status" >&5
    1303813039   if (exit $ac_status) && test -s "$ac_outfile"; then
    1303913040     # The compiler can only warn and ignore the option if not recognized
     
    1313513136   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1313613137   -e 's:$: $lt_compiler_flag:'`
    13137    (eval echo "\"\$as_me:13137: $lt_compile\"" >&5)
     13138   (eval echo "\"\$as_me:13138: $lt_compile\"" >&5)
    1313813139   (eval "$lt_compile" 2>out/conftest.err)
    1313913140   ac_status=$?
    1314013141   cat out/conftest.err >&5
    13141    echo "$as_me:13141: \$? = $ac_status" >&5
     13142   echo "$as_me:13142: \$? = $ac_status" >&5
    1314213143   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1314313144   then
     
    1470514706   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1470614707   -e 's:$: $lt_compiler_flag:'`
    14707    (eval echo "\"\$as_me:14707: $lt_compile\"" >&5)
     14708   (eval echo "\"\$as_me:14708: $lt_compile\"" >&5)
    1470814709   (eval "$lt_compile" 2>conftest.err)
    1470914710   ac_status=$?
    1471014711   cat conftest.err >&5
    14711    echo "$as_me:14711: \$? = $ac_status" >&5
     14712   echo "$as_me:14712: \$? = $ac_status" >&5
    1471214713   if (exit $ac_status) && test -s "$ac_outfile"; then
    1471314714     # The compiler can only warn and ignore the option if not recognized
     
    1480914810   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1481014811   -e 's:$: $lt_compiler_flag:'`
    14811    (eval echo "\"\$as_me:14811: $lt_compile\"" >&5)
     14812   (eval echo "\"\$as_me:14812: $lt_compile\"" >&5)
    1481214813   (eval "$lt_compile" 2>out/conftest.err)
    1481314814   ac_status=$?
    1481414815   cat out/conftest.err >&5
    14815    echo "$as_me:14815: \$? = $ac_status" >&5
     14816   echo "$as_me:14816: \$? = $ac_status" >&5
    1481614817   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1481714818   then
     
    1701617017   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1701717018   -e 's:$: $lt_compiler_flag:'`
    17018    (eval echo "\"\$as_me:17018: $lt_compile\"" >&5)
     17019   (eval echo "\"\$as_me:17019: $lt_compile\"" >&5)
    1701917020   (eval "$lt_compile" 2>conftest.err)
    1702017021   ac_status=$?
    1702117022   cat conftest.err >&5
    17022    echo "$as_me:17022: \$? = $ac_status" >&5
     17023   echo "$as_me:17023: \$? = $ac_status" >&5
    1702317024   if (exit $ac_status) && test -s "$ac_outfile"; then
    1702417025     # The compiler can only warn and ignore the option if not recognized
     
    1728417285   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1728517286   -e 's:$: $lt_compiler_flag:'`
    17286    (eval echo "\"\$as_me:17286: $lt_compile\"" >&5)
     17287   (eval echo "\"\$as_me:17287: $lt_compile\"" >&5)
    1728717288   (eval "$lt_compile" 2>conftest.err)
    1728817289   ac_status=$?
    1728917290   cat conftest.err >&5
    17290    echo "$as_me:17290: \$? = $ac_status" >&5
     17291   echo "$as_me:17291: \$? = $ac_status" >&5
    1729117292   if (exit $ac_status) && test -s "$ac_outfile"; then
    1729217293     # The compiler can only warn and ignore the option if not recognized
     
    1738817389   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1738917390   -e 's:$: $lt_compiler_flag:'`
    17390    (eval echo "\"\$as_me:17390: $lt_compile\"" >&5)
     17391   (eval echo "\"\$as_me:17391: $lt_compile\"" >&5)
    1739117392   (eval "$lt_compile" 2>out/conftest.err)
    1739217393   ac_status=$?
    1739317394   cat out/conftest.err >&5
    17394    echo "$as_me:17394: \$? = $ac_status" >&5
     17395   echo "$as_me:17395: \$? = $ac_status" >&5
    1739517396   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1739617397   then
     
    2009520096  { echo "$as_me:$LINENO: Build is \"$build\"." >&5
    2009620097echo "$as_me: Build is \"$build\"." >&6;}
     20098  mydos2unix='| dos2unix'
    2009720099  case $build in
    2009820100    *-mingw*)
    2009920101      CYGPATH_W=echo
     20102      mydos2unix=
    2010020103      ;;
    2010120104  esac
    2010220105
    2010320106  case $build in
     20107    *x86_64-*)
     20108# Here we need to check if -m32 is specified.  If so, we need to correct sys_lib_search_path_spec
     20109      if test "$GCC" = yes && (echo $CXXFLAGS $CFLAGS $FFLAGS | $EGREP 'm32' >& /dev/null); then
     20110        { echo "$as_me:$LINENO: Applying patches to libtool for 32bit compilation" >&5
     20111echo "$as_me: Applying patches to libtool for 32bit compilation" >&6;}
     20112        sed -e 's|sys_lib_search_path_spec=".*"|sys_lib_search_path_spec="/lib /usr/lib"|' libtool > conftest.bla
     20113        mv conftest.bla libtool
     20114        chmod 755 libtool
     20115      fi
     20116      ;;
    2010420117    *-cygwin* | *-mingw*)
    2010520118    case "$CXX" in
     
    2011320126            -e 's%lib /OUT:%lib -OUT:%' \
    2011420127            -e "s%cygpath -w%$CYGPATH_W%" \
    20115             -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
     20128            -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo '"$mydos2unix"'\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
    2011620129            -e 's/$AR t/lib -nologo -list/' \
    2011720130            -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
    20118             -e  's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
     20131            -e 's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
     20132            -e 's%old_archive_cmds="lib -OUT:\\$oldlib\\$oldobjs\\$old_deplibs"%old_archive_cmds="if test -r \\$oldlib; then bla=\\"\\$oldlib\\"; else bla=; fi; lib -OUT:\\$oldlib \\\\\\$bla\\$oldobjs\\$old_deplibs"%' \
    2011920133        libtool > conftest.bla
    2012020134
     
    2013420148        ;;
    2013520149    esac
     20150    ;;
     20151    *-darwin*)
     20152      { echo "$as_me:$LINENO: Applying patches to libtool for Darwin" >&5
     20153echo "$as_me: Applying patches to libtool for Darwin" >&6;}
     20154      sed -e 's/verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"/verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"/' \
     20155      libtool > conftest.bla
     20156
     20157      mv conftest.bla libtool
     20158      chmod 755 libtool
     20159      ;;
    2013620160  esac
    2013720161# This fi matches the commented `if test "x$LIBTOOL" = x;' up at the head of
     
    2069420718
    2069520719
    20696 # ToDo: find out when CBC_HAS_CLP should be defined!  For now, I
    20697 # replaced all CBC_USE by COIN_HAS #ifdef's
    20698 
    20699 # Decide which one is the default solver
    20700 echo "$as_me:$LINENO: checking for CBC default solver" >&5
    20701 echo $ECHO_N "checking for CBC default solver... $ECHO_C" >&6
    20702 
    20703 # Check whether --with-cbc-default-solver or --without-cbc-default-solver was given.
    20704 if test "${with_cbc_default_solver+set}" = set; then
    20705   withval="$with_cbc_default_solver"
    20706   cbc_default_solver=$withval
    20707 else
    20708   cbc_default_solver=clp
    20709 fi;
    20710 echo "$as_me:$LINENO: result: $cbc_default_solver" >&5
    20711 echo "${ECHO_T}$cbc_default_solver" >&6
    20712 
    20713 case $cbc_default_solver in
    20714   clp)
    20715 
    20716 cat >>confdefs.h <<\_ACEOF
    20717 #define CBC_DEFAULT_SOLVER "clp"
    20718 _ACEOF
    20719 
    20720     ;;
    20721   dylp)
    20722     cat >>confdefs.h <<\_ACEOF
    20723 #define CBC_DEFAULT_SOLVER "dylp"
    20724 _ACEOF
    20725 
    20726     ;;
    20727   *)
    20728     { { echo "$as_me:$LINENO: error: Unknown solver $cbc_default_solver chosen as CBC's default solver" >&5
    20729 echo "$as_me: error: Unknown solver $cbc_default_solver chosen as CBC's default solver" >&2;}
    20730    { (exit 1); exit 1; }; }
    20731     ;;
    20732 esac
    20733 
    20734 # Steal some files from Clp - they are going to be deleted by a
    20735 # distclean in src (see the Makefile.am there)
    20736 if test x"$coin_has_clp" != xunavailable; then
    20737   { echo "$as_me:$LINENO: Stealing CbcOrClpParam's files from Clp" >&5
    20738 echo "$as_me: Stealing CbcOrClpParam's files from Clp" >&6;}
    20739                       ac_config_links="$ac_config_links src/CbcOrClpParam.cpp:../Clp/src/CbcOrClpParam.cpp src/CbcOrClpParam.hpp:../Clp/src/CbcOrClpParam.hpp"
    20740 
    20741 fi
    20742 
    2074320720#############################################################################
    2074420721#                            Third party solvers                            #
     
    2074720724# Check which third party solvers are available ToDo!
    2074820725
    20749 echo "$as_me:$LINENO: checking if user provides library for Cplex" >&5
     20726  echo "$as_me:$LINENO: checking if user provides library for Cplex" >&5
    2075020727echo $ECHO_N "checking if user provides library for Cplex... $ECHO_C" >&6
    2075120728
    2075220729# Check for header file directory
     20730
    2075320731
    2075420732# Check whether --with-cplex-incdir or --without-cplex-incdir was given.
     
    2075720735  CPXINCDIR=`cd $withval; pwd`
    2075820736fi;
     20737
    2075920738# Check for library directory
     20739
    2076020740
    2076120741# Check whether --with-cplex-lib or --without-cplex-lib was given.
     
    2076420744  CPXLIB=$withval
    2076520745fi;
     20746
    2076620747# Switch to disable library check if requested
    20767 # Check whether --enable-cplex-libcheck or --disable-cplex-libcheck was given.
     20748
     20749  # Check whether --enable-cplex-libcheck or --disable-cplex-libcheck was given.
    2076820750if test "${enable_cplex_libcheck+set}" = set; then
    2076920751  enableval="$enable_cplex_libcheck"
     
    2077320755fi;
    2077420756
    20775 if test x"$CPXINCDIR" != x || test x"$CPXLIB" != x; then
    20776   coin_has_cpx=true
    20777 else
    20778   coin_has_cpx=false
    20779 fi
    20780 
    20781 if test $coin_has_cpx = true; then
    20782 # Check either both arguments or none are given
    20783   if test x"$CPXINCDIR" = x || test x"$CPXLIB" = x; then
    20784     { { echo "$as_me:$LINENO: error: You need to specify both --with-cplex-incdir and --with-cplex-lib if you want to use library Cplex" >&5
    20785 echo "$as_me: error: You need to specify both --with-cplex-incdir and --with-cplex-lib if you want to use library Cplex" >&2;}
     20757# At this point, if we're going to use the library, both LBRYINCDIR and
     20758# LBRYLIB must be defined and not empty.
     20759
     20760  if test x"$CPXINCDIR" != x || test x"$CPXLIB" != x; then
     20761    if test x"$CPXINCDIR" = x || test x"$CPXLIB" = x; then
     20762      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Cplex. Use --with-cplex-incdir of environment variable $CPXINCDIR to specify the include directory. Use --with-cplex-lib or environment variable $CPXLIB to specify link flags." >&5
     20763echo "$as_me: error: You need to specify both an include directory and link flags to use library Cplex. Use --with-cplex-incdir of environment variable $CPXINCDIR to specify the include directory. Use --with-cplex-lib or environment variable $CPXLIB to specify link flags." >&2;}
    2078620764   { (exit 1); exit 1; }; }
     20765    fi
     20766    coin_has_cpx=true
     20767    echo "$as_me:$LINENO: result: yes" >&5
     20768echo "${ECHO_T}yes" >&6
     20769  else
     20770    coin_has_cpx=false
     20771    echo "$as_me:$LINENO: result: no" >&5
     20772echo "${ECHO_T}no" >&6
    2078720773  fi
    20788   echo "$as_me:$LINENO: result: yes" >&5
    20789 echo "${ECHO_T}yes" >&6
    20790   # Check if the given header file is there
    20791   as_ac_File=`echo "ac_cv_file_$CPXINCDIR/cplex.h" | $as_tr_sh`
     20774
     20775# If we have instructions for use, consider header and link checks.
     20776
     20777  if test $coin_has_cpx = true; then
     20778
     20779# If argument 3 (file) is given, check for the file. Typically this will be a
     20780# header file, but that's not assumed.
     20781
     20782    as_ac_File=`echo "ac_cv_file_$CPXINCDIR/cplex.h" | $as_tr_sh`
    2079220783echo "$as_me:$LINENO: checking for $CPXINCDIR/cplex.h" >&5
    2079320784echo $ECHO_N "checking for $CPXINCDIR/cplex.h... $ECHO_C" >&6
     
    2081620807
    2081720808
    20818   # Check if the symbol is provided in the library
    20819   # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER
    20820   if test x"$cplex_libcheck" != xno; then
    20821                     coin_save_LIBS="$LIBS"
    20822                     LIBS="$CPXLIB $ADDLIBS"
    20823                     echo "$as_me:$LINENO: checking whether symbol CPXgetstat is available with CPX" >&5
    20824 echo $ECHO_N "checking whether symbol CPXgetstat is available with CPX... $ECHO_C" >&6
    20825                     ac_ext=c
     20809# Now see if we can link the function. There are arguments for and against
     20810# assuming argument 3 is a header file declaring the function. A correct
     20811# function declaration is the main argument in favour. Having to cope with
     20812# possible dependencies or other oddities are the main arguments against.
     20813# Force the use of C as the best single choice amongst C++, C, and Fortran.
     20814# Obviously, this has limits.
     20815
     20816    if test x"$cplex_libcheck" != xno; then
     20817           coin_save_LIBS="$LIBS"
     20818           LIBS="$CPXLIB $ADDLIBS"
     20819           coin_CPX_link=no
     20820           ac_ext=c
    2082620821ac_cpp='$CPP $CPPFLAGS'
    2082720822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2082920824ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2083020825
    20831 # ToDo find out what to do about extern "C"
    20832 #                    AC_TRY_LINK([extern "C" {void CPXgetstat();}],[CPXgetstat()],
    20833                     cat >conftest.$ac_ext <<_ACEOF
     20826           for fnm in CPXgetstat ; do
     20827             echo "$as_me:$LINENO: checking whether symbol $fnm is available with CPX" >&5
     20828echo $ECHO_N "checking whether symbol $fnm is available with CPX... $ECHO_C" >&6
     20829             cat >conftest.$ac_ext <<_ACEOF
    2083420830/* confdefs.h.  */
    2083520831_ACEOF
     
    2083720833cat >>conftest.$ac_ext <<_ACEOF
    2083820834/* end confdefs.h.  */
    20839 void CPXgetstat();
     20835
    2084020836int
    2084120837main ()
    2084220838{
    20843 CPXgetstat()
     20839$fnm()
    2084420840  ;
    2084520841  return 0;
     
    2087020866  echo "$as_me:$LINENO: result: yes" >&5
    2087120867echo "${ECHO_T}yes" >&6
     20868                  coin_CPX_link=yes
     20869                  break
    2087220870else
    2087320871  echo "$as_me: failed program was:" >&5
     
    2087620874echo "$as_me:$LINENO: result: no" >&5
    2087720875echo "${ECHO_T}no" >&6
    20878                                  { { echo "$as_me:$LINENO: error: Cannot find symbol CPXgetstat with CPX" >&5
    20879 echo "$as_me: error: Cannot find symbol CPXgetstat with CPX" >&2;}
    20880    { (exit 1); exit 1; }; }
    2088120876fi
    2088220877rm -f conftest.err conftest.$ac_objext \
    2088320878      conftest$ac_exeext conftest.$ac_ext
    20884                     ac_ext=c
     20879           done
     20880           ac_ext=c
    2088520881ac_cpp='$CPP $CPPFLAGS'
    2088620882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2088820884ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2088920885
    20890                     LIBS="$coin_save_LIBS"
    20891                   fi
    20892 
    20893   ADDLIBS="$CPXLIB $ADDLIBS"
     20886           if test x"$coin_CPX_link" = xyes ; then
     20887             LIBS="$coin_save_LIBS"
     20888           else
     20889             { { echo "$as_me:$LINENO: error: Cannot find symbol(s) CPXgetstat with CPX" >&5
     20890echo "$as_me: error: Cannot find symbol(s) CPXgetstat with CPX" >&2;}
     20891   { (exit 1); exit 1; }; }
     20892           fi
     20893         fi
     20894
     20895
     20896# If we make it this far, we've verified the file and linked the function. Add
     20897# the necessary link flags to ADDLIBS and define the preprocessor symbol
     20898# COIN_HAS_LBRY.
     20899
     20900    ADDLIBS="$CPXLIB $ADDLIBS"
    2089420901
    2089520902cat >>confdefs.h <<\_ACEOF
     
    2089720904_ACEOF
    2089820905
    20899 else
    20900   echo "$as_me:$LINENO: result: no" >&5
    20901 echo "${ECHO_T}no" >&6
    20902 fi
     20906  fi
     20907
     20908# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     20909# automake conditional. These actions must occur unconditionally.
    2090320910
    2090420911
     
    2091620923
    2091720924
    20918 echo "$as_me:$LINENO: checking if user provides library for Glpk" >&5
     20925  echo "$as_me:$LINENO: checking if user provides library for Glpk" >&5
    2091920926echo $ECHO_N "checking if user provides library for Glpk... $ECHO_C" >&6
    2092020927
    2092120928# Check for header file directory
     20929
    2092220930
    2092320931# Check whether --with-glpk-incdir or --without-glpk-incdir was given.
     
    2092620934  GLPKINCDIR=`cd $withval; pwd`
    2092720935fi;
     20936
    2092820937# Check for library directory
     20938
    2092920939
    2093020940# Check whether --with-glpk-lib or --without-glpk-lib was given.
     
    2093320943  GLPKLIB=$withval
    2093420944fi;
     20945
    2093520946# Switch to disable library check if requested
    20936 # Check whether --enable-glpk-libcheck or --disable-glpk-libcheck was given.
     20947
     20948  # Check whether --enable-glpk-libcheck or --disable-glpk-libcheck was given.
    2093720949if test "${enable_glpk_libcheck+set}" = set; then
    2093820950  enableval="$enable_glpk_libcheck"
     
    2094220954fi;
    2094320955
    20944 if test x"$GLPKINCDIR" != x || test x"$GLPKLIB" != x; then
    20945   coin_has_glpk=true
    20946 else
    20947   coin_has_glpk=false
    20948 fi
    20949 
    20950 if test $coin_has_glpk = true; then
    20951 # Check either both arguments or none are given
    20952   if test x"$GLPKINCDIR" = x || test x"$GLPKLIB" = x; then
    20953     { { echo "$as_me:$LINENO: error: You need to specify both --with-glpk-incdir and --with-glpk-lib if you want to use library Glpk" >&5
    20954 echo "$as_me: error: You need to specify both --with-glpk-incdir and --with-glpk-lib if you want to use library Glpk" >&2;}
     20956# At this point, if we're going to use the library, both LBRYINCDIR and
     20957# LBRYLIB must be defined and not empty.
     20958
     20959  if test x"$GLPKINCDIR" != x || test x"$GLPKLIB" != x; then
     20960    if test x"$GLPKINCDIR" = x || test x"$GLPKLIB" = x; then
     20961      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Glpk. Use --with-glpk-incdir of environment variable $GLPKINCDIR to specify the include directory. Use --with-glpk-lib or environment variable $GLPKLIB to specify link flags." >&5
     20962echo "$as_me: error: You need to specify both an include directory and link flags to use library Glpk. Use --with-glpk-incdir of environment variable $GLPKINCDIR to specify the include directory. Use --with-glpk-lib or environment variable $GLPKLIB to specify link flags." >&2;}
    2095520963   { (exit 1); exit 1; }; }
     20964    fi
     20965    coin_has_glpk=true
     20966    echo "$as_me:$LINENO: result: yes" >&5
     20967echo "${ECHO_T}yes" >&6
     20968  else
     20969    coin_has_glpk=false
     20970    echo "$as_me:$LINENO: result: no" >&5
     20971echo "${ECHO_T}no" >&6
    2095620972  fi
    20957   echo "$as_me:$LINENO: result: yes" >&5
    20958 echo "${ECHO_T}yes" >&6
    20959   # Check if the given header file is there
    20960   as_ac_File=`echo "ac_cv_file_$GLPKINCDIR/glpk.h" | $as_tr_sh`
     20973
     20974# If we have instructions for use, consider header and link checks.
     20975
     20976  if test $coin_has_glpk = true; then
     20977
     20978# If argument 3 (file) is given, check for the file. Typically this will be a
     20979# header file, but that's not assumed.
     20980
     20981    as_ac_File=`echo "ac_cv_file_$GLPKINCDIR/glpk.h" | $as_tr_sh`
    2096120982echo "$as_me:$LINENO: checking for $GLPKINCDIR/glpk.h" >&5
    2096220983echo $ECHO_N "checking for $GLPKINCDIR/glpk.h... $ECHO_C" >&6
     
    2098521006
    2098621007
    20987   # Check if the symbol is provided in the library
    20988   # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER
    20989   if test x"$glpk_libcheck" != xno; then
    20990                     coin_save_LIBS="$LIBS"
    20991                     LIBS="$GLPKLIB $ADDLIBS"
    20992                     echo "$as_me:$LINENO: checking whether symbol glp_lpx_simplex is available with GLPK" >&5
    20993 echo $ECHO_N "checking whether symbol glp_lpx_simplex is available with GLPK... $ECHO_C" >&6
    20994                     ac_ext=c
     21008# Now see if we can link the function. There are arguments for and against
     21009# assuming argument 3 is a header file declaring the function. A correct
     21010# function declaration is the main argument in favour. Having to cope with
     21011# possible dependencies or other oddities are the main arguments against.
     21012# Force the use of C as the best single choice amongst C++, C, and Fortran.
     21013# Obviously, this has limits.
     21014
     21015    if test x"$glpk_libcheck" != xno; then
     21016           coin_save_LIBS="$LIBS"
     21017           LIBS="$GLPKLIB $ADDLIBS"
     21018           coin_GLPK_link=no
     21019           ac_ext=c
    2099521020ac_cpp='$CPP $CPPFLAGS'
    2099621021ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2099821023ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2099921024
    21000 # ToDo find out what to do about extern "C"
    21001 #                    AC_TRY_LINK([extern "C" {void glp_lpx_simplex();}],[glp_lpx_simplex()],
    21002                     cat >conftest.$ac_ext <<_ACEOF
     21025           for fnm in _glp_lpx_simplex glp_lpx_simplex ; do
     21026             echo "$as_me:$LINENO: checking whether symbol $fnm is available with GLPK" >&5
     21027echo $ECHO_N "checking whether symbol $fnm is available with GLPK... $ECHO_C" >&6
     21028             cat >conftest.$ac_ext <<_ACEOF
    2100321029/* confdefs.h.  */
    2100421030_ACEOF
     
    2100621032cat >>conftest.$ac_ext <<_ACEOF
    2100721033/* end confdefs.h.  */
    21008 void glp_lpx_simplex();
     21034
    2100921035int
    2101021036main ()
    2101121037{
    21012 glp_lpx_simplex()
     21038$fnm()
    2101321039  ;
    2101421040  return 0;
     
    2103921065  echo "$as_me:$LINENO: result: yes" >&5
    2104021066echo "${ECHO_T}yes" >&6
     21067                  coin_GLPK_link=yes
     21068                  break
    2104121069else
    2104221070  echo "$as_me: failed program was:" >&5
     
    2104521073echo "$as_me:$LINENO: result: no" >&5
    2104621074echo "${ECHO_T}no" >&6
    21047                                  { { echo "$as_me:$LINENO: error: Cannot find symbol glp_lpx_simplex with GLPK" >&5
    21048 echo "$as_me: error: Cannot find symbol glp_lpx_simplex with GLPK" >&2;}
    21049    { (exit 1); exit 1; }; }
    2105021075fi
    2105121076rm -f conftest.err conftest.$ac_objext \
    2105221077      conftest$ac_exeext conftest.$ac_ext
    21053                     ac_ext=c
     21078           done
     21079           ac_ext=c
    2105421080ac_cpp='$CPP $CPPFLAGS'
    2105521081ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2105721083ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2105821084
    21059                     LIBS="$coin_save_LIBS"
    21060                   fi
    21061 
    21062   ADDLIBS="$GLPKLIB $ADDLIBS"
     21085           if test x"$coin_GLPK_link" = xyes ; then
     21086             LIBS="$coin_save_LIBS"
     21087           else
     21088             { { echo "$as_me:$LINENO: error: Cannot find symbol(s) _glp_lpx_simplex glp_lpx_simplex with GLPK" >&5
     21089echo "$as_me: error: Cannot find symbol(s) _glp_lpx_simplex glp_lpx_simplex with GLPK" >&2;}
     21090   { (exit 1); exit 1; }; }
     21091           fi
     21092         fi
     21093
     21094
     21095# If we make it this far, we've verified the file and linked the function. Add
     21096# the necessary link flags to ADDLIBS and define the preprocessor symbol
     21097# COIN_HAS_LBRY.
     21098
     21099    ADDLIBS="$GLPKLIB $ADDLIBS"
    2106321100
    2106421101cat >>confdefs.h <<\_ACEOF
     
    2106621103_ACEOF
    2106721104
    21068 else
    21069   echo "$as_me:$LINENO: result: no" >&5
    21070 echo "${ECHO_T}no" >&6
    21071 fi
     21105  fi
     21106
     21107# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     21108# automake conditional. These actions must occur unconditionally.
    2107221109
    2107321110
     
    2108521122
    2108621123
    21087 echo "$as_me:$LINENO: checking if user provides library for FortMP" >&5
     21124  echo "$as_me:$LINENO: checking if user provides library for FortMP" >&5
    2108821125echo $ECHO_N "checking if user provides library for FortMP... $ECHO_C" >&6
    2108921126
    2109021127# Check for header file directory
     21128
    2109121129
    2109221130# Check whether --with-fortmp-incdir or --without-fortmp-incdir was given.
     
    2109521133  FMPINCDIR=`cd $withval; pwd`
    2109621134fi;
     21135
    2109721136# Check for library directory
     21137
    2109821138
    2109921139# Check whether --with-fortmp-lib or --without-fortmp-lib was given.
     
    2110221142  FMPLIB=$withval
    2110321143fi;
     21144
    2110421145# Switch to disable library check if requested
    21105 # Check whether --enable-fortmp-libcheck or --disable-fortmp-libcheck was given.
     21146
     21147  # Check whether --enable-fortmp-libcheck or --disable-fortmp-libcheck was given.
    2110621148if test "${enable_fortmp_libcheck+set}" = set; then
    2110721149  enableval="$enable_fortmp_libcheck"
     
    2111121153fi;
    2111221154
    21113 if test x"$FMPINCDIR" != x || test x"$FMPLIB" != x; then
    21114   coin_has_fmp=true
    21115 else
    21116   coin_has_fmp=false
    21117 fi
    21118 
    21119 if test $coin_has_fmp = true; then
    21120 # Check either both arguments or none are given
    21121   if test x"$FMPINCDIR" = x || test x"$FMPLIB" = x; then
    21122     { { echo "$as_me:$LINENO: error: You need to specify both --with-fortmp-incdir and --with-fortmp-lib if you want to use library FortMP" >&5
    21123 echo "$as_me: error: You need to specify both --with-fortmp-incdir and --with-fortmp-lib if you want to use library FortMP" >&2;}
     21155# At this point, if we're going to use the library, both LBRYINCDIR and
     21156# LBRYLIB must be defined and not empty.
     21157
     21158  if test x"$FMPINCDIR" != x || test x"$FMPLIB" != x; then
     21159    if test x"$FMPINCDIR" = x || test x"$FMPLIB" = x; then
     21160      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library FortMP. Use --with-fortmp-incdir of environment variable $FMPINCDIR to specify the include directory. Use --with-fortmp-lib or environment variable $FMPLIB to specify link flags." >&5
     21161echo "$as_me: error: You need to specify both an include directory and link flags to use library FortMP. Use --with-fortmp-incdir of environment variable $FMPINCDIR to specify the include directory. Use --with-fortmp-lib or environment variable $FMPLIB to specify link flags." >&2;}
    2112421162   { (exit 1); exit 1; }; }
     21163    fi
     21164    coin_has_fmp=true
     21165    echo "$as_me:$LINENO: result: yes" >&5
     21166echo "${ECHO_T}yes" >&6
     21167  else
     21168    coin_has_fmp=false
     21169    echo "$as_me:$LINENO: result: no" >&5
     21170echo "${ECHO_T}no" >&6
    2112521171  fi
    21126   echo "$as_me:$LINENO: result: yes" >&5
    21127 echo "${ECHO_T}yes" >&6
    21128   # Check if the given header file is there
    21129 
    21130   # Check if the symbol is provided in the library
    21131   # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER
    21132 
    21133   ADDLIBS="$FMPLIB $ADDLIBS"
     21172
     21173# If we have instructions for use, consider header and link checks.
     21174
     21175  if test $coin_has_fmp = true; then
     21176
     21177# If argument 3 (file) is given, check for the file. Typically this will be a
     21178# header file, but that's not assumed.
     21179
     21180
     21181
     21182# Now see if we can link the function. There are arguments for and against
     21183# assuming argument 3 is a header file declaring the function. A correct
     21184# function declaration is the main argument in favour. Having to cope with
     21185# possible dependencies or other oddities are the main arguments against.
     21186# Force the use of C as the best single choice amongst C++, C, and Fortran.
     21187# Obviously, this has limits.
     21188
     21189
     21190
     21191# If we make it this far, we've verified the file and linked the function. Add
     21192# the necessary link flags to ADDLIBS and define the preprocessor symbol
     21193# COIN_HAS_LBRY.
     21194
     21195    ADDLIBS="$FMPLIB $ADDLIBS"
    2113421196
    2113521197cat >>confdefs.h <<\_ACEOF
     
    2113721199_ACEOF
    2113821200
    21139 else
    21140   echo "$as_me:$LINENO: result: no" >&5
    21141 echo "${ECHO_T}no" >&6
    21142 fi
     21201  fi
     21202
     21203# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     21204# automake conditional. These actions must occur unconditionally.
    2114321205
    2114421206
     
    2115621218  #ToDo! is Fortran?
    2115721219
    21158 echo "$as_me:$LINENO: checking if user provides library for Mosek" >&5
     21220  echo "$as_me:$LINENO: checking if user provides library for Mosek" >&5
    2115921221echo $ECHO_N "checking if user provides library for Mosek... $ECHO_C" >&6
    2116021222
    2116121223# Check for header file directory
     21224
    2116221225
    2116321226# Check whether --with-mosek-incdir or --without-mosek-incdir was given.
     
    2116621229  MSKINCDIR=`cd $withval; pwd`
    2116721230fi;
     21231
    2116821232# Check for library directory
     21233
    2116921234
    2117021235# Check whether --with-mosek-lib or --without-mosek-lib was given.
     
    2117321238  MSKLIB=$withval
    2117421239fi;
     21240
    2117521241# Switch to disable library check if requested
    21176 # Check whether --enable-mosek-libcheck or --disable-mosek-libcheck was given.
     21242
     21243  # Check whether --enable-mosek-libcheck or --disable-mosek-libcheck was given.
    2117721244if test "${enable_mosek_libcheck+set}" = set; then
    2117821245  enableval="$enable_mosek_libcheck"
     
    2118221249fi;
    2118321250
    21184 if test x"$MSKINCDIR" != x || test x"$MSKLIB" != x; then
    21185   coin_has_msk=true
    21186 else
    21187   coin_has_msk=false
    21188 fi
    21189 
    21190 if test $coin_has_msk = true; then
    21191 # Check either both arguments or none are given
    21192   if test x"$MSKINCDIR" = x || test x"$MSKLIB" = x; then
    21193     { { echo "$as_me:$LINENO: error: You need to specify both --with-mosek-incdir and --with-mosek-lib if you want to use library Mosek" >&5
    21194 echo "$as_me: error: You need to specify both --with-mosek-incdir and --with-mosek-lib if you want to use library Mosek" >&2;}
     21251# At this point, if we're going to use the library, both LBRYINCDIR and
     21252# LBRYLIB must be defined and not empty.
     21253
     21254  if test x"$MSKINCDIR" != x || test x"$MSKLIB" != x; then
     21255    if test x"$MSKINCDIR" = x || test x"$MSKLIB" = x; then
     21256      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Mosek. Use --with-mosek-incdir of environment variable $MSKINCDIR to specify the include directory. Use --with-mosek-lib or environment variable $MSKLIB to specify link flags." >&5
     21257echo "$as_me: error: You need to specify both an include directory and link flags to use library Mosek. Use --with-mosek-incdir of environment variable $MSKINCDIR to specify the include directory. Use --with-mosek-lib or environment variable $MSKLIB to specify link flags." >&2;}
    2119521258   { (exit 1); exit 1; }; }
     21259    fi
     21260    coin_has_msk=true
     21261    echo "$as_me:$LINENO: result: yes" >&5
     21262echo "${ECHO_T}yes" >&6
     21263  else
     21264    coin_has_msk=false
     21265    echo "$as_me:$LINENO: result: no" >&5
     21266echo "${ECHO_T}no" >&6
    2119621267  fi
    21197   echo "$as_me:$LINENO: result: yes" >&5
    21198 echo "${ECHO_T}yes" >&6
    21199   # Check if the given header file is there
    21200   as_ac_File=`echo "ac_cv_file_$MSKINCDIR/mosekdl.h" | $as_tr_sh`
     21268
     21269# If we have instructions for use, consider header and link checks.
     21270
     21271  if test $coin_has_msk = true; then
     21272
     21273# If argument 3 (file) is given, check for the file. Typically this will be a
     21274# header file, but that's not assumed.
     21275
     21276    as_ac_File=`echo "ac_cv_file_$MSKINCDIR/mosekdl.h" | $as_tr_sh`
    2120121277echo "$as_me:$LINENO: checking for $MSKINCDIR/mosekdl.h" >&5
    2120221278echo $ECHO_N "checking for $MSKINCDIR/mosekdl.h... $ECHO_C" >&6
     
    2122521301
    2122621302
    21227   # Check if the symbol is provided in the library
    21228   # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER
    21229   if test x"$mosek_libcheck" != xno; then
    21230                     coin_save_LIBS="$LIBS"
    21231                     LIBS="$MSKLIB $ADDLIBS"
    21232                     echo "$as_me:$LINENO: checking whether symbol MSK_openmosek is available with MSK" >&5
    21233 echo $ECHO_N "checking whether symbol MSK_openmosek is available with MSK... $ECHO_C" >&6
    21234                     ac_ext=c
     21303# Now see if we can link the function. There are arguments for and against
     21304# assuming argument 3 is a header file declaring the function. A correct
     21305# function declaration is the main argument in favour. Having to cope with
     21306# possible dependencies or other oddities are the main arguments against.
     21307# Force the use of C as the best single choice amongst C++, C, and Fortran.
     21308# Obviously, this has limits.
     21309
     21310    if test x"$mosek_libcheck" != xno; then
     21311           coin_save_LIBS="$LIBS"
     21312           LIBS="$MSKLIB $ADDLIBS"
     21313           coin_MSK_link=no
     21314           ac_ext=c
    2123521315ac_cpp='$CPP $CPPFLAGS'
    2123621316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2123821318ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2123921319
    21240 # ToDo find out what to do about extern "C"
    21241 #                    AC_TRY_LINK([extern "C" {void MSK_openmosek();}],[MSK_openmosek()],
    21242                     cat >conftest.$ac_ext <<_ACEOF
     21320           for fnm in MSK_openmosek ; do
     21321             echo "$as_me:$LINENO: checking whether symbol $fnm is available with MSK" >&5
     21322echo $ECHO_N "checking whether symbol $fnm is available with MSK... $ECHO_C" >&6
     21323             cat >conftest.$ac_ext <<_ACEOF
    2124321324/* confdefs.h.  */
    2124421325_ACEOF
     
    2124621327cat >>conftest.$ac_ext <<_ACEOF
    2124721328/* end confdefs.h.  */
    21248 void MSK_openmosek();
     21329
    2124921330int
    2125021331main ()
    2125121332{
    21252 MSK_openmosek()
     21333$fnm()
    2125321334  ;
    2125421335  return 0;
     
    2127921360  echo "$as_me:$LINENO: result: yes" >&5
    2128021361echo "${ECHO_T}yes" >&6
     21362                  coin_MSK_link=yes
     21363                  break
    2128121364else
    2128221365  echo "$as_me: failed program was:" >&5
     
    2128521368echo "$as_me:$LINENO: result: no" >&5
    2128621369echo "${ECHO_T}no" >&6
    21287                                  { { echo "$as_me:$LINENO: error: Cannot find symbol MSK_openmosek with MSK" >&5
    21288 echo "$as_me: error: Cannot find symbol MSK_openmosek with MSK" >&2;}
    21289    { (exit 1); exit 1; }; }
    2129021370fi
    2129121371rm -f conftest.err conftest.$ac_objext \
    2129221372      conftest$ac_exeext conftest.$ac_ext
    21293                     ac_ext=c
     21373           done
     21374           ac_ext=c
    2129421375ac_cpp='$CPP $CPPFLAGS'
    2129521376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2129721378ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2129821379
    21299                     LIBS="$coin_save_LIBS"
    21300                   fi
    21301 
    21302   ADDLIBS="$MSKLIB $ADDLIBS"
     21380           if test x"$coin_MSK_link" = xyes ; then
     21381             LIBS="$coin_save_LIBS"
     21382           else
     21383             { { echo "$as_me:$LINENO: error: Cannot find symbol(s) MSK_openmosek with MSK" >&5
     21384echo "$as_me: error: Cannot find symbol(s) MSK_openmosek with MSK" >&2;}
     21385   { (exit 1); exit 1; }; }
     21386           fi
     21387         fi
     21388
     21389
     21390# If we make it this far, we've verified the file and linked the function. Add
     21391# the necessary link flags to ADDLIBS and define the preprocessor symbol
     21392# COIN_HAS_LBRY.
     21393
     21394    ADDLIBS="$MSKLIB $ADDLIBS"
    2130321395
    2130421396cat >>confdefs.h <<\_ACEOF
     
    2130621398_ACEOF
    2130721399
    21308 else
    21309   echo "$as_me:$LINENO: result: no" >&5
    21310 echo "${ECHO_T}no" >&6
    21311 fi
     21400  fi
     21401
     21402# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     21403# automake conditional. These actions must occur unconditionally.
    2131221404
    2131321405
     
    2132521417
    2132621418
    21327 echo "$as_me:$LINENO: checking if user provides library for Osl" >&5
     21419  echo "$as_me:$LINENO: checking if user provides library for Osl" >&5
    2132821420echo $ECHO_N "checking if user provides library for Osl... $ECHO_C" >&6
    2132921421
    2133021422# Check for header file directory
     21423
    2133121424
    2133221425# Check whether --with-osl-incdir or --without-osl-incdir was given.
     
    2133521428  OSLINCDIR=`cd $withval; pwd`
    2133621429fi;
     21430
    2133721431# Check for library directory
     21432
    2133821433
    2133921434# Check whether --with-osl-lib or --without-osl-lib was given.
     
    2134221437  OSLLIB=$withval
    2134321438fi;
     21439
    2134421440# Switch to disable library check if requested
    21345 # Check whether --enable-osl-libcheck or --disable-osl-libcheck was given.
     21441
     21442  # Check whether --enable-osl-libcheck or --disable-osl-libcheck was given.
    2134621443if test "${enable_osl_libcheck+set}" = set; then
    2134721444  enableval="$enable_osl_libcheck"
     
    2135121448fi;
    2135221449
    21353 if test x"$OSLINCDIR" != x || test x"$OSLLIB" != x; then
    21354   coin_has_osl=true
    21355 else
    21356   coin_has_osl=false
    21357 fi
    21358 
    21359 if test $coin_has_osl = true; then
    21360 # Check either both arguments or none are given
    21361   if test x"$OSLINCDIR" = x || test x"$OSLLIB" = x; then
    21362     { { echo "$as_me:$LINENO: error: You need to specify both --with-osl-incdir and --with-osl-lib if you want to use library Osl" >&5
    21363 echo "$as_me: error: You need to specify both --with-osl-incdir and --with-osl-lib if you want to use library Osl" >&2;}
     21450# At this point, if we're going to use the library, both LBRYINCDIR and
     21451# LBRYLIB must be defined and not empty.
     21452
     21453  if test x"$OSLINCDIR" != x || test x"$OSLLIB" != x; then
     21454    if test x"$OSLINCDIR" = x || test x"$OSLLIB" = x; then
     21455      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Osl. Use --with-osl-incdir of environment variable $OSLINCDIR to specify the include directory. Use --with-osl-lib or environment variable $OSLLIB to specify link flags." >&5
     21456echo "$as_me: error: You need to specify both an include directory and link flags to use library Osl. Use --with-osl-incdir of environment variable $OSLINCDIR to specify the include directory. Use --with-osl-lib or environment variable $OSLLIB to specify link flags." >&2;}
    2136421457   { (exit 1); exit 1; }; }
     21458    fi
     21459    coin_has_osl=true
     21460    echo "$as_me:$LINENO: result: yes" >&5
     21461echo "${ECHO_T}yes" >&6
     21462  else
     21463    coin_has_osl=false
     21464    echo "$as_me:$LINENO: result: no" >&5
     21465echo "${ECHO_T}no" >&6
    2136521466  fi
    21366   echo "$as_me:$LINENO: result: yes" >&5
    21367 echo "${ECHO_T}yes" >&6
    21368   # Check if the given header file is there
    21369   as_ac_File=`echo "ac_cv_file_$OSLINCDIR/ekk_c_api.h" | $as_tr_sh`
     21467
     21468# If we have instructions for use, consider header and link checks.
     21469
     21470  if test $coin_has_osl = true; then
     21471
     21472# If argument 3 (file) is given, check for the file. Typically this will be a
     21473# header file, but that's not assumed.
     21474
     21475    as_ac_File=`echo "ac_cv_file_$OSLINCDIR/ekk_c_api.h" | $as_tr_sh`
    2137021476echo "$as_me:$LINENO: checking for $OSLINCDIR/ekk_c_api.h" >&5
    2137121477echo $ECHO_N "checking for $OSLINCDIR/ekk_c_api.h... $ECHO_C" >&6
     
    2139421500
    2139521501
    21396   # Check if the symbol is provided in the library
    21397   # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER
    21398   if test x"$osl_libcheck" != xno; then
    21399                     coin_save_LIBS="$LIBS"
    21400                     LIBS="$OSLLIB $ADDLIBS"
    21401                     echo "$as_me:$LINENO: checking whether symbol ekk_simplex is available with OSL" >&5
    21402 echo $ECHO_N "checking whether symbol ekk_simplex is available with OSL... $ECHO_C" >&6
    21403                     ac_ext=c
     21502# Now see if we can link the function. There are arguments for and against
     21503# assuming argument 3 is a header file declaring the function. A correct
     21504# function declaration is the main argument in favour. Having to cope with
     21505# possible dependencies or other oddities are the main arguments against.
     21506# Force the use of C as the best single choice amongst C++, C, and Fortran.
     21507# Obviously, this has limits.
     21508
     21509    if test x"$osl_libcheck" != xno; then
     21510           coin_save_LIBS="$LIBS"
     21511           LIBS="$OSLLIB $ADDLIBS"
     21512           coin_OSL_link=no
     21513           ac_ext=c
    2140421514ac_cpp='$CPP $CPPFLAGS'
    2140521515ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2140721517ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2140821518
    21409 # ToDo find out what to do about extern "C"
    21410 #                    AC_TRY_LINK([extern "C" {void ekk_simplex();}],[ekk_simplex()],
    21411                     cat >conftest.$ac_ext <<_ACEOF
     21519           for fnm in ekk_simplex ; do
     21520             echo "$as_me:$LINENO: checking whether symbol $fnm is available with OSL" >&5
     21521echo $ECHO_N "checking whether symbol $fnm is available with OSL... $ECHO_C" >&6
     21522             cat >conftest.$ac_ext <<_ACEOF
    2141221523/* confdefs.h.  */
    2141321524_ACEOF
     
    2141521526cat >>conftest.$ac_ext <<_ACEOF
    2141621527/* end confdefs.h.  */
    21417 void ekk_simplex();
     21528
    2141821529int
    2141921530main ()
    2142021531{
    21421 ekk_simplex()
     21532$fnm()
    2142221533  ;
    2142321534  return 0;
     
    2144821559  echo "$as_me:$LINENO: result: yes" >&5
    2144921560echo "${ECHO_T}yes" >&6
     21561                  coin_OSL_link=yes
     21562                  break
    2145021563else
    2145121564  echo "$as_me: failed program was:" >&5
     
    2145421567echo "$as_me:$LINENO: result: no" >&5
    2145521568echo "${ECHO_T}no" >&6
    21456                                  { { echo "$as_me:$LINENO: error: Cannot find symbol ekk_simplex with OSL" >&5
    21457 echo "$as_me: error: Cannot find symbol ekk_simplex with OSL" >&2;}
    21458    { (exit 1); exit 1; }; }
    2145921569fi
    2146021570rm -f conftest.err conftest.$ac_objext \
    2146121571      conftest$ac_exeext conftest.$ac_ext
    21462                     ac_ext=c
     21572           done
     21573           ac_ext=c
    2146321574ac_cpp='$CPP $CPPFLAGS'
    2146421575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2146621577ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2146721578
    21468                     LIBS="$coin_save_LIBS"
    21469                   fi
    21470 
    21471   ADDLIBS="$OSLLIB $ADDLIBS"
     21579           if test x"$coin_OSL_link" = xyes ; then
     21580             LIBS="$coin_save_LIBS"
     21581           else
     21582             { { echo "$as_me:$LINENO: error: Cannot find symbol(s) ekk_simplex with OSL" >&5
     21583echo "$as_me: error: Cannot find symbol(s) ekk_simplex with OSL" >&2;}
     21584   { (exit 1); exit 1; }; }
     21585           fi
     21586         fi
     21587
     21588
     21589# If we make it this far, we've verified the file and linked the function. Add
     21590# the necessary link flags to ADDLIBS and define the preprocessor symbol
     21591# COIN_HAS_LBRY.
     21592
     21593    ADDLIBS="$OSLLIB $ADDLIBS"
    2147221594
    2147321595cat >>confdefs.h <<\_ACEOF
     
    2147521597_ACEOF
    2147621598
    21477 else
    21478   echo "$as_me:$LINENO: result: no" >&5
    21479 echo "${ECHO_T}no" >&6
    21480 fi
     21599  fi
     21600
     21601# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     21602# automake conditional. These actions must occur unconditionally.
    2148121603
    2148221604
     
    2149421616
    2149521617
    21496 echo "$as_me:$LINENO: checking if user provides library for Soplex" >&5
     21618  echo "$as_me:$LINENO: checking if user provides library for Soplex" >&5
    2149721619echo $ECHO_N "checking if user provides library for Soplex... $ECHO_C" >&6
    2149821620
    2149921621# Check for header file directory
     21622
    2150021623
    2150121624# Check whether --with-soplex-incdir or --without-soplex-incdir was given.
     
    2150421627  SPXINCDIR=`cd $withval; pwd`
    2150521628fi;
     21629
    2150621630# Check for library directory
     21631
    2150721632
    2150821633# Check whether --with-soplex-lib or --without-soplex-lib was given.
     
    2151121636  SPXLIB=$withval
    2151221637fi;
     21638
    2151321639# Switch to disable library check if requested
    21514 # Check whether --enable-soplex-libcheck or --disable-soplex-libcheck was given.
     21640
     21641  # Check whether --enable-soplex-libcheck or --disable-soplex-libcheck was given.
    2151521642if test "${enable_soplex_libcheck+set}" = set; then
    2151621643  enableval="$enable_soplex_libcheck"
     
    2152021647fi;
    2152121648
    21522 if test x"$SPXINCDIR" != x || test x"$SPXLIB" != x; then
    21523   coin_has_spx=true
    21524 else
    21525   coin_has_spx=false
    21526 fi
    21527 
    21528 if test $coin_has_spx = true; then
    21529 # Check either both arguments or none are given
    21530   if test x"$SPXINCDIR" = x || test x"$SPXLIB" = x; then
    21531     { { echo "$as_me:$LINENO: error: You need to specify both --with-soplex-incdir and --with-soplex-lib if you want to use library Soplex" >&5
    21532 echo "$as_me: error: You need to specify both --with-soplex-incdir and --with-soplex-lib if you want to use library Soplex" >&2;}
     21649# At this point, if we're going to use the library, both LBRYINCDIR and
     21650# LBRYLIB must be defined and not empty.
     21651
     21652  if test x"$SPXINCDIR" != x || test x"$SPXLIB" != x; then
     21653    if test x"$SPXINCDIR" = x || test x"$SPXLIB" = x; then
     21654      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Soplex. Use --with-soplex-incdir of environment variable $SPXINCDIR to specify the include directory. Use --with-soplex-lib or environment variable $SPXLIB to specify link flags." >&5
     21655echo "$as_me: error: You need to specify both an include directory and link flags to use library Soplex. Use --with-soplex-incdir of environment variable $SPXINCDIR to specify the include directory. Use --with-soplex-lib or environment variable $SPXLIB to specify link flags." >&2;}
    2153321656   { (exit 1); exit 1; }; }
     21657    fi
     21658    coin_has_spx=true
     21659    echo "$as_me:$LINENO: result: yes" >&5
     21660echo "${ECHO_T}yes" >&6
     21661  else
     21662    coin_has_spx=false
     21663    echo "$as_me:$LINENO: result: no" >&5
     21664echo "${ECHO_T}no" >&6
    2153421665  fi
    21535   echo "$as_me:$LINENO: result: yes" >&5
    21536 echo "${ECHO_T}yes" >&6
    21537   # Check if the given header file is there
    21538   as_ac_File=`echo "ac_cv_file_$SPXINCDIR/spxsolver.h" | $as_tr_sh`
     21666
     21667# If we have instructions for use, consider header and link checks.
     21668
     21669  if test $coin_has_spx = true; then
     21670
     21671# If argument 3 (file) is given, check for the file. Typically this will be a
     21672# header file, but that's not assumed.
     21673
     21674    as_ac_File=`echo "ac_cv_file_$SPXINCDIR/spxsolver.h" | $as_tr_sh`
    2153921675echo "$as_me:$LINENO: checking for $SPXINCDIR/spxsolver.h" >&5
    2154021676echo $ECHO_N "checking for $SPXINCDIR/spxsolver.h... $ECHO_C" >&6
     
    2156321699
    2156421700
    21565   # Check if the symbol is provided in the library
    21566   # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER
    21567 
    21568   ADDLIBS="$SPXLIB $ADDLIBS"
     21701# Now see if we can link the function. There are arguments for and against
     21702# assuming argument 3 is a header file declaring the function. A correct
     21703# function declaration is the main argument in favour. Having to cope with
     21704# possible dependencies or other oddities are the main arguments against.
     21705# Force the use of C as the best single choice amongst C++, C, and Fortran.
     21706# Obviously, this has limits.
     21707
     21708
     21709
     21710# If we make it this far, we've verified the file and linked the function. Add
     21711# the necessary link flags to ADDLIBS and define the preprocessor symbol
     21712# COIN_HAS_LBRY.
     21713
     21714    ADDLIBS="$SPXLIB $ADDLIBS"
    2156921715
    2157021716cat >>confdefs.h <<\_ACEOF
     
    2157221718_ACEOF
    2157321719
    21574 else
    21575   echo "$as_me:$LINENO: result: no" >&5
    21576 echo "${ECHO_T}no" >&6
    21577 fi
     21720  fi
     21721
     21722# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     21723# automake conditional. These actions must occur unconditionally.
    2157821724
    2157921725
     
    2159121737 # ToDo
    2159221738
    21593 echo "$as_me:$LINENO: checking if user provides library for Xpress" >&5
     21739  echo "$as_me:$LINENO: checking if user provides library for Xpress" >&5
    2159421740echo $ECHO_N "checking if user provides library for Xpress... $ECHO_C" >&6
    2159521741
    2159621742# Check for header file directory
     21743
    2159721744
    2159821745# Check whether --with-xpress-incdir or --without-xpress-incdir was given.
     
    2160121748  XPRINCDIR=`cd $withval; pwd`
    2160221749fi;
     21750
    2160321751# Check for library directory
     21752
    2160421753
    2160521754# Check whether --with-xpress-lib or --without-xpress-lib was given.
     
    2160821757  XPRLIB=$withval
    2160921758fi;
     21759
    2161021760# Switch to disable library check if requested
    21611 # Check whether --enable-xpress-libcheck or --disable-xpress-libcheck was given.
     21761
     21762  # Check whether --enable-xpress-libcheck or --disable-xpress-libcheck was given.
    2161221763if test "${enable_xpress_libcheck+set}" = set; then
    2161321764  enableval="$enable_xpress_libcheck"
     
    2161721768fi;
    2161821769
    21619 if test x"$XPRINCDIR" != x || test x"$XPRLIB" != x; then
    21620   coin_has_xpr=true
    21621 else
    21622   coin_has_xpr=false
    21623 fi
    21624 
    21625 if test $coin_has_xpr = true; then
    21626 # Check either both arguments or none are given
    21627   if test x"$XPRINCDIR" = x || test x"$XPRLIB" = x; then
    21628     { { echo "$as_me:$LINENO: error: You need to specify both --with-xpress-incdir and --with-xpress-lib if you want to use library Xpress" >&5
    21629 echo "$as_me: error: You need to specify both --with-xpress-incdir and --with-xpress-lib if you want to use library Xpress" >&2;}
     21770# At this point, if we're going to use the library, both LBRYINCDIR and
     21771# LBRYLIB must be defined and not empty.
     21772
     21773  if test x"$XPRINCDIR" != x || test x"$XPRLIB" != x; then
     21774    if test x"$XPRINCDIR" = x || test x"$XPRLIB" = x; then
     21775      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Xpress. Use --with-xpress-incdir of environment variable $XPRINCDIR to specify the include directory. Use --with-xpress-lib or environment variable $XPRLIB to specify link flags." >&5
     21776echo "$as_me: error: You need to specify both an include directory and link flags to use library Xpress. Use --with-xpress-incdir of environment variable $XPRINCDIR to specify the include directory. Use --with-xpress-lib or environment variable $XPRLIB to specify link flags." >&2;}
    2163021777   { (exit 1); exit 1; }; }
     21778    fi
     21779    coin_has_xpr=true
     21780    echo "$as_me:$LINENO: result: yes" >&5
     21781echo "${ECHO_T}yes" >&6
     21782  else
     21783    coin_has_xpr=false
     21784    echo "$as_me:$LINENO: result: no" >&5
     21785echo "${ECHO_T}no" >&6
    2163121786  fi
    21632   echo "$as_me:$LINENO: result: yes" >&5
    21633 echo "${ECHO_T}yes" >&6
    21634   # Check if the given header file is there
    21635   as_ac_File=`echo "ac_cv_file_$XPRINCDIR/xprs.h" | $as_tr_sh`
     21787
     21788# If we have instructions for use, consider header and link checks.
     21789
     21790  if test $coin_has_xpr = true; then
     21791
     21792# If argument 3 (file) is given, check for the file. Typically this will be a
     21793# header file, but that's not assumed.
     21794
     21795    as_ac_File=`echo "ac_cv_file_$XPRINCDIR/xprs.h" | $as_tr_sh`
    2163621796echo "$as_me:$LINENO: checking for $XPRINCDIR/xprs.h" >&5
    2163721797echo $ECHO_N "checking for $XPRINCDIR/xprs.h... $ECHO_C" >&6
     
    2166021820
    2166121821
    21662   # Check if the symbol is provided in the library
    21663   # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER
    21664   if test x"$xpress_libcheck" != xno; then
    21665                     coin_save_LIBS="$LIBS"
    21666                     LIBS="$XPRLIB $ADDLIBS"
    21667                     echo "$as_me:$LINENO: checking whether symbol XPRSsetintcontrol is available with XPR" >&5
    21668 echo $ECHO_N "checking whether symbol XPRSsetintcontrol is available with XPR... $ECHO_C" >&6
    21669                     ac_ext=c
     21822# Now see if we can link the function. There are arguments for and against
     21823# assuming argument 3 is a header file declaring the function. A correct
     21824# function declaration is the main argument in favour. Having to cope with
     21825# possible dependencies or other oddities are the main arguments against.
     21826# Force the use of C as the best single choice amongst C++, C, and Fortran.
     21827# Obviously, this has limits.
     21828
     21829    if test x"$xpress_libcheck" != xno; then
     21830           coin_save_LIBS="$LIBS"
     21831           LIBS="$XPRLIB $ADDLIBS"
     21832           coin_XPR_link=no
     21833           ac_ext=c
    2167021834ac_cpp='$CPP $CPPFLAGS'
    2167121835ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2167321837ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2167421838
    21675 # ToDo find out what to do about extern "C"
    21676 #                    AC_TRY_LINK([extern "C" {void XPRSsetintcontrol();}],[XPRSsetintcontrol()],
    21677                     cat >conftest.$ac_ext <<_ACEOF
     21839           for fnm in XPRSsetintcontrol ; do
     21840             echo "$as_me:$LINENO: checking whether symbol $fnm is available with XPR" >&5
     21841echo $ECHO_N "checking whether symbol $fnm is available with XPR... $ECHO_C" >&6
     21842             cat >conftest.$ac_ext <<_ACEOF
    2167821843/* confdefs.h.  */
    2167921844_ACEOF
     
    2168121846cat >>conftest.$ac_ext <<_ACEOF
    2168221847/* end confdefs.h.  */
    21683 void XPRSsetintcontrol();
     21848
    2168421849int
    2168521850main ()
    2168621851{
    21687 XPRSsetintcontrol()
     21852$fnm()
    2168821853  ;
    2168921854  return 0;
     
    2171421879  echo "$as_me:$LINENO: result: yes" >&5
    2171521880echo "${ECHO_T}yes" >&6
     21881                  coin_XPR_link=yes
     21882                  break
    2171621883else
    2171721884  echo "$as_me: failed program was:" >&5
     
    2172021887echo "$as_me:$LINENO: result: no" >&5
    2172121888echo "${ECHO_T}no" >&6
    21722                                  { { echo "$as_me:$LINENO: error: Cannot find symbol XPRSsetintcontrol with XPR" >&5
    21723 echo "$as_me: error: Cannot find symbol XPRSsetintcontrol with XPR" >&2;}
    21724    { (exit 1); exit 1; }; }
    2172521889fi
    2172621890rm -f conftest.err conftest.$ac_objext \
    2172721891      conftest$ac_exeext conftest.$ac_ext
    21728                     ac_ext=c
     21892           done
     21893           ac_ext=c
    2172921894ac_cpp='$CPP $CPPFLAGS'
    2173021895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    2173221897ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2173321898
    21734                     LIBS="$coin_save_LIBS"
    21735                   fi
    21736 
    21737   ADDLIBS="$XPRLIB $ADDLIBS"
     21899           if test x"$coin_XPR_link" = xyes ; then
     21900             LIBS="$coin_save_LIBS"
     21901           else
     21902             { { echo "$as_me:$LINENO: error: Cannot find symbol(s) XPRSsetintcontrol with XPR" >&5
     21903echo "$as_me: error: Cannot find symbol(s) XPRSsetintcontrol with XPR" >&2;}
     21904   { (exit 1); exit 1; }; }
     21905           fi
     21906         fi
     21907
     21908
     21909# If we make it this far, we've verified the file and linked the function. Add
     21910# the necessary link flags to ADDLIBS and define the preprocessor symbol
     21911# COIN_HAS_LBRY.
     21912
     21913    ADDLIBS="$XPRLIB $ADDLIBS"
    2173821914
    2173921915cat >>confdefs.h <<\_ACEOF
     
    2174121917_ACEOF
    2174221918
    21743 else
    21744   echo "$as_me:$LINENO: result: no" >&5
    21745 echo "${ECHO_T}no" >&6
    21746 fi
     21919  fi
     21920
     21921# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     21922# automake conditional. These actions must occur unconditionally.
    2174721923
    2174821924
     
    2176921945
    2177021946# Determine the name of the ASL library
    21771 case "$CXX" in
     21947case "$CC" in
    2177221948  cl* | */cl* | CL* | */CL*)
    2177321949    ampllib=amplsolv.lib ;;
     
    2178621962
    2178721963if test "$use_asldir" = BUILD; then
    21788   as_ac_File=`echo "ac_cv_file_$coin_aslobjdir/Makefile" | $as_tr_sh`
    21789 echo "$as_me:$LINENO: checking for $coin_aslobjdir/Makefile" >&5
    21790 echo $ECHO_N "checking for $coin_aslobjdir/Makefile... $ECHO_C" >&6
    21791 if eval "test \"\${$as_ac_File+set}\" = set"; then
    21792   echo $ECHO_N "(cached) $ECHO_C" >&6
    21793 else
    21794   test "$cross_compiling" = yes &&
    21795   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    21796 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    21797    { (exit 1); exit 1; }; }
    21798 if test -r "$coin_aslobjdir/Makefile"; then
    21799   eval "$as_ac_File=yes"
    21800 else
    21801   eval "$as_ac_File=no"
    21802 fi
    21803 fi
    21804 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
    21805 echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
    21806 if test `eval echo '${'$as_ac_File'}'` = yes; then
    21807   :
    21808 else
    21809   { { echo "$as_me:$LINENO: error: option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)" >&5
     21964  if test "$PACKAGE_NAME" != ThirdPartyASL; then
     21965    # If we are configuring ThirdParty/ASL, don't check
     21966    if test -r $coin_aslobjdir/.MakeOk; then :; else
     21967      { { echo "$as_me:$LINENO: error: option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)" >&5
    2181021968echo "$as_me: error: option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)" >&2;}
    2181121969   { (exit 1); exit 1; }; }
    21812 fi
    21813 
     21970    fi
     21971  fi
    2181421972elif test -z "$use_asldir"; then
    2181521973 # try to find sources - if not given don't compile
    21816   as_ac_File=`echo "ac_cv_file_$coin_aslobjdir/Makefile" | $as_tr_sh`
    21817 echo "$as_me:$LINENO: checking for $coin_aslobjdir/Makefile" >&5
    21818 echo $ECHO_N "checking for $coin_aslobjdir/Makefile... $ECHO_C" >&6
    21819 if eval "test \"\${$as_ac_File+set}\" = set"; then
    21820   echo $ECHO_N "(cached) $ECHO_C" >&6
    21821 else
    21822   test "$cross_compiling" = yes &&
    21823   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    21824 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    21825    { (exit 1); exit 1; }; }
    21826 if test -r "$coin_aslobjdir/Makefile"; then
    21827   eval "$as_ac_File=yes"
    21828 else
    21829   eval "$as_ac_File=no"
    21830 fi
    21831 fi
    21832 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
    21833 echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
    21834 if test `eval echo '${'$as_ac_File'}'` = yes; then
    21835   use_asldir=BUILD
    21836 else
    21837   use_asldir=no
    21838 fi
    21839 
     21974  if test "$PACKAGE_NAME" != ThirdPartyASL; then
     21975    if test -r $coin_aslobjdir/.MakeOk; then
     21976      use_asldir=BUILD
     21977    else
     21978      use_asldir=no
     21979    fi
     21980  else
     21981    use_asldir=no
     21982  fi
    2184021983elif test "$use_asldir" != "no"; then
    2184121984  as_ac_File=`echo "ac_cv_file_$use_asldir/$ampllib" | $as_tr_sh`
     
    2201422157
    2201522158
     22159#############################################################################
     22160#                       CbcGeneric configuration                            #
     22161#############################################################################
     22162
     22163# Are we building cbc-generic? Default is no (false).
     22164
     22165
     22166# Check whether --with-cbc-generic or --without-cbc-generic was given.
     22167if test "${with_cbc_generic+set}" = set; then
     22168  withval="$with_cbc_generic"
     22169  case $withval in
     22170    yes) cbc_with_cbc_generic=true ;;
     22171      *) cbc_with_cbc_generic=false ;;
     22172   esac
     22173else
     22174  cbc_with_cbc_generic=false
     22175fi;
     22176if test x"$cbc_with_cbc_generic" = xyes ; then
     22177  { echo "$as_me:$LINENO: building cbc-generic" >&5
     22178echo "$as_me: building cbc-generic" >&6;}
     22179fi
     22180
     22181
     22182if test x"$cbc_with_cbc_generic" = xtrue; then
     22183  CBC_BUILD_CBC_GENERIC_TRUE=
     22184  CBC_BUILD_CBC_GENERIC_FALSE='#'
     22185else
     22186  CBC_BUILD_CBC_GENERIC_TRUE='#'
     22187  CBC_BUILD_CBC_GENERIC_FALSE=
     22188fi
     22189
     22190
     22191# Set the default solver for cbc-generic. In theory, any OsiXXX should work.
     22192# In practice, only the three listed below have had any testing.
     22193
     22194echo "$as_me:$LINENO: checking for cbc-generic default solver" >&5
     22195echo $ECHO_N "checking for cbc-generic default solver... $ECHO_C" >&6
     22196
     22197# Check whether --with-cbc-generic-solver or --without-cbc-generic-solver was given.
     22198if test "${with_cbc_generic_solver+set}" = set; then
     22199  withval="$with_cbc_generic_solver"
     22200  cbc_default_solver=$withval
     22201else
     22202  cbc_default_solver=clp
     22203fi;
     22204echo "$as_me:$LINENO: result: $cbc_default_solver" >&5
     22205echo "${ECHO_T}$cbc_default_solver" >&6
     22206
     22207case $cbc_default_solver in
     22208   clp)
     22209    ;;
     22210  dylp)
     22211    ;;
     22212  glpk)
     22213    ;;
     22214     *)
     22215    { echo "$as_me:$LINENO: WARNING: Unrecognised solver $cbc_default_solver chosen as cbc-generic default solver." >&5
     22216echo "$as_me: WARNING: Unrecognised solver $cbc_default_solver chosen as cbc-generic default solver." >&2;}
     22217    ;;
     22218esac
     22219
     22220cat >>confdefs.h <<_ACEOF
     22221#define CBC_DEFAULT_SOLVER "$cbc_default_solver"
     22222_ACEOF
     22223
     22224
     22225
     22226#############################################################################
     22227#                       Cbc parallel configuration                          #
     22228#############################################################################
     22229
     22230# First we define a new option, --enable-cbc-parallel
     22231
     22232# Check whether --enable-cbc-parallel or --disable-cbc-parallel was given.
     22233if test "${enable_cbc_parallel+set}" = set; then
     22234  enableval="$enable_cbc_parallel"
     22235
     22236fi;
     22237
     22238if test "$enable_cbc_parallel" = yes; then
     22239  # Define the preprocessor macro
     22240
     22241cat >>confdefs.h <<\_ACEOF
     22242#define CBC_THREAD 1
     22243_ACEOF
     22244
     22245  echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
     22246echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
     22247if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
     22248  echo $ECHO_N "(cached) $ECHO_C" >&6
     22249else
     22250  ac_check_lib_save_LIBS=$LIBS
     22251LIBS="-lrt  $LIBS"
     22252cat >conftest.$ac_ext <<_ACEOF
     22253/* confdefs.h.  */
     22254_ACEOF
     22255cat confdefs.h >>conftest.$ac_ext
     22256cat >>conftest.$ac_ext <<_ACEOF
     22257/* end confdefs.h.  */
     22258
     22259/* Override any gcc2 internal prototype to avoid an error.  */
     22260#ifdef __cplusplus
     22261extern "C"
     22262#endif
     22263/* We use char because int might match the return type of a gcc2
     22264   builtin and then its argument prototype would still apply.  */
     22265char clock_gettime ();
     22266int
     22267main ()
     22268{
     22269clock_gettime ();
     22270  ;
     22271  return 0;
     22272}
     22273_ACEOF
     22274rm -f conftest.$ac_objext conftest$ac_exeext
     22275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     22276  (eval $ac_link) 2>conftest.er1
     22277  ac_status=$?
     22278  grep -v '^ *+' conftest.er1 >conftest.err
     22279  rm -f conftest.er1
     22280  cat conftest.err >&5
     22281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22282  (exit $ac_status); } &&
     22283         { ac_try='test -z "$ac_c_werror_flag"
     22284                         || test ! -s conftest.err'
     22285  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22286  (eval $ac_try) 2>&5
     22287  ac_status=$?
     22288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22289  (exit $ac_status); }; } &&
     22290         { ac_try='test -s conftest$ac_exeext'
     22291  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22292  (eval $ac_try) 2>&5
     22293  ac_status=$?
     22294  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22295  (exit $ac_status); }; }; then
     22296  ac_cv_lib_rt_clock_gettime=yes
     22297else
     22298  echo "$as_me: failed program was:" >&5
     22299sed 's/^/| /' conftest.$ac_ext >&5
     22300
     22301ac_cv_lib_rt_clock_gettime=no
     22302fi
     22303rm -f conftest.err conftest.$ac_objext \
     22304      conftest$ac_exeext conftest.$ac_ext
     22305LIBS=$ac_check_lib_save_LIBS
     22306fi
     22307echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
     22308echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
     22309if test $ac_cv_lib_rt_clock_gettime = yes; then
     22310  ADDLIBS="-lrt $ADDLIBS"
     22311else
     22312  { { echo "$as_me:$LINENO: error: --enable-cbc-parallel selected, but -lrt unavailable" >&5
     22313echo "$as_me: error: --enable-cbc-parallel selected, but -lrt unavailable" >&2;}
     22314   { (exit 1); exit 1; }; }
     22315fi
     22316
     22317  echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
     22318echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
     22319if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
     22320  echo $ECHO_N "(cached) $ECHO_C" >&6
     22321else
     22322  ac_check_lib_save_LIBS=$LIBS
     22323LIBS="-lpthread  $LIBS"
     22324cat >conftest.$ac_ext <<_ACEOF
     22325/* confdefs.h.  */
     22326_ACEOF
     22327cat confdefs.h >>conftest.$ac_ext
     22328cat >>conftest.$ac_ext <<_ACEOF
     22329/* end confdefs.h.  */
     22330
     22331/* Override any gcc2 internal prototype to avoid an error.  */
     22332#ifdef __cplusplus
     22333extern "C"
     22334#endif
     22335/* We use char because int might match the return type of a gcc2
     22336   builtin and then its argument prototype would still apply.  */
     22337char pthread_create ();
     22338int
     22339main ()
     22340{
     22341pthread_create ();
     22342  ;
     22343  return 0;
     22344}
     22345_ACEOF
     22346rm -f conftest.$ac_objext conftest$ac_exeext
     22347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     22348  (eval $ac_link) 2>conftest.er1
     22349  ac_status=$?
     22350  grep -v '^ *+' conftest.er1 >conftest.err
     22351  rm -f conftest.er1
     22352  cat conftest.err >&5
     22353  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22354  (exit $ac_status); } &&
     22355         { ac_try='test -z "$ac_c_werror_flag"
     22356                         || test ! -s conftest.err'
     22357  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22358  (eval $ac_try) 2>&5
     22359  ac_status=$?
     22360  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22361  (exit $ac_status); }; } &&
     22362         { ac_try='test -s conftest$ac_exeext'
     22363  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22364  (eval $ac_try) 2>&5
     22365  ac_status=$?
     22366  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22367  (exit $ac_status); }; }; then
     22368  ac_cv_lib_pthread_pthread_create=yes
     22369else
     22370  echo "$as_me: failed program was:" >&5
     22371sed 's/^/| /' conftest.$ac_ext >&5
     22372
     22373ac_cv_lib_pthread_pthread_create=no
     22374fi
     22375rm -f conftest.err conftest.$ac_objext \
     22376      conftest$ac_exeext conftest.$ac_ext
     22377LIBS=$ac_check_lib_save_LIBS
     22378fi
     22379echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
     22380echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
     22381if test $ac_cv_lib_pthread_pthread_create = yes; then
     22382  ADDLIBS="-lpthread $ADDLIBS"
     22383else
     22384  { { echo "$as_me:$LINENO: error: --enable-cbc-parallel selected, but -lpthreads unavailable" >&5
     22385echo "$as_me: error: --enable-cbc-parallel selected, but -lpthreads unavailable" >&2;}
     22386   { (exit 1); exit 1; }; }
     22387fi
     22388
     22389fi
     22390
    2201622391##############################################################################
    2201722392#                   VPATH links for example input files                      #
     
    2206222437# Finally, we let configure write all the output...
    2206322438
    22064 FADDLIBS="$ADDLIBS"
    22065 if test x"$coin_need_flibs" = xyes; then
    22066   ADDLIBS="$ADDLIBS $FLIBS"
    22067 fi
    22068 
    22069 # library extension
    22070 
    22071 case "$CC" in
    22072   cl* | */cl* | CL* | */CL*)
    22073        LIBEXT=lib ;;
    22074     *) LIBEXT=a ;;
    22075 esac
    22076 
    22077 # Define VPATH_DISTCLEANFILES to be everything that needs to be
    22078 # cleaned for distclean in a vpath configuration
    22079 
    22080 VPATH_DISTCLEANFILES="$coin_vpath_link_files"
    22081 
    22082 cat >confcache <<\_ACEOF
     22439if test x$coin_skip_ac_output != xyes; then
     22440
     22441  FADDLIBS="$ADDLIBS"
     22442  if test x"$coin_need_flibs" = xyes; then
     22443    ADDLIBS="$ADDLIBS $FLIBS"
     22444  fi
     22445
     22446  # library extension
     22447
     22448  case "$CC" in
     22449    cl* | */cl* | CL* | */CL*)
     22450         LIBEXT=lib ;;
     22451      *) LIBEXT=a ;;
     22452  esac
     22453
     22454  # Define VPATH_DISTCLEANFILES to be everything that needs to be
     22455  # cleaned for distclean in a vpath configuration
     22456
     22457  VPATH_DISTCLEANFILES="$coin_vpath_link_files"
     22458
     22459  # Take out subdirectories if their configuration concluded that they
     22460  # don't need to be compiled
     22461  if test x"$coin_ac_skip_subdirs" != x; then
     22462    new_subdirs=
     22463    for i in $subdirs; do
     22464      skipme=no
     22465      for j in $coin_ac_skip_subdirs; do
     22466        if test $i = $j; then
     22467          skipme=yes;
     22468        fi
     22469      done
     22470      if test $skipme = no; then
     22471        new_subdirs="$new_subdirs $i"
     22472      fi
     22473    done
     22474    subdirs="$new_subdirs"
     22475  fi
     22476
     22477  cat >confcache <<\_ACEOF
    2208322478# This file is a shell script that caches the results of configure
    2208422479# tests run on this system so they can be shared between configure
     
    2232222717Usually this means the macro was only invoked conditionally." >&5
    2232322718echo "$as_me: error: conditional \"COIN_HAS_ASL\" was never defined.
     22719Usually this means the macro was only invoked conditionally." >&2;}
     22720   { (exit 1); exit 1; }; }
     22721fi
     22722if test -z "${CBC_BUILD_CBC_GENERIC_TRUE}" && test -z "${CBC_BUILD_CBC_GENERIC_FALSE}"; then
     22723  { { echo "$as_me:$LINENO: error: conditional \"CBC_BUILD_CBC_GENERIC\" was never defined.
     22724Usually this means the macro was only invoked conditionally." >&5
     22725echo "$as_me: error: conditional \"CBC_BUILD_CBC_GENERIC\" was never defined.
    2232422726Usually this means the macro was only invoked conditionally." >&2;}
    2232522727   { (exit 1); exit 1; }; }
     
    2265123053$config_headers
    2265223054
    22653 Configuration links:
    22654 $config_links
    22655 
    2265623055Configuration commands:
    2265723056$config_commands
     
    2277723176  "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
    2277823177  "cbc_addlibs.txt" ) CONFIG_FILES="$CONFIG_FILES cbc_addlibs.txt" ;;
    22779   "src/CbcOrClpParam.cpp" ) CONFIG_LINKS="$CONFIG_LINKS src/CbcOrClpParam.cpp:../Clp/src/CbcOrClpParam.cpp" ;;
    22780   "src/CbcOrClpParam.hpp" ) CONFIG_LINKS="$CONFIG_LINKS src/CbcOrClpParam.hpp:../Clp/src/CbcOrClpParam.hpp" ;;
    2278123178  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
    2278223179  "inc/config_cbc.h" ) CONFIG_HEADERS="$CONFIG_HEADERS inc/config_cbc.h" ;;
     
    2279423191  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
    2279523192  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
    22796   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
    2279723193  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
    2279823194fi
     
    2302923425s,@COIN_HAS_ASL_TRUE@,$COIN_HAS_ASL_TRUE,;t t
    2303023426s,@COIN_HAS_ASL_FALSE@,$COIN_HAS_ASL_FALSE,;t t
     23427s,@CBC_BUILD_CBC_GENERIC_TRUE@,$CBC_BUILD_CBC_GENERIC_TRUE,;t t
     23428s,@CBC_BUILD_CBC_GENERIC_FALSE@,$CBC_BUILD_CBC_GENERIC_FALSE,;t t
    2303123429s,@LIBEXT@,$LIBEXT,;t t
    2303223430s,@VPATH_DISTCLEANFILES@,$VPATH_DISTCLEANFILES,;t t
     
    2351423912          /^X\(\/\).*/{ s//\1/; q; }
    2351523913          s/.*/./; q'`/stamp-h$_am_stamp_count
    23516 done
    23517 _ACEOF
    23518 cat >>$CONFIG_STATUS <<\_ACEOF
    23519 
    23520 #
    23521 # CONFIG_LINKS section.
    23522 #
    23523 
    23524 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
    23525   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
    23526   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
    23527 
    23528   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
    23529 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
    23530 
    23531   if test ! -r $srcdir/$ac_source; then
    23532     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
    23533 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
    23534    { (exit 1); exit 1; }; }
    23535   fi
    23536   rm -f $ac_dest
    23537 
    23538   # Make relative symlinks.
    23539   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
    23540 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    23541          X"$ac_dest" : 'X\(//\)[^/]' \| \
    23542          X"$ac_dest" : 'X\(//\)$' \| \
    23543          X"$ac_dest" : 'X\(/\)' \| \
    23544          .     : '\(.\)' 2>/dev/null ||
    23545 echo X"$ac_dest" |
    23546     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
    23547           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
    23548           /^X\(\/\/\)$/{ s//\1/; q; }
    23549           /^X\(\/\).*/{ s//\1/; q; }
    23550           s/.*/./; q'`
    23551   { if $as_mkdir_p; then
    23552     mkdir -p "$ac_dest_dir"
    23553   else
    23554     as_dir="$ac_dest_dir"
    23555     as_dirs=
    23556     while test ! -d "$as_dir"; do
    23557       as_dirs="$as_dir $as_dirs"
    23558       as_dir=`(dirname "$as_dir") 2>/dev/null ||
    23559 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    23560          X"$as_dir" : 'X\(//\)[^/]' \| \
    23561          X"$as_dir" : 'X\(//\)$' \| \
    23562          X"$as_dir" : 'X\(/\)' \| \
    23563          .     : '\(.\)' 2>/dev/null ||
    23564 echo X"$as_dir" |
    23565     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
    23566           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
    23567           /^X\(\/\/\)$/{ s//\1/; q; }
    23568           /^X\(\/\).*/{ s//\1/; q; }
    23569           s/.*/./; q'`
    23570     done
    23571     test ! -n "$as_dirs" || mkdir $as_dirs
    23572   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
    23573 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
    23574    { (exit 1); exit 1; }; }; }
    23575 
    23576   ac_builddir=.
    23577 
    23578 if test "$ac_dest_dir" != .; then
    23579   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
    23580   # A "../" for each directory in $ac_dir_suffix.
    23581   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
    23582 else
    23583   ac_dir_suffix= ac_top_builddir=
    23584 fi
    23585 
    23586 case $srcdir in
    23587   .)  # No --srcdir option.  We are building in place.
    23588     ac_srcdir=.
    23589     if test -z "$ac_top_builddir"; then
    23590        ac_top_srcdir=.
    23591     else
    23592        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    23593     fi ;;
    23594   [\\/]* | ?:[\\/]* )  # Absolute path.
    23595     ac_srcdir=$srcdir$ac_dir_suffix;
    23596     ac_top_srcdir=$srcdir ;;
    23597   *) # Relative path.
    23598     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    23599     ac_top_srcdir=$ac_top_builddir$srcdir ;;
    23600 esac
    23601 
    23602 # Do not use `cd foo && pwd` to compute absolute paths, because
    23603 # the directories may not exist.
    23604 case `pwd` in
    23605 .) ac_abs_builddir="$ac_dest_dir";;
    23606 *)
    23607   case "$ac_dest_dir" in
    23608   .) ac_abs_builddir=`pwd`;;
    23609   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
    23610   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
    23611   esac;;
    23612 esac
    23613 case $ac_abs_builddir in
    23614 .) ac_abs_top_builddir=${ac_top_builddir}.;;
    23615 *)
    23616   case ${ac_top_builddir}. in
    23617   .) ac_abs_top_builddir=$ac_abs_builddir;;
    23618   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
    23619   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
    23620   esac;;
    23621 esac
    23622 case $ac_abs_builddir in
    23623 .) ac_abs_srcdir=$ac_srcdir;;
    23624 *)
    23625   case $ac_srcdir in
    23626   .) ac_abs_srcdir=$ac_abs_builddir;;
    23627   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
    23628   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
    23629   esac;;
    23630 esac
    23631 case $ac_abs_builddir in
    23632 .) ac_abs_top_srcdir=$ac_top_srcdir;;
    23633 *)
    23634   case $ac_top_srcdir in
    23635   .) ac_abs_top_srcdir=$ac_abs_builddir;;
    23636   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
    23637   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
    23638   esac;;
    23639 esac
    23640 
    23641 
    23642   case $srcdir in
    23643   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
    23644       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
    23645   esac
    23646 
    23647   # Try a symlink, then a hard link, then a copy.
    23648   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
    23649     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
    23650     cp -p $srcdir/$ac_source $ac_dest ||
    23651     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
    23652 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
    23653    { (exit 1); exit 1; }; }
    2365423914done
    2365523915_ACEOF
     
    2388724147
    2388824148
    23889 if test x"$coin_vpath_link_files" = x; then : ; else
    23890   lnkcmd=
    23891   if test "$enable_doscompile" = yes; then
    23892     lnkcmd=cp
    23893   fi
    23894   case "$CC" in
    23895     cl* | */cl* | CL* | */CL*)
    23896       lnkcmd=cp ;;
    23897   esac
    23898   if test "$lnkcmd" = cp; then
    23899     { echo "$as_me:$LINENO: Copying data files for VPATH configuration" >&5
     24149  if test x"$coin_vpath_link_files" = x; then : ; else
     24150    lnkcmd=
     24151    if test "$enable_doscompile" = mingw; then
     24152      lnkcmd=cp
     24153    fi
     24154    case "$CC" in
     24155      cl* | */cl* | CL* | */CL*)
     24156        lnkcmd=cp ;;
     24157    esac
     24158    if test "$lnkcmd" = cp; then
     24159      { echo "$as_me:$LINENO: Copying data files for VPATH configuration" >&5
    2390024160echo "$as_me: Copying data files for VPATH configuration" >&6;}
    23901   else
    23902     echo "$as_me:$LINENO: checking whether ln -s works" >&5
     24161    else
     24162      echo "$as_me:$LINENO: checking whether ln -s works" >&5
    2390324163echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
    2390424164LN_S=$as_ln_s
     
    2391124171fi
    2391224172
    23913     { echo "$as_me:$LINENO: Creating VPATH links for data files" >&5
     24173      { echo "$as_me:$LINENO: Creating VPATH links for data files" >&5
    2391424174echo "$as_me: Creating VPATH links for data files" >&6;}
    23915     lnkcmd="$LN_S"
    23916   fi
    23917   for file in $coin_vpath_link_files; do
    23918     dir=`(dirname "./$file") 2>/dev/null ||
     24175      lnkcmd="$LN_S"
     24176    fi
     24177    for file in $coin_vpath_link_files; do
     24178      dir=`(dirname "./$file") 2>/dev/null ||
    2391924179$as_expr X"./$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    2392024180         X"./$file" : 'X\(//\)[^/]' \| \
     
    2392824188          /^X\(\/\).*/{ s//\1/; q; }
    2392924189          s/.*/./; q'`
    23930     if test -d $dir; then : ; else
    23931       { if $as_mkdir_p; then
     24190      if test -d $dir; then : ; else
     24191        { if $as_mkdir_p; then
    2393224192    mkdir -p $dir
    2393324193  else
     
    2395424214   { (exit 1); exit 1; }; }; }
    2395524215
    23956     fi
    23957     rm -f $file
    23958     $lnkcmd $abs_source_dir/$file $file
    23959   done
    23960 fi
    23961 
    23962 if test x$coin_projectdir = xyes; then
    23963   { echo "$as_me:$LINENO: Configuration of $PACKAGE_NAME successful" >&5
     24216      fi
     24217      rm -f $file
     24218      $lnkcmd $abs_source_dir/$file $file
     24219    done
     24220  fi
     24221
     24222  if test x$coin_projectdir = xyes; then
     24223    { echo "$as_me:$LINENO: Configuration of $PACKAGE_NAME successful" >&5
    2396424224echo "$as_me: Configuration of $PACKAGE_NAME successful" >&6;}
    23965 else
    23966   { echo "$as_me:$LINENO: Main configuration of $PACKAGE_NAME successful" >&5
     24225  else
     24226    { echo "$as_me:$LINENO: Main configuration of $PACKAGE_NAME successful" >&5
    2396724227echo "$as_me: Main configuration of $PACKAGE_NAME successful" >&6;}
    23968 fi
    23969 
     24228  fi
     24229else
     24230  { echo "$as_me:$LINENO: No configuration of $PACKAGE_NAME necessary" >&5
     24231echo "$as_me: No configuration of $PACKAGE_NAME necessary" >&6;}
     24232fi
     24233
     24234
  • trunk/Cbc/configure.ac

    r405 r640  
    1 # Copyright (C) 2006 International Business Machines.
     1# Copyright (C) 2006, 2007 International Business Machines.
    22# All Rights Reserved.
    33# This file is distributed under the Common Public License.
     
    6666AC_COIN_HAS_PROJECT(Vol)
    6767
    68 # ToDo: find out when CBC_HAS_CLP should be defined!  For now, I
    69 # replaced all CBC_USE by COIN_HAS #ifdef's
    70 
    71 # Decide which one is the default solver
    72 AC_MSG_CHECKING(for CBC default solver)
    73 AC_ARG_WITH([cbc-default-solver],
    74             AC_HELP_STRING([--with-cbc-default-solver],
    75                            [specify default solver for Cbc in lower case letters (if not given, clp is assumed)]),
    76             [cbc_default_solver=$withval],
    77             [cbc_default_solver=clp])
    78 AC_MSG_RESULT($cbc_default_solver)
    79 
    80 case $cbc_default_solver in
    81   clp)
    82     AC_DEFINE([CBC_DEFAULT_SOLVER],"clp",
    83               [Define to the name of the default solver to be used in CBC in small letters])
    84     ;;
    85   dylp)
    86     AC_DEFINE([CBC_DEFAULT_SOLVER],"dylp")
    87     ;;
    88   *)
    89     AC_MSG_ERROR([Unknown solver $cbc_default_solver chosen as CBC's default solver])
    90     ;;
    91 esac
    92 
    93 # Steal some files from Clp - they are going to be deleted by a
    94 # distclean in src (see the Makefile.am there)
    95 if test x"$coin_has_clp" != xunavailable; then
    96   AC_MSG_NOTICE([Stealing CbcOrClpParam's files from Clp])
    97   AC_CONFIG_LINKS([src/CbcOrClpParam.cpp:../Clp/src/CbcOrClpParam.cpp
    98                    src/CbcOrClpParam.hpp:../Clp/src/CbcOrClpParam.hpp])
    99 fi
    100 
    10168#############################################################################
    10269#                            Third party solvers                            #
     
    10572# Check which third party solvers are available ToDo!
    10673AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat])
    107 AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],[glp_lpx_simplex])
     74AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],
     75    [_glp_lpx_simplex glp_lpx_simplex])
    10876AC_COIN_HAS_USER_LIBRARY([FortMP],[FMP])  #ToDo! is Fortran?
    10977AC_COIN_HAS_USER_LIBRARY([Mosek],[MSK],[mosekdl.h],[MSK_openmosek])
     
    11886# Ampl Solver library
    11987AC_COIN_HAS_ASL
     88
     89#############################################################################
     90#                       CbcGeneric configuration                            #
     91#############################################################################
     92
     93# Are we building cbc-generic? Default is no (false).
     94
     95AC_ARG_WITH([cbc-generic],
     96  AS_HELP_STRING([--with-cbc-generic],
     97                 [specify whether to build cbc-generic (default: no)]),
     98  [case $withval in
     99    yes) cbc_with_cbc_generic=true ;;
     100      *) cbc_with_cbc_generic=false ;;
     101   esac],
     102  [cbc_with_cbc_generic=false])
     103if test x"$cbc_with_cbc_generic" = xyes ; then
     104  AC_MSG_NOTICE([building cbc-generic])
     105fi
     106AM_CONDITIONAL(CBC_BUILD_CBC_GENERIC,
     107               test x"$cbc_with_cbc_generic" = xtrue)
     108
     109# Set the default solver for cbc-generic. In theory, any OsiXXX should work.
     110# In practice, only the three listed below have had any testing.
     111
     112AC_MSG_CHECKING(for cbc-generic default solver)
     113AC_ARG_WITH([cbc-generic-solver],
     114            AC_HELP_STRING([--with-cbc-generic-solver],
     115                           [specify default solver for cbc-generic in lower
     116                            case letters (if not given, clp is assumed)]),
     117            [cbc_default_solver=$withval],
     118            [cbc_default_solver=clp])
     119AC_MSG_RESULT($cbc_default_solver)
     120
     121case $cbc_default_solver in
     122   clp)
     123    ;;
     124  dylp)
     125    ;;
     126  glpk)
     127    ;;
     128     *)
     129    AC_MSG_WARN([Unrecognised solver $cbc_default_solver chosen as cbc-generic default solver.])
     130    ;;
     131esac
     132AC_DEFINE_UNQUOTED([CBC_DEFAULT_SOLVER],"$cbc_default_solver",
     133  [Define to the name of the default solver to be used in cbc-generic in small letters])
     134
     135
     136#############################################################################
     137#                       Cbc parallel configuration                          #
     138#############################################################################
     139
     140# First we define a new option, --enable-cbc-parallel
     141
     142AC_ARG_ENABLE([cbc-parallel],
     143[AC_HELP_STRING([--enable-cbc-parallel],
     144                [enables compilation of the SMP version of Cbc])])
     145
     146if test "$enable_cbc_parallel" = yes; then
     147  # Define the preprocessor macro
     148  AC_DEFINE([CBC_THREAD],[1],[Define to 1 if the SMP version of Cbc should be compiled])
     149  AC_CHECK_LIB([rt],[clock_gettime],
     150               [ADDLIBS="-lrt $ADDLIBS"],
     151               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lrt unavailable])])
     152  AC_CHECK_LIB([pthread],[pthread_create],
     153               [ADDLIBS="-lpthread $ADDLIBS"],
     154               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lpthreads unavailable])])
     155fi
    120156
    121157##############################################################################
  • trunk/Cbc/examples/CbcBranchLink.cpp

    r134 r640  
    1515#include "CbcBranchLink.hpp"
    1616#include "CoinError.hpp"
     17#include "CoinPackedMatrix.hpp"
    1718
    1819// Default Constructor
     
    2223    numberMembers_(0),
    2324    numberLinks_(0),
    24     first_(-1)
     25    which_(NULL),
     26    sosType_(1)
    2527{
    2628}
     
    3234    numberMembers_(numberMembers),
    3335    numberLinks_(numberLinks),
    34     first_(first)
     36    which_(NULL),
     37    sosType_(1)
    3538{
    3639  id_=identifier;
    3740  if (numberMembers_) {
    3841    weights_ = new double[numberMembers_];
     42    which_ = new int[numberMembers_*numberLinks_];
    3943    if (weights) {
    4044      memcpy(weights_,weights,numberMembers_*sizeof(double));
     
    5054      last=weights_[i];
    5155    }
     56    for (i=0;i<numberMembers_*numberLinks_;i++) {
     57      which_[i]=first+i;
     58    }
     59  } else {
     60    weights_ = NULL;
     61  }
     62}
     63
     64// Useful constructor (which are indices)
     65CbcLink::CbcLink (CbcModel * model,  int numberMembers,
     66           int numberLinks, int sosType, const int * which , const double * weights, int identifier)
     67  : CbcObject(model),
     68    numberMembers_(numberMembers),
     69    numberLinks_(numberLinks),
     70    which_(NULL),
     71    sosType_(sosType)
     72{
     73  id_=identifier;
     74  if (numberMembers_) {
     75    weights_ = new double[numberMembers_];
     76    which_ = new int[numberMembers_*numberLinks_];
     77    if (weights) {
     78      memcpy(weights_,weights,numberMembers_*sizeof(double));
     79    } else {
     80      for (int i=0;i<numberMembers_;i++)
     81        weights_[i]=i;
     82    }
     83    // weights must be increasing
     84    int i;
     85    double last=-COIN_DBL_MAX;
     86    for (i=0;i<numberMembers_;i++) {
     87      assert (weights_[i]>last+1.0e-12);
     88      last=weights_[i];
     89    }
     90    for (i=0;i<numberMembers_*numberLinks_;i++) {
     91      which_[i]= which[i];
     92    }
    5293  } else {
    5394    weights_ = NULL;
     
    61102  numberMembers_ = rhs.numberMembers_;
    62103  numberLinks_ = rhs.numberLinks_;
    63   first_ = rhs.first_;
     104  sosType_ = rhs.sosType_;
    64105  if (numberMembers_) {
    65     weights_ = new double[numberMembers_];
    66     memcpy(weights_,rhs.weights_,numberMembers_*sizeof(double));
     106    weights_ = CoinCopyOfArray(rhs.weights_,numberMembers_);
     107    which_ = CoinCopyOfArray(rhs.which_,numberMembers_*numberLinks_);
    67108  } else {
    68109    weights_ = NULL;
     110    which_ = NULL;
    69111  }
    70112}
     
    84126    CbcObject::operator=(rhs);
    85127    delete [] weights_;
     128    delete [] which_;
    86129    numberMembers_ = rhs.numberMembers_;
    87130    numberLinks_ = rhs.numberLinks_;
    88     first_ = rhs.first_;
     131    sosType_ = rhs.sosType_;
    89132    if (numberMembers_) {
    90       weights_ = new double[numberMembers_];
    91       memcpy(weights_,rhs.weights_,numberMembers_*sizeof(double));
     133      weights_ = CoinCopyOfArray(rhs.weights_,numberMembers_);
     134      which_ = CoinCopyOfArray(rhs.which_,numberMembers_*numberLinks_);
    92135    } else {
    93136      weights_ = NULL;
     137      which_ = NULL;
    94138    }
    95139  }
     
    101145{
    102146  delete [] weights_;
     147  delete [] which_;
    103148}
    104149
     
    112157  OsiSolverInterface * solver = model_->solver();
    113158  const double * solution = model_->testSolution();
    114   const double * lower = solver->getColLower();
     159  //const double * lower = solver->getColLower();
    115160  const double * upper = solver->getColUpper();
    116161  double integerTolerance =
     
    121166  // check bounds etc
    122167  double lastWeight=-1.0e100;
    123   int base=first_;
     168  int base=0;
    124169  for (j=0;j<numberMembers_;j++) {
    125170    for (int k=0;k<numberLinks_;k++) {
    126       int iColumn = base+k;
    127       if (lower[iColumn])
    128         throw CoinError("Non zero lower bound in CBCLink","infeasibility","CbcLink");
     171      int iColumn = which_[base+k];
     172      //if (lower[iColumn])
     173      //throw CoinError("Non zero lower bound in CBCLink","infeasibility","CbcLink");
    129174      if (lastWeight>=weights_[j]-1.0e-7)
    130175        throw CoinError("Weights too close together in CBCLink","infeasibility","CbcLink");
     
    141186#endif
    142187        }
    143         weight += weights_[j]*CoinMin(value,upper[iColumn]);
     188        value = CoinMin(value,upper[iColumn]);
     189        weight += weights_[j]*value;
    144190        if (firstNonZero<0)
    145191          firstNonZero=j;
     
    149195    base += numberLinks_;
    150196  }
     197  double valueInfeasibility;
    151198  preferredWay=1;
    152   if (lastNonZero-firstNonZero>=1) {
     199  if (lastNonZero-firstNonZero>=sosType_) {
    153200    // find where to branch
    154201    assert (sum>0.0);
    155202    weight /= sum;
    156     double value = lastNonZero-firstNonZero+1;
    157     value *= 0.5/((double) numberMembers_);
    158     return value;
     203    valueInfeasibility = lastNonZero-firstNonZero+1;
     204    valueInfeasibility *= 0.5/((double) numberMembers_);
     205    //#define DISTANCE
     206#ifdef DISTANCE
     207    assert (sosType_==1); // code up
     208    /* may still be satisfied.
     209       For LOS type 2 we might wish to move coding around
     210       and keep initial info in model_ for speed
     211    */
     212    int iWhere;
     213    bool possible=false;
     214    for (iWhere=firstNonZero;iWhere<=lastNonZero;iWhere++) {
     215      if (fabs(weight-weights_[iWhere])<1.0e-8) {
     216        possible=true;
     217        break;
     218      }
     219    }
     220    if (possible) {
     221      // One could move some of this (+ arrays) into model_
     222      const CoinPackedMatrix * matrix = solver->getMatrixByCol();
     223      const double * element = matrix->getMutableElements();
     224      const int * row = matrix->getIndices();
     225      const CoinBigIndex * columnStart = matrix->getVectorStarts();
     226      const int * columnLength = matrix->getVectorLengths();
     227      const double * rowSolution = solver->getRowActivity();
     228      const double * rowLower = solver->getRowLower();
     229      const double * rowUpper = solver->getRowUpper();
     230      int numberRows = matrix->getNumRows();
     231      double * array = new double [numberRows];
     232      CoinZeroN(array,numberRows);
     233      int * which = new int [numberRows];
     234      int n=0;
     235      int base=numberLinks_*firstNonZero;
     236      for (j=firstNonZero;j<=lastNonZero;j++) {
     237        for (int k=0;k<numberLinks_;k++) {
     238          int iColumn = which_[base+k];
     239          double value = CoinMax(0.0,solution[iColumn]);
     240          if (value>integerTolerance&&upper[iColumn]) {
     241            value = CoinMin(value,upper[iColumn]);
     242            for (int j=columnStart[iColumn];j<columnStart[iColumn]+columnLength[iColumn];j++) {
     243              int iRow = row[j];
     244              double a = array[iRow];
     245              if (a) {
     246                a += value*element[j];
     247                if (!a)
     248                  a = 1.0e-100;
     249              } else {
     250                which[n++]=iRow;
     251                a=value*element[j];
     252                assert (a);
     253              }
     254              array[iRow]=a;
     255            }
     256          }
     257        }
     258        base += numberLinks_;
     259      }
     260      base=numberLinks_*iWhere;
     261      for (int k=0;k<numberLinks_;k++) {
     262        int iColumn = which_[base+k];
     263        const double value = 1.0;
     264        for (int j=columnStart[iColumn];j<columnStart[iColumn]+columnLength[iColumn];j++) {
     265          int iRow = row[j];
     266          double a = array[iRow];
     267          if (a) {
     268            a -= value*element[j];
     269            if (!a)
     270              a = 1.0e-100;
     271          } else {
     272            which[n++]=iRow;
     273            a=-value*element[j];
     274            assert (a);
     275          }
     276          array[iRow]=a;
     277        }
     278      }
     279      for (j=0;j<n;j++) {
     280        int iRow = which[j];
     281        // moving to point will increase row solution by this
     282        double distance = array[iRow];
     283        if (distance>1.0e-8) {
     284          if (distance+rowSolution[iRow]>rowUpper[iRow]+1.0e-8) {
     285            possible=false;
     286            break;
     287          }
     288        } else if (distance<-1.0e-8) {
     289          if (distance+rowSolution[iRow]<rowLower[iRow]-1.0e-8) {
     290            possible=false;
     291            break;
     292          }
     293        }
     294      }
     295      for (j=0;j<n;j++)
     296        array[which[j]]=0.0;
     297      delete [] array;
     298      delete [] which;
     299      if (possible) {
     300        valueInfeasibility=0.0;
     301        printf("possible %d %d %d\n",firstNonZero,lastNonZero,iWhere);
     302      }
     303    }
     304#endif
    159305  } else {
    160     return 0.0; // satisfied
    161   }
     306    valueInfeasibility = 0.0; // satisfied
     307  }
     308  return valueInfeasibility;
    162309}
    163310
     
    177324  double sum =0.0;
    178325
    179   int base=first_;
     326  int base=0;
    180327  for (j=0;j<numberMembers_;j++) {
    181328    for (int k=0;k<numberLinks_;k++) {
    182       int iColumn = base+k;
     329      int iColumn = which_[base+k];
    183330      double value = CoinMax(0.0,solution[iColumn]);
    184331      sum += value;
     
    192339    base += numberLinks_;
    193340  }
    194   assert (lastNonZero-firstNonZero==0) ;
    195   base=first_;
     341#ifdef DISTANCE
     342  if (lastNonZero-firstNonZero>sosType_-1) {
     343    /* may still be satisfied.
     344       For LOS type 2 we might wish to move coding around
     345       and keep initial info in model_ for speed
     346    */
     347    int iWhere;
     348    bool possible=false;
     349    for (iWhere=firstNonZero;iWhere<=lastNonZero;iWhere++) {
     350      if (fabs(weight-weights_[iWhere])<1.0e-8) {
     351        possible=true;
     352        break;
     353      }
     354    }
     355    if (possible) {
     356      // One could move some of this (+ arrays) into model_
     357      const CoinPackedMatrix * matrix = solver->getMatrixByCol();
     358      const double * element = matrix->getMutableElements();
     359      const int * row = matrix->getIndices();
     360      const CoinBigIndex * columnStart = matrix->getVectorStarts();
     361      const int * columnLength = matrix->getVectorLengths();
     362      const double * rowSolution = solver->getRowActivity();
     363      const double * rowLower = solver->getRowLower();
     364      const double * rowUpper = solver->getRowUpper();
     365      int numberRows = matrix->getNumRows();
     366      double * array = new double [numberRows];
     367      CoinZeroN(array,numberRows);
     368      int * which = new int [numberRows];
     369      int n=0;
     370      int base=numberLinks_*firstNonZero;
     371      for (j=firstNonZero;j<=lastNonZero;j++) {
     372        for (int k=0;k<numberLinks_;k++) {
     373          int iColumn = which_[base+k];
     374          double value = CoinMax(0.0,solution[iColumn]);
     375          if (value>integerTolerance&&upper[iColumn]) {
     376            value = CoinMin(value,upper[iColumn]);
     377            for (int j=columnStart[iColumn];j<columnStart[iColumn]+columnLength[iColumn];j++) {
     378              int iRow = row[j];
     379              double a = array[iRow];
     380              if (a) {
     381                a += value*element[j];
     382                if (!a)
     383                  a = 1.0e-100;
     384              } else {
     385                which[n++]=iRow;
     386                a=value*element[j];
     387                assert (a);
     388              }
     389              array[iRow]=a;
     390            }
     391          }
     392        }
     393        base += numberLinks_;
     394      }
     395      base=numberLinks_*iWhere;
     396      for (int k=0;k<numberLinks_;k++) {
     397        int iColumn = which_[base+k];
     398        const double value = 1.0;
     399        for (int j=columnStart[iColumn];j<columnStart[iColumn]+columnLength[iColumn];j++) {
     400          int iRow = row[j];
     401          double a = array[iRow];
     402          if (a) {
     403            a -= value*element[j];
     404            if (!a)
     405              a = 1.0e-100;
     406          } else {
     407            which[n++]=iRow;
     408            a=-value*element[j];
     409            assert (a);
     410          }
     411          array[iRow]=a;
     412        }
     413      }
     414      for (j=0;j<n;j++) {
     415        int iRow = which[j];
     416        // moving to point will increase row solution by this
     417        double distance = array[iRow];
     418        if (distance>1.0e-8) {
     419          if (distance+rowSolution[iRow]>rowUpper[iRow]+1.0e-8) {
     420            possible=false;
     421            break;
     422          }
     423        } else if (distance<-1.0e-8) {
     424          if (distance+rowSolution[iRow]<rowLower[iRow]-1.0e-8) {
     425            possible=false;
     426            break;
     427          }
     428        }
     429      }
     430      for (j=0;j<n;j++)
     431        array[which[j]]=0.0;
     432      delete [] array;
     433      delete [] which;
     434      if (possible) {
     435        printf("possible feas region %d %d %d\n",firstNonZero,lastNonZero,iWhere);
     436        firstNonZero=iWhere;
     437        lastNonZero=iWhere;
     438      }
     439    }
     440  }
     441#else
     442  assert (lastNonZero-firstNonZero<sosType_) ;
     443#endif
     444  base=0;
    196445  for (j=0;j<firstNonZero;j++) {
    197446    for (int k=0;k<numberLinks_;k++) {
    198       int iColumn = base+k;
     447      int iColumn = which_[base+k];
    199448      solver->setColUpper(iColumn,0.0);
    200449    }
     
    205454  for (j=lastNonZero+1;j<numberMembers_;j++) {
    206455    for (int k=0;k<numberLinks_;k++) {
    207       int iColumn = base+k;
     456      int iColumn = which_[base+k];
    208457      solver->setColUpper(iColumn,0.0);
    209458    }
     
    229478  double weight = 0.0;
    230479  double sum =0.0;
    231   int base=first_;
     480  int base=0;
    232481  for (j=0;j<numberMembers_;j++) {
    233482    for (int k=0;k<numberLinks_;k++) {
    234       int iColumn = base+k;
     483      int iColumn = which_[base+k];
    235484      if (upper[iColumn]) {
    236485        double value = CoinMax(0.0,solution[iColumn]);
     
    249498    base += numberLinks_;
    250499  }
    251   assert (lastNonZero-firstNonZero>=1) ;
     500  assert (lastNonZero-firstNonZero>=sosType_) ;
    252501  // find where to branch
    253502  assert (sum>0.0);
     
    258507    if (weight<weights_[iWhere+1])
    259508      break;
    260   separator = 0.5 *(weights_[iWhere]+weights_[iWhere+1]);
     509  if (sosType_==1) {
     510    // SOS 1
     511    separator = 0.5 *(weights_[iWhere]+weights_[iWhere+1]);
     512  } else {
     513    // SOS 2
     514    if (iWhere==firstNonFixed)
     515      iWhere++;;
     516    if (iWhere==lastNonFixed-1)
     517      iWhere = lastNonFixed-2;
     518    separator = weights_[iWhere+1];
     519  }
    261520  // create object
    262521  CbcBranchingObject * branch;
     
    305564}
    306565double
    307 CbcLinkBranchingObject::branch(bool normalBranch)
    308 {
    309   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    310     print(normalBranch);
    311   numberBranchesLeft_--;
     566CbcLinkBranchingObject::branch()
     567{
     568  decrementNumberBranchesLeft();
    312569  int numberMembers = set_->numberMembers();
    313570  int numberLinks = set_->numberLinks();
    314571  const double * weights = set_->weights();
     572  const int * which = set_->which();
    315573  OsiSolverInterface * solver = model_->solver();
    316574  //const double * lower = solver->getColLower();
     
    324582    }
    325583    assert (i<numberMembers);
    326     int base=set_->first()+i*numberLinks;;
     584    int base=i*numberLinks;;
    327585    for (;i<numberMembers;i++) {
    328586      for (int k=0;k<numberLinks;k++) {
    329         int iColumn = base+k;
     587        int iColumn = which[base+k];
    330588        solver->setColUpper(iColumn,0.0);
    331589      }
     
    335593  } else {
    336594    int i;
    337     int base=set_->first();
     595    int base=0;
    338596    for ( i=0;i<numberMembers;i++) {
    339597      if (weights[i] >= separator_) {
     
    341599      } else {
    342600        for (int k=0;k<numberLinks;k++) {
    343           int iColumn = base+k;
     601          int iColumn = which[base+k];
    344602          solver->setColUpper(iColumn,0.0);
    345603        }
     
    354612// Print what would happen 
    355613void
    356 CbcLinkBranchingObject::print(bool normalBranch)
     614CbcLinkBranchingObject::print()
    357615{
    358616  int numberMembers = set_->numberMembers();
    359617  int numberLinks = set_->numberLinks();
    360618  const double * weights = set_->weights();
     619  const int * which = set_->which();
    361620  OsiSolverInterface * solver = model_->solver();
    362621  const double * upper = solver->getColUpper();
     
    366625  int numberOther=0;
    367626  int i;
    368   int base=set_->first();
     627  int base=0;
    369628  for ( i=0;i<numberMembers;i++) {
    370629    for (int k=0;k<numberLinks;k++) {
    371       int iColumn = base+k;
     630      int iColumn = which[base+k];
    372631      double bound = upper[iColumn];
    373632      if (bound) {
     
    379638  }
    380639  // *** for way - up means fix all those in down section
    381   base=set_->first();
     640  base=0;
    382641  if (way_<0) {
    383642    printf("SOS Down");
    384643    for ( i=0;i<numberMembers;i++) {
     644      if (weights[i] > separator_)
     645        break;
    385646      for (int k=0;k<numberLinks;k++) {
    386         int iColumn = base+k;
     647        int iColumn = which[base+k];
    387648        double bound = upper[iColumn];
    388         if (weights[i] > separator_)
    389           break;
    390         else if (bound)
     649        if (bound)
    391650          numberOther++;
    392651      }
     
    396655    for (;i<numberMembers;i++) {
    397656      for (int k=0;k<numberLinks;k++) {
    398         int iColumn = base+k;
     657        int iColumn = which[base+k];
    399658        double bound = upper[iColumn];
    400659        if (bound)
     
    406665    printf("SOS Up");
    407666    for ( i=0;i<numberMembers;i++) {
     667      if (weights[i] >= separator_)
     668        break;
    408669      for (int k=0;k<numberLinks;k++) {
    409         int iColumn = base+k;
     670        int iColumn = which[base+k];
    410671        double bound = upper[iColumn];
    411         if (weights[i] >= separator_)
    412           break;
    413         else if (bound)
     672        if (bound)
    414673          numberFixed++;
    415674      }
     
    419678    for (;i<numberMembers;i++) {
    420679      for (int k=0;k<numberLinks;k++) {
    421         int iColumn = base+k;
     680        int iColumn = which[base+k];
    422681        double bound = upper[iColumn];
    423682        if (bound)
     
    428687  }
    429688  assert ((numberFixed%numberLinks)==0);
    430   assert ((numberFixed%numberOther)==0);
     689  assert ((numberOther%numberLinks)==0);
    431690  printf(" - at %g, free range %d (%g) => %d (%g), %d would be fixed, %d other way\n",
    432691         separator_,first,weights[first],last,weights[last],numberFixed/numberLinks,
  • trunk/Cbc/examples/CbcBranchLink.hpp

    r129 r640  
    2121      apart from k*numberLink to (k+1)*numberLink-1 where k is 0 through
    2222      numberInSet-1.  The length of weights array is numberInSet.
    23       For this simple version the variables in matrix are the numberInSet*numberLink
     23      For this constructor the variables in matrix are the numberInSet*numberLink
    2424      starting at first. If weights null then 0,1,2..
    2525  */
    2626  CbcLink (CbcModel * model, int numberMembers,
    2727           int numberLinks, int first,
     28           const double * weights, int setNumber);
     29  /** Useful constructor - A valid solution is if all variables are zero
     30      apart from k*numberLink to (k+1)*numberLink-1 where k is 0 through
     31      numberInSet-1.  The length of weights array is numberInSet.
     32      For this constructor the variables are given by list - grouped.
     33      If weights null then 0,1,2..
     34  */
     35  CbcLink (CbcModel * model, int numberMembers,
     36           int numberLinks, int typeSOS, const int * which,
    2837           const double * weights, int setNumber);
    2938 
     
    5665  {return numberLinks_;};
    5766
    58   /// First variable in matrix
    59   inline int first() const
    60   {return first_;};
     67  /// Which variables
     68  inline const int * which() const
     69  {return which_;};
    6170
    6271  /** Array of weights */
     
    7483  /// Number of links
    7584   int numberLinks_;
    76   /// First member
    77   int first_;
     85  /// Members
     86  int * which_;
     87  /// Type 1 or 2
     88  int sosType_;
    7889};
    7990/** Branching object for Special ordered sets
     
    107118 
    108119  /// Does next branch and updates state
    109   virtual double branch(bool normalBranch=false);
     120  virtual double branch();
    110121
    111122  /** \brief Print something about branch - only if log level high
    112123  */
    113   virtual void print(bool normalBranch);
     124  virtual void print();
    114125private:
    115126  /// data
  • trunk/Cbc/examples/CbcBranchUser.cpp

    r2 r640  
    323323  return whichObject;
    324324}
     325/** Default Constructor
     326
     327  Equivalent to an unspecified binary variable.
     328*/
     329CbcSimpleIntegerFixed::CbcSimpleIntegerFixed ()
     330  : CbcSimpleInteger()
     331{
     332}
     333
     334/** Useful constructor
     335
     336  Loads actual upper & lower bounds for the specified variable.
     337*/
     338CbcSimpleIntegerFixed::CbcSimpleIntegerFixed (CbcModel * model,
     339                                    int iColumn, double breakEven)
     340  : CbcSimpleInteger(model,iColumn,breakEven)
     341{
     342}
     343// Constructor from simple
     344CbcSimpleIntegerFixed::CbcSimpleIntegerFixed (const CbcSimpleInteger & rhs)
     345  : CbcSimpleInteger(rhs)
     346{
     347}
     348
     349// Copy constructor
     350CbcSimpleIntegerFixed::CbcSimpleIntegerFixed ( const CbcSimpleIntegerFixed & rhs)
     351  :CbcSimpleInteger(rhs)
     352
     353{
     354}
     355
     356// Clone
     357CbcObject *
     358CbcSimpleIntegerFixed::clone() const
     359{
     360  return new CbcSimpleIntegerFixed(*this);
     361}
     362
     363// Assignment operator
     364CbcSimpleIntegerFixed &
     365CbcSimpleIntegerFixed::operator=( const CbcSimpleIntegerFixed& rhs)
     366{
     367  if (this!=&rhs) {
     368    CbcSimpleInteger::operator=(rhs);
     369  }
     370  return *this;
     371}
     372
     373// Destructor
     374CbcSimpleIntegerFixed::~CbcSimpleIntegerFixed ()
     375{
     376}
     377
     378// Infeasibility - large is 0.5
     379double
     380CbcSimpleIntegerFixed::infeasibility(int & preferredWay) const
     381{
     382  OsiSolverInterface * solver = model_->solver();
     383  const double * solution = model_->testSolution();
     384  const double * lower = solver->getColLower();
     385  const double * upper = solver->getColUpper();
     386  double value = solution[columnNumber_];
     387  value = CoinMax(value, lower[columnNumber_]);
     388  value = CoinMin(value, upper[columnNumber_]);
     389  /*printf("%d %g %g %g %g\n",columnNumber_,value,lower[columnNumber_],
     390    solution[columnNumber_],upper[columnNumber_]);*/
     391  double nearest = floor(value+(1.0-breakEven_));
     392  assert (breakEven_>0.0&&breakEven_<1.0);
     393  double integerTolerance =
     394    model_->getDblParam(CbcModel::CbcIntegerTolerance);
     395  if (nearest>value)
     396    preferredWay=1;
     397  else
     398    preferredWay=-1;
     399  if (preferredWay_)
     400    preferredWay=preferredWay_;
     401  double weight = fabs(value-nearest);
     402  // normalize so weight is 0.5 at break even
     403  if (nearest<value)
     404    weight = (0.5/breakEven_)*weight;
     405  else
     406    weight = (0.5/(1.0-breakEven_))*weight;
     407  if (fabs(value-nearest)<=integerTolerance) {
     408    if (upper[columnNumber_]==lower[columnNumber_])
     409      return 0.0;
     410    else
     411      return 1.0e-5;
     412  } else {
     413    return weight;
     414  }
     415}
     416// Creates a branching object
     417CbcBranchingObject *
     418CbcSimpleIntegerFixed::createBranch(OsiSolverInterface * solver,
     419                                            const OsiBranchingInformation * info, int way) 
     420{
     421  const double * solution = model_->testSolution();
     422  const double * lower = solver->getColLower();
     423  const double * upper = solver->getColUpper();
     424  double value = solution[columnNumber_];
     425  value = CoinMax(value, lower[columnNumber_]);
     426  value = CoinMin(value, upper[columnNumber_]);
     427  assert (upper[columnNumber_]>lower[columnNumber_]);
     428  if (!model_->hotstartSolution()) {
     429    double nearest = floor(value+0.5);
     430    double integerTolerance =
     431    model_->getDblParam(CbcModel::CbcIntegerTolerance);
     432    if (fabs(value-nearest)<integerTolerance) {
     433      // adjust value
     434      if (nearest!=upper[columnNumber_])
     435        value = nearest+2.0*integerTolerance;
     436      else
     437        value = nearest-2.0*integerTolerance;
     438    }
     439  } else {
     440    const double * hotstartSolution = model_->hotstartSolution();
     441    double targetValue = hotstartSolution[columnNumber_];
     442    if (way>0)
     443      value = targetValue-0.1;
     444    else
     445      value = targetValue+0.1;
     446  }
     447  CbcBranchingObject * branch = new CbcIntegerBranchingObject(model_,columnNumber_,way,
     448                                             value);
     449  branch->setOriginalObject(this);
     450  return branch;
     451}
  • trunk/Cbc/examples/CbcBranchUser.hpp

    r2 r640  
    55
    66#include "CbcBranchBase.hpp"
     7#include "CbcBranchActual.hpp"
    78
    89/** Branching decision user class */
     
    5556};
    5657
     58/// Define a single integer class where branching is forced until fixed
     59
     60
     61class CbcSimpleIntegerFixed : public CbcSimpleInteger {
     62
     63public:
     64
     65  // Default Constructor
     66  CbcSimpleIntegerFixed ();
     67
     68  // Useful constructor - passed integer index and model index
     69  CbcSimpleIntegerFixed (CbcModel * model, int iColumn, double breakEven=0.5);
     70 
     71  // Constructor from simple
     72  CbcSimpleIntegerFixed (const CbcSimpleInteger & simple);
     73 
     74  // Copy constructor
     75  CbcSimpleIntegerFixed ( const CbcSimpleIntegerFixed &);
     76   
     77  /// Clone
     78  virtual CbcObject * clone() const;
     79
     80  // Assignment operator
     81  CbcSimpleIntegerFixed & operator=( const CbcSimpleIntegerFixed& rhs);
     82
     83  // Destructor
     84  ~CbcSimpleIntegerFixed ();
     85 
     86  /// Infeasibility - large is 0.5
     87  virtual double infeasibility(int & preferredWay) const;
     88
     89  /** Creates a branching object
     90
     91    The preferred direction is set by \p way, -1 for down, +1 for up.
     92  */
     93  //virtual CbcBranchingObject * createBranch(int way) ;
     94  /** Create a branching object and indicate which way to branch first.
     95     
     96      The branching object has to know how to create branches (fix
     97      variables, etc.)
     98  */
     99  virtual CbcBranchingObject * createBranch(OsiSolverInterface * solver,
     100                                            const OsiBranchingInformation * info, int way) ;
     101
     102protected:
     103  /// data
     104};
     105
    57106#endif
  • trunk/Cbc/examples/CbcCompareUser.cpp

    r180 r640  
    8282{
    8383}
    84 
     84// For moment go to default
     85#if 0
    8586// Returns true if y better than x
    8687bool
     
    179180  }
    180181}
     182#else
     183
     184// Returns true if y better than x
     185bool
     186CbcCompareUser::test (CbcNode * x, CbcNode * y)
     187{
     188  if (weight_==-1.0&&(y->depth()>7||x->depth()>7)) {
     189    // before solution
     190    /* printf("x %d %d %g, y %d %d %g\n",
     191       x->numberUnsatisfied(),x->depth(),x->objectiveValue(),
     192       y->numberUnsatisfied(),y->depth(),y->objectiveValue()); */
     193    if (x->numberUnsatisfied() > y->numberUnsatisfied()) {
     194      return true;
     195    } else if (x->numberUnsatisfied() < y->numberUnsatisfied()) {
     196      return false;
     197    } else {
     198      int testX = x->depth();
     199      int testY = y->depth();
     200      if (testX!=testY)
     201        return testX < testY;
     202      else
     203        return equalityTest(x,y); // so ties will be broken in consistent manner
     204    }
     205  } else {
     206    // after solution
     207    double weight = CoinMax(weight_,0.0);
     208    double testX =  x->objectiveValue()+ weight*x->numberUnsatisfied();
     209    double testY = y->objectiveValue() + weight*y->numberUnsatisfied();
     210    if (testX!=testY)
     211      return testX > testY;
     212    else
     213      return equalityTest(x,y); // so ties will be broken in consistent manner
     214  }
     215}
     216// This allows method to change behavior as it is called
     217// after each solution
     218void
     219CbcCompareUser::newSolution(CbcModel * model,
     220                               double objectiveAtContinuous,
     221                               int numberInfeasibilitiesAtContinuous)
     222{
     223  if (model->getSolutionCount()==model->getNumberHeuristicSolutions()&&
     224      model->getSolutionCount()<5&&model->getNodeCount()<500)
     225    return; // solution was got by rounding
     226  // set to get close to this solution
     227  double costPerInteger =
     228    (model->getObjValue()-objectiveAtContinuous)/
     229    ((double) numberInfeasibilitiesAtContinuous);
     230  weight_ = 0.95*costPerInteger;
     231  saveWeight_ = 0.95*weight_;
     232  numberSolutions_++;
     233  if (numberSolutions_>5)
     234    weight_ =0.0; // this searches on objective
     235}
     236// This allows method to change behavior
     237bool
     238CbcCompareUser::every1000Nodes(CbcModel * model, int numberNodes)
     239{
     240  double saveWeight=weight_;
     241  int numberNodes1000 = numberNodes/1000;
     242  if (numberNodes>10000) {
     243    weight_ =0.0; // this searches on objective
     244    // but try a bit of other stuff
     245    if ((numberNodes1000%4)==1)
     246      weight_=saveWeight_;
     247  } else if (numberNodes==1000&&weight_==-2.0) {
     248    weight_=-1.0; // Go to depth first
     249  }
     250  // get size of tree
     251  treeSize_ = model->tree()->size();
     252  if (treeSize_>10000) {
     253    int n1 = model->solver()->getNumRows()+model->solver()->getNumCols();
     254    int n2 = model->numberObjects();
     255    double size = n1*0.1 + n2*2.0;
     256    // set weight to reduce size most of time
     257    if (treeSize_*size>5.0e7)
     258      weight_=-1.0;
     259    else if ((numberNodes1000%4)==0&&treeSize_*size>1.0e6)
     260      weight_=-1.0;
     261    else if ((numberNodes1000%4)==1)
     262      weight_=0.0;
     263    else
     264      weight_=saveWeight_;
     265  }
     266  return (weight_!=saveWeight);
     267}
     268// Returns true if wants code to do scan with alternate criterion
     269bool
     270CbcCompareUser::fullScan() const
     271{
     272  return false;
     273}
     274// This is alternate test function
     275bool
     276CbcCompareUser::alternateTest (CbcNode * x, CbcNode * y)
     277{
     278  // not used
     279  abort();
     280  return false;
     281}
     282#endif
  • trunk/Cbc/examples/Makefile.in

    r461 r640  
    2323        CbcSolver2.@OBJEXT@ \
    2424        CbcSolver3.@OBJEXT@ \
     25        CbcSolverLink.@OBJEXT@ \
     26        ClpDynamicInterface.@OBJEXT@ \
    2527        ClpQuadInterface.@OBJEXT@ \
     28        CoinWarmStartBasisDynamic.@OBJEXT@ \
    2629        CbcBranchFollow2.@OBJEXT@ \
     30        CbcBranchLotsizeSimple.@OBJEXT@ \
    2731        CbcBranchUser.@OBJEXT@ \
    2832        CbcBranchLink.@OBJEXT@
     
    8185        driver2.@OBJEXT@ driver2@EXEEXT@ \
    8286        driver.@OBJEXT@ driver@EXEEXT@ \
     87        dynamic.@OBJEXT@ dynamic@EXEEXT@ \
    8388        fast0507b.@OBJEXT@ fast0507b@EXEEXT@ \
    8489        fast0507.@OBJEXT@ fast0507@EXEEXT@ \
     
    111116
    112117clean:
    113         rm -rf $(CLEANFILES)
     118        rm -rf $(CLEANFILES) $(OBJS)
    114119
    115120.cpp.o:
  • trunk/Cbc/examples/qmip2.cpp

    r394 r640  
    188188  // This clones solver
    189189  CbcModel model(solver1);
    190   // Add stored cuts
    191   model.addCutGenerator(&stored,-1,"Stored");
     190  // Add stored cuts (making sure at all depths)
     191  model.addCutGenerator(&stored,1,"Stored",true,false,false,-100,1,-1);
    192192  /*  You need the next few lines -
    193193      a) so that cut generator will always be called again if it generated cuts
    194194      b) it is known that matrix is not enough to define problem so do cuts even
    195195         if it looks integer feasible at continuous optimum.
    196       c) a solution found ny strong branching will be ignored.
     196      c) a solution found by strong branching will be ignored.
     197      d) don't recompute a solution once found
    197198  */
    198199  // Make sure cut generator called correctly (a)
     
    205206  CbcFeasibilityNoStrong noStrong;
    206207  model.setProblemFeasibility(noStrong);
     208  // Say don't recompute solution d)
     209  model.setSpecialOptions(4);
    207210 
    208211  double time1 = CoinCpuTime();
  • trunk/Cbc/inc/config_cbc.h.in

    r405 r640  
    11/* inc/config_cbc.h.in.  Generated from configure.ac by autoheader.  */
    22
    3 /* Define to the name of the default solver to be used in CBC in small letters
    4    */
     3/* Define to the name of the default solver to be used in cbc-generic in small
     4   letters */
    55#undef CBC_DEFAULT_SOLVER
     6
     7/* Define to 1 if the SMP version of Cbc should be compiled */
     8#undef CBC_THREAD
    69
    710/* Define to the debug sanity check level (0 is no test) */
  • trunk/Cbc/src/CbcBranchActual.cpp

    r535 r640  
    338338    weights_(NULL),
    339339    numberMembers_(0),
    340     sosType_(-1)
     340    sosType_(-1),
     341    integerValued_(false)
    341342{
    342343}
     
    350351{
    351352  id_=identifier;
     353  integerValued_ = type==1;
    352354  if (numberMembers_) {
    353355    members_ = new int[numberMembers_];
     
    362364    // sort so weights increasing
    363365    CoinSort_2(weights_,weights_+numberMembers_,members_);
     366    double last = -COIN_DBL_MAX;
     367    int i;
     368    for (i=0;i<numberMembers_;i++) {
     369      double possible = CoinMax(last+1.0e-10,weights_[i]);
     370      weights_[i] = possible;
     371      last=possible;
     372    }
    364373  } else {
    365374    members_ = NULL;
     
    375384  numberMembers_ = rhs.numberMembers_;
    376385  sosType_ = rhs.sosType_;
     386  integerValued_ = rhs.integerValued_;
    377387  if (numberMembers_) {
    378388    members_ = new int[numberMembers_];
     
    403413    numberMembers_ = rhs.numberMembers_;
    404414    sosType_ = rhs.sosType_;
     415    integerValued_ = rhs.integerValued_;
    405416    if (numberMembers_) {
    406417      members_ = new int[numberMembers_];
     
    675686  return branch;
    676687}
    677 
     688// Construct an OsiSOS object
     689OsiSOS *
     690CbcSOS::osiObject(const OsiSolverInterface * solver) const
     691{
     692  OsiSOS * obj = new OsiSOS(solver,numberMembers_,members_,weights_,sosType_);
     693  obj->setPriority(priority());
     694  return obj;
     695}
    678696
    679697/** Default Constructor
     
    683701CbcSimpleInteger::CbcSimpleInteger ()
    684702  : CbcObject(),
    685     sequence_(-1),
    686     columnNumber_(-1),
    687703    originalLower_(0.0),
    688704    originalUpper_(1.0),
    689     breakEven_(0.5)
     705    breakEven_(0.5),
     706    columnNumber_(-1),
     707    preferredWay_(0)
    690708{
    691709}
     
    695713  Loads actual upper & lower bounds for the specified variable.
    696714*/
    697 CbcSimpleInteger::CbcSimpleInteger (CbcModel * model, int sequence,
    698                                     int iColumn, double breakEven)
     715CbcSimpleInteger::CbcSimpleInteger ( CbcModel * model, int iColumn, double breakEven)
    699716  : CbcObject(model)
    700717{
    701   sequence_ = sequence ;
    702   id_ = iColumn; // set as well
    703718  columnNumber_ = iColumn ;
    704   originalLower_ = model_->solver()->getColLower()[columnNumber_] ;
    705   originalUpper_ = model_->solver()->getColUpper()[columnNumber_] ;
     719  originalLower_ = model->solver()->getColLower()[columnNumber_] ;
     720  originalUpper_ = model->solver()->getColUpper()[columnNumber_] ;
    706721  breakEven_ = breakEven;
    707722  assert (breakEven_>0.0&&breakEven_<1.0);
    708 }
     723  preferredWay_ = 0;
     724}
     725
    709726
    710727// Copy constructor
     
    713730
    714731{
    715   sequence_ = rhs.sequence_;
    716732  columnNumber_ = rhs.columnNumber_;
    717733  originalLower_ = rhs.originalLower_;
    718734  originalUpper_ = rhs.originalUpper_;
    719735  breakEven_ = rhs.breakEven_;
     736  preferredWay_ = rhs.preferredWay_;
    720737}
    721738
     
    733750  if (this!=&rhs) {
    734751    CbcObject::operator=(rhs);
    735     columnNumber_ = model_->integerVariable()[sequence_];
     752    columnNumber_ = rhs.columnNumber_;
     753    originalLower_ = rhs.originalLower_;
     754    originalUpper_ = rhs.originalUpper_;
    736755    breakEven_ = rhs.breakEven_;
     756    preferredWay_ = rhs.preferredWay_;
    737757  }
    738758  return *this;
     
    743763{
    744764}
    745 
    746 // Infeasibility - large is 0.5
    747 double
    748 CbcSimpleInteger::infeasibility(int & preferredWay) const
    749 {
    750   OsiSolverInterface * solver = model_->solver();
    751   const double * solution = model_->testSolution();
    752   const double * lower = solver->getColLower();
    753   const double * upper = solver->getColUpper();
    754   double value = solution[columnNumber_];
    755   value = CoinMax(value, lower[columnNumber_]);
    756   value = CoinMin(value, upper[columnNumber_]);
    757   /*printf("%d %g %g %g %g\n",columnNumber_,value,lower[columnNumber_],
    758     solution[columnNumber_],upper[columnNumber_]);*/
     765// Construct an OsiSimpleInteger object
     766OsiSimpleInteger *
     767CbcSimpleInteger::osiObject() const
     768{
     769  OsiSimpleInteger * obj = new OsiSimpleInteger(columnNumber_,
     770                                                originalLower_,originalUpper_);
     771  obj->setPriority(priority());
     772  return obj;
     773}
     774
     775double
     776CbcSimpleInteger::infeasibility(const OsiSolverInterface * solver, const OsiBranchingInformation * info,
     777                         int & preferredWay) const
     778{
     779  double value = info->solution_[columnNumber_];
     780  value = CoinMax(value, info->lower_[columnNumber_]);
     781  value = CoinMin(value, info->upper_[columnNumber_]);
    759782  double nearest = floor(value+(1.0-breakEven_));
    760783  assert (breakEven_>0.0&&breakEven_<1.0);
    761   double integerTolerance =
    762     model_->getDblParam(CbcModel::CbcIntegerTolerance);
    763784  if (nearest>value)
    764785    preferredWay=1;
     
    773794  else
    774795    weight = (0.5/(1.0-breakEven_))*weight;
    775   if (fabs(value-nearest)<=integerTolerance)
     796  if (fabs(value-nearest)<=info->integerTolerance_)
    776797    return 0.0;
    777798  else
    778799    return weight;
     800}
     801double
     802CbcSimpleInteger::feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const
     803{
     804  double value = info->solution_[columnNumber_];
     805  double newValue = CoinMax(value, info->lower_[columnNumber_]);
     806  newValue = CoinMin(newValue, info->upper_[columnNumber_]);
     807  newValue = floor(newValue+0.5);
     808  solver->setColLower(columnNumber_,newValue);
     809  solver->setColUpper(columnNumber_,newValue);
     810  return fabs(value-newValue);
     811}
     812
     813/* Create an OsiSolverBranch object
     814   
     815This returns NULL if branch not represented by bound changes
     816*/
     817OsiSolverBranch *
     818CbcSimpleInteger::solverBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info) const
     819{
     820  double value = info->solution_[columnNumber_];
     821  value = CoinMax(value, info->lower_[columnNumber_]);
     822  value = CoinMin(value, info->upper_[columnNumber_]);
     823  assert (info->upper_[columnNumber_]>info->lower_[columnNumber_]);
     824#ifndef NDEBUG
     825  double nearest = floor(value+0.5);
     826  assert (fabs(value-nearest)>info->integerTolerance_);
     827#endif
     828  OsiSolverBranch * branch = new OsiSolverBranch();
     829  branch->addBranch(columnNumber_,value);
     830  return branch;
     831}
     832// Creates a branching object
     833CbcBranchingObject *
     834CbcSimpleInteger::createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way)
     835{
     836  double value = info->solution_[columnNumber_];
     837  value = CoinMax(value, info->lower_[columnNumber_]);
     838  value = CoinMin(value, info->upper_[columnNumber_]);
     839  assert (info->upper_[columnNumber_]>info->lower_[columnNumber_]);
     840  if (!info->hotstartSolution_) {
     841#ifndef NDEBUG
     842    double nearest = floor(value+0.5);
     843    assert (fabs(value-nearest)>info->integerTolerance_);
     844#endif
     845  } else {
     846    double targetValue = info->hotstartSolution_[columnNumber_];
     847    if (way>0)
     848      value = targetValue-0.1;
     849    else
     850      value = targetValue+0.1;
     851  }
     852  CbcBranchingObject * branch = new CbcIntegerBranchingObject(model_,columnNumber_,way,
     853                                             value);
     854  branch->setOriginalObject(this);
     855  return branch;
     856}
     857/* Column number if single column object -1 otherwise,
     858   so returns >= 0
     859   Used by heuristics
     860*/
     861int
     862CbcSimpleInteger::columnNumber() const
     863{
     864  return columnNumber_;
     865}
     866/* Reset variable bounds to their original values.
     867 
     868    Bounds may be tightened, so it may be good to be able to set this info in object.
     869*/
     870void
     871CbcSimpleInteger::resetBounds(const OsiSolverInterface * solver)
     872{
     873  originalLower_ = solver->getColLower()[columnNumber_] ;
     874  originalUpper_ = solver->getColUpper()[columnNumber_] ;
     875}
     876
     877/*  Change column numbers after preprocessing
     878 */
     879void
     880CbcSimpleInteger::resetSequenceEtc(int numberColumns, const int * originalColumns)
     881{
     882  int iColumn;
     883  for (iColumn=0;iColumn<numberColumns;iColumn++) {
     884    if (columnNumber_==originalColumns[iColumn])
     885      break;
     886  }
     887  assert (iColumn<numberColumns);
     888  columnNumber_ = iColumn;
     889}
     890
     891// Infeasibility - large is 0.5
     892double
     893CbcSimpleInteger::infeasibility(int & preferredWay) const
     894{
     895  OsiBranchingInformation info(model_->solver(),model_->normalSolver(),false);
     896  return infeasibility(model_->solver(),&info,preferredWay);
    779897}
    780898
     
    787905CbcSimpleInteger::feasibleRegion()
    788906{
    789   OsiSolverInterface * solver = model_->solver();
    790   const double * lower = solver->getColLower();
    791   const double * upper = solver->getColUpper();
    792   const double * solution = model_->testSolution();
    793   double value = solution[columnNumber_];
    794   value = CoinMax(value, lower[columnNumber_]);
    795   value = CoinMin(value, upper[columnNumber_]);
    796 
    797   double nearest = floor(value+0.5);
    798   //double integerTolerance =
    799   //model_->getDblParam(CbcModel::CbcIntegerTolerance);
    800   // Scaling may have moved it a bit
    801   //assert (fabs(value-nearest)<=100.0*integerTolerance);
    802   assert (fabs(value-nearest)<=0.01);
    803   solver->setColLower(columnNumber_,nearest);
    804   solver->setColUpper(columnNumber_,nearest);
    805 }
    806 // Redoes data when sequence numbers change
    807 void
    808 CbcSimpleInteger::redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns)
    809 {
    810   model_=model;
    811   int i;
    812   for (i=0;i<numberColumns;i++) {
    813     if (originalColumns[i]==columnNumber_)
    814       break;
    815   }
    816   if (i<numberColumns)
    817     columnNumber_=i;
    818   else
    819     abort(); // should never happen
    820 }
    821 /* Column number if single column object -1 otherwise,
    822    so returns >= 0
    823    Used by heuristics
    824 */
    825 int
    826 CbcSimpleInteger::columnNumber() const
    827 {
    828   return columnNumber_;
    829 }
    830 
    831 // Creates a branching object
     907  abort();
     908}
    832909CbcBranchingObject *
    833 CbcSimpleInteger::createBranch(int way)
    834 {
    835   OsiSolverInterface * solver = model_->solver();
    836   const double * solution = model_->testSolution();
    837   const double * lower = solver->getColLower();
    838   const double * upper = solver->getColUpper();
    839   double value = solution[columnNumber_];
    840   value = CoinMax(value, lower[columnNumber_]);
    841   value = CoinMin(value, upper[columnNumber_]);
    842   assert (upper[columnNumber_]>lower[columnNumber_]);
    843   if (!model_->hotstartSolution()) {
    844 #ifndef NDEBUG
    845     double nearest = floor(value+0.5);
    846     double integerTolerance =
    847     model_->getDblParam(CbcModel::CbcIntegerTolerance);
    848     assert (fabs(value-nearest)>integerTolerance);
    849 #endif
    850   } else {
    851     const double * hotstartSolution = model_->hotstartSolution();
    852     double targetValue = hotstartSolution[columnNumber_];
    853     if (way>0)
    854       value = targetValue-0.1;
    855     else
    856       value = targetValue+0.1;
    857   }
    858   CbcBranchingObject * branch = new CbcIntegerBranchingObject(model_,sequence_,way,
    859                                              value);
    860   branch->setOriginalObject(this);
    861   return branch;
    862 }
    863 
    864 /* Create an OsiSolverBranch object
    865    
    866 This returns NULL if branch not represented by bound changes
    867 */
    868 OsiSolverBranch *
    869 CbcSimpleInteger::solverBranch() const
    870 {
    871   OsiSolverInterface * solver = model_->solver();
    872   const double * solution = model_->testSolution();
    873   const double * lower = solver->getColLower();
    874   const double * upper = solver->getColUpper();
    875   double value = solution[columnNumber_];
    876   value = CoinMax(value, lower[columnNumber_]);
    877   value = CoinMin(value, upper[columnNumber_]);
    878   assert (upper[columnNumber_]>lower[columnNumber_]);
    879 #ifndef NDEBUG
    880   double nearest = floor(value+0.5);
    881   double integerTolerance =
    882     model_->getDblParam(CbcModel::CbcIntegerTolerance);
    883   assert (fabs(value-nearest)>integerTolerance);
    884 #endif
    885   OsiSolverBranch * branch = new OsiSolverBranch();
    886   branch->addBranch(columnNumber_,value);
    887   return branch;
    888 }
    889  
    890 
    891 /* Given valid solution (i.e. satisfied) and reduced costs etc
    892    returns a branching object which would give a new feasible
    893    point in direction reduced cost says would be cheaper.
    894    If no feasible point returns null
    895 */
    896 CbcBranchingObject *
    897 CbcSimpleInteger::preferredNewFeasible() const
    898 {
    899   OsiSolverInterface * solver = model_->solver();
    900   double value = model_->testSolution()[columnNumber_];
    901 
    902   double nearest = floor(value+0.5);
    903 #ifndef NDEBUG
    904   double integerTolerance =
    905     model_->getDblParam(CbcModel::CbcIntegerTolerance);
    906   assert (fabs(value-nearest)<=integerTolerance);
    907 #endif
    908   double dj = solver->getObjSense()*solver->getReducedCost()[columnNumber_];
    909   CbcIntegerBranchingObject * object = NULL;
    910   if (dj>=0.0) {
    911     // can we go down
    912     if (nearest>originalLower_+0.5) {
    913       // yes
    914       object = new CbcIntegerBranchingObject(model_,sequence_,-1,
    915                                              nearest-1.0,nearest-1.0);
    916     }
    917   } else {
    918     // can we go up
    919     if (nearest<originalUpper_-0.5) {
    920       // yes
    921       object = new CbcIntegerBranchingObject(model_,sequence_,-1,
    922                                              nearest+1.0,nearest+1.0);
    923     }
    924   }
    925   return object;
    926 }
    927  
    928 /* Given valid solution (i.e. satisfied) and reduced costs etc
    929    returns a branching object which would give a new feasible
    930    point in direction opposite to one reduced cost says would be cheaper.
    931    If no feasible point returns null
    932 */
    933 CbcBranchingObject *
    934 CbcSimpleInteger::notPreferredNewFeasible() const
    935 {
    936   OsiSolverInterface * solver = model_->solver();
    937   double value = model_->testSolution()[columnNumber_];
    938 
    939   double nearest = floor(value+0.5);
    940 #ifndef NDEBUG
    941   double integerTolerance =
    942     model_->getDblParam(CbcModel::CbcIntegerTolerance);
    943   assert (fabs(value-nearest)<=integerTolerance);
    944 #endif
    945   double dj = solver->getObjSense()*solver->getReducedCost()[columnNumber_];
    946   CbcIntegerBranchingObject * object = NULL;
    947   if (dj<=0.0) {
    948     // can we go down
    949     if (nearest>originalLower_+0.5) {
    950       // yes
    951       object = new CbcIntegerBranchingObject(model_,sequence_,-1,
    952                                              nearest-1.0,nearest-1.0);
    953     }
    954   } else {
    955     // can we go up
    956     if (nearest<originalUpper_-0.5) {
    957       // yes
    958       object = new CbcIntegerBranchingObject(model_,sequence_,-1,
    959                                              nearest+1.0,nearest+1.0);
    960     }
    961   }
    962   return object;
    963 }
    964  
    965 /*
    966   Bounds may be tightened, so it may be good to be able to refresh the local
    967   copy of the original bounds.
    968  */
    969 void
    970 CbcSimpleInteger::resetBounds()
    971 {
    972   originalLower_ = model_->solver()->getColLower()[columnNumber_];
    973   originalUpper_ = model_->solver()->getColUpper()[columnNumber_];
    974 }
    975 
    976 
     910CbcSimpleInteger::createBranch( int way)
     911{
     912  abort();
     913  return NULL;
     914}
    977915// Default Constructor
    978916CbcIntegerBranchingObject::CbcIntegerBranchingObject()
     
    990928  :CbcBranchingObject(model,variable,way,value)
    991929{
    992   int iColumn = model_->integerVariable()[variable_];
     930  int iColumn = variable;
    993931  down_[0] = model_->solver()->getColLower()[iColumn];
    994932  down_[1] = floor(value_);
     
    1003941  :CbcBranchingObject(model,variable,way,lowerValue)
    1004942{
    1005   numberBranchesLeft_=1;
     943  setNumberBranchesLeft(1);
    1006944  down_[0] = lowerValue;
    1007945  down_[1] = upperValue;
     
    1043981CbcIntegerBranchingObject::~CbcIntegerBranchingObject ()
    1044982{
     983  // for debugging threads
     984  way_=-23456789;
    1045985}
    1046986
     
    1056996*/
    1057997double
    1058 CbcIntegerBranchingObject::branch(bool normalBranch)
    1059 {
    1060   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    1061     print(normalBranch);
    1062   numberBranchesLeft_--;
    1063   int iColumn = model_->integerVariable()[variable_];
     998CbcIntegerBranchingObject::branch()
     999{
     1000  // for debugging threads
     1001  if (way_<-1||way_>100000) {
     1002    printf("way %d, left %d, iCol %d, variable %d\n",
     1003           way_,numberBranchesLeft(),
     1004           originalCbcObject_->columnNumber(),variable_);
     1005    assert (way_!=-23456789);
     1006  }
     1007  decrementNumberBranchesLeft();
     1008  int iColumn = originalCbcObject_->columnNumber();
     1009  assert (variable_==iColumn);
     1010  double olb,oub ;
     1011  olb = model_->solver()->getColLower()[iColumn] ;
     1012  oub = model_->solver()->getColUpper()[iColumn] ;
     1013#ifdef COIN_DEVELOP
     1014  if (olb!=down_[0]||oub!=up_[1]) {
     1015    if (way_>0)
     1016      printf("branching up on var %d: [%g,%g] => [%g,%g] - other [%g,%g]\n",
     1017             iColumn,olb,oub,up_[0],up_[1],down_[0],down_[1]) ;
     1018    else
     1019      printf("branching down on var %d: [%g,%g] => [%g,%g] - other [%g,%g]\n",
     1020             iColumn,olb,oub,down_[0],down_[1],up_[0],up_[1]) ;
     1021  }
     1022#endif
    10641023  if (way_<0) {
    10651024#ifdef CBC_DEBUG
     
    10851044    way_=-1;      // Swap direction
    10861045  }
     1046  double nlb = model_->solver()->getColLower()[iColumn];
     1047  double nub = model_->solver()->getColUpper()[iColumn];
     1048  if (nlb<olb) {
     1049#ifndef NDEBUG
     1050    printf("bad lb change for column %d from %g to %g\n",iColumn,olb,nlb);
     1051#endif
     1052    model_->solver()->setColLower(iColumn,CoinMin(olb,nub));
     1053    nlb=olb;
     1054  }
     1055  if (nub>oub) {
     1056#ifndef NDEBUG
     1057    printf("bad ub change for column %d from %g to %g\n",iColumn,oub,nub);
     1058#endif
     1059    model_->solver()->setColUpper(iColumn,CoinMax(oub,nlb));
     1060  }
     1061#ifndef NDEBUG
     1062  if (nlb<olb+1.0e-8&&nub>oub-1.0e-8)
     1063    printf("bad null change for column %d - bounds %g,%g\n",iColumn,olb,oub);
     1064#endif
    10871065  return 0.0;
    10881066}
    10891067// Print what would happen 
    10901068void
    1091 CbcIntegerBranchingObject::print(bool normalBranch)
    1092 {
    1093   int iColumn = model_->integerVariable()[variable_];
     1069CbcIntegerBranchingObject::print()
     1070{
     1071  int iColumn = originalCbcObject_->columnNumber();
     1072  assert (variable_==iColumn);
    10941073  if (way_<0) {
    10951074  { double olb,oub ;
     
    11251104  Loads actual upper & lower bounds for the specified variable.
    11261105*/
    1127 CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost (CbcModel * model, int sequence,
     1106CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost (CbcModel * model,
    11281107                                    int iColumn, double breakEven)
    1129   : CbcSimpleInteger(model,sequence,iColumn,breakEven)
     1108  : CbcSimpleInteger(model,iColumn,breakEven)
    11301109{
    11311110  const double * cost = model->getObjCoefficients();
     
    11431122  Loads actual upper & lower bounds for the specified variable.
    11441123*/
    1145 CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost (CbcModel * model, int sequence,
     1124CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost (CbcModel * model,
    11461125                                    int iColumn, double downPseudoCost,
    11471126                                                        double upPseudoCost)
    1148   : CbcSimpleInteger(model,sequence,iColumn)
     1127  : CbcSimpleInteger(model,iColumn)
    11491128{
    11501129  downPseudoCost_ = CoinMax(1.0e-10,downPseudoCost);
     
    11531132  upDownSeparator_ = -1.0;
    11541133  method_=0;
     1134}
     1135// Useful constructor - passed and model index and pseudo costs
     1136CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost (CbcModel * model, int dummy,int iColumn,
     1137                                                        double downPseudoCost, double upPseudoCost)
     1138{
     1139  CbcSimpleIntegerPseudoCost(model,iColumn,downPseudoCost,upPseudoCost);
    11551140}
    11561141
     
    12191204  }
    12201205  CbcIntegerPseudoCostBranchingObject * newObject =
    1221     new CbcIntegerPseudoCostBranchingObject(model_,sequence_,way,
     1206    new CbcIntegerPseudoCostBranchingObject(model_,columnNumber_,way,
    12221207                                            value);
    12231208  double up =  upPseudoCost_*(ceil(value)-value);
     
    14021387*/
    14031388double
    1404 CbcIntegerPseudoCostBranchingObject::branch(bool normalBranch)
    1405 {
    1406   CbcIntegerBranchingObject::branch(normalBranch);
     1389CbcIntegerPseudoCostBranchingObject::branch()
     1390{
     1391  CbcIntegerBranchingObject::branch();
    14071392  return changeInGuessed_;
    14081393}
     
    14861471}
    14871472double
    1488 CbcCliqueBranchingObject::branch(bool normalBranch)
    1489 {
    1490   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    1491     print(normalBranch);
    1492   numberBranchesLeft_--;
     1473CbcCliqueBranchingObject::branch()
     1474{
     1475  decrementNumberBranchesLeft();
    14931476  int iWord;
    14941477  int numberMembers = clique_->numberMembers();
     
    15491532// Print what would happen 
    15501533void
    1551 CbcCliqueBranchingObject::print(bool normalBranch)
     1534CbcCliqueBranchingObject::print()
    15521535{
    15531536  int iWord;
     
    16801663}
    16811664double
    1682 CbcLongCliqueBranchingObject::branch(bool normalBranch)
    1683 {
    1684   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    1685     print(normalBranch);
    1686   numberBranchesLeft_--;
     1665CbcLongCliqueBranchingObject::branch()
     1666{
     1667  decrementNumberBranchesLeft();
    16871668  int iWord;
    16881669  int numberMembers = clique_->numberMembers();
     
    17421723}
    17431724void
    1744 CbcLongCliqueBranchingObject::print(bool normalBranch)
     1725CbcLongCliqueBranchingObject::print()
    17451726{
    17461727  int iWord;
     
    18261807}
    18271808double
    1828 CbcSOSBranchingObject::branch(bool normalBranch)
    1829 {
    1830   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    1831     print(normalBranch);
    1832   numberBranchesLeft_--;
     1809CbcSOSBranchingObject::branch()
     1810{
     1811  decrementNumberBranchesLeft();
    18331812  int numberMembers = set_->numberMembers();
    18341813  const int * which = set_->members();
     
    18631842// Print what would happen 
    18641843void
    1865 CbcSOSBranchingObject::print(bool normalBranch)
     1844CbcSOSBranchingObject::print()
    18661845{
    18671846  int numberMembers = set_->numberMembers();
     
    19271906  bestNumberUp_ = 0;
    19281907  bestChangeDown_ = 0.0;
     1908  bestObject_ = NULL;
    19291909  bestNumberDown_ = 0;
    1930   bestObject_ = NULL;
    19311910}
    19321911
     
    19341913CbcBranchDefaultDecision::CbcBranchDefaultDecision (
    19351914                                    const CbcBranchDefaultDecision & rhs)
    1936   :CbcBranchDecision()
     1915  :CbcBranchDecision(rhs)
    19371916{
    19381917  bestCriterion_ = rhs.bestCriterion_;
     
    19421921  bestNumberDown_ = rhs.bestNumberDown_;
    19431922  bestObject_ = rhs.bestObject_;
     1923  model_ = rhs.model_;
    19441924}
    19451925
     
    19651945  bestNumberDown_ = 0;
    19661946  bestObject_ = NULL;
     1947  model_ = model;
    19671948}
    19681949
     
    19811962                            double changeDn, int numInfDn)
    19821963{
    1983   bool beforeSolution = thisOne->model()->getSolutionCount()==
    1984     thisOne->model()->getNumberHeuristicSolutions();;
     1964  bool beforeSolution = cbcModel()->getSolutionCount()==
     1965    cbcModel()->getNumberHeuristicSolutions();;
    19851966  int betterWay=0;
    19861967  if (beforeSolution) {
     
    20782059  int whichObject = -1;
    20792060  if (numberObjects) {
    2080     CbcModel * model = objects[0]->model();
     2061    CbcModel * model = cbcModel();
    20812062    // at continuous
    20822063    //double continuousObjective = model->getContinuousObjective();
     
    27262707}
    27272708double
    2728 CbcFixingBranchingObject::branch(bool normalBranch)
    2729 {
    2730   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    2731     print(normalBranch);
    2732   numberBranchesLeft_--;
     2709CbcFixingBranchingObject::branch()
     2710{
     2711  decrementNumberBranchesLeft();
    27332712  OsiSolverInterface * solver = model_->solver();
    27342713  const double * columnLower = solver->getColLower();
     
    27682747}
    27692748void
    2770 CbcFixingBranchingObject::print(bool normalBranch)
     2749CbcFixingBranchingObject::print()
    27712750{
    27722751  int i;
     
    30192998    value = CoinMin(value, upper[iColumn]);
    30202999    if (upper[iColumn]>lower[iColumn]) {
    3021       double distance = CoinMin(value-lower[iColumn],upper[iColumn]-value);
     3000      double distance = upper[iColumn]-value;
    30223001      list[numberFree]=j;
    30233002      sort[numberFree++]=distance;
     
    30523031  :CbcBranchingObject(model,nway->id(),-1,0.5)
    30533032{
     3033  numberBranches_ = number;
    30543034  order_ = new int [number];
    30553035  object_=nway;
    30563036  numberInSet_=number;
    30573037  memcpy(order_,order,number*sizeof(int));
    3058   numberBranchesLeft_=number;
    30593038}
    30603039
     
    31033082}
    31043083double
    3105 CbcNWayBranchingObject::branch(bool normalBranch)
    3106 {
    3107   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    3108     print(normalBranch);
    3109   numberBranchesLeft_--;
    3110   assert (numberBranchesLeft_>=0);
    3111   int which = numberBranchesLeft_;
    3112   if (numberBranchesLeft_==numberInSet_) {
     3084CbcNWayBranchingObject::branch()
     3085{
     3086  int which = branchIndex_;
     3087  branchIndex_++;
     3088  assert (numberBranchesLeft()>=0);
     3089  if (which==0) {
    31133090    // first branch so way_ may mean something
    31143091    assert (way_==-1||way_==1);
    3115     if (way_==1)
    3116       which--;
    3117   } else if (numberBranchesLeft_+1==numberInSet_) {
     3092    if (way_==-1)
     3093      which++;
     3094  } else if (which==1) {
    31183095    // second branch so way_ may mean something
    31193096    assert (way_==-1||way_==1);
    31203097    if (way_==-1)
    3121       which++;
     3098      which--;
    31223099    // switch way off
    31233100    way_=0;
     
    31293106    int iSequence = order_[j];
    31303107    int iColumn = members[iSequence];
    3131     if (j!=numberBranchesLeft_) {
     3108    if (j!=which) {
    31323109      model_->solver()->setColUpper(iColumn,lower[iColumn]);
    31333110      //model_->solver()->setColLower(iColumn,lower[iColumn]);
     
    31493126}
    31503127void
    3151 CbcNWayBranchingObject::print(bool normalBranch)
     3128CbcNWayBranchingObject::print()
    31523129{
    31533130  printf("NWay - Up Fix ");
     
    33253302  }
    33263303}
     3304
     3305// Default Constructor
     3306CbcDummyBranchingObject::CbcDummyBranchingObject(CbcModel * model)
     3307  :CbcBranchingObject(model,0,0,0.5)
     3308{
     3309  setNumberBranchesLeft(1);
     3310}
     3311
     3312
     3313// Copy constructor
     3314CbcDummyBranchingObject::CbcDummyBranchingObject ( const CbcDummyBranchingObject & rhs) :CbcBranchingObject(rhs)
     3315{
     3316}
     3317
     3318// Assignment operator
     3319CbcDummyBranchingObject &
     3320CbcDummyBranchingObject::operator=( const CbcDummyBranchingObject& rhs)
     3321{
     3322  if (this != &rhs) {
     3323    CbcBranchingObject::operator=(rhs);
     3324  }
     3325  return *this;
     3326}
     3327CbcBranchingObject *
     3328CbcDummyBranchingObject::clone() const
     3329{
     3330  return (new CbcDummyBranchingObject(*this));
     3331}
     3332
     3333
     3334// Destructor
     3335CbcDummyBranchingObject::~CbcDummyBranchingObject ()
     3336{
     3337}
     3338
     3339/*
     3340  Perform a dummy branch
     3341*/
     3342double
     3343CbcDummyBranchingObject::branch()
     3344{
     3345  decrementNumberBranchesLeft();
     3346  return 0.0;
     3347}
     3348// Print what would happen 
     3349void
     3350CbcDummyBranchingObject::print()
     3351{
     3352  printf("Dummy branch\n");
     3353}
  • trunk/Cbc/src/CbcBranchActual.hpp

    r295 r640  
    138138  virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns);
    139139 
     140  /// Construct an OsiSOS object
     141  OsiSOS * osiObject(const OsiSolverInterface * solver) const;
    140142  /// Number of members
    141143  inline int numberMembers() const
     
    154156  { return weights_;};
    155157
     158  /** \brief Return true if object can take part in normal heuristics
     159  */
     160  virtual bool canDoHeuristics() const
     161  {return (sosType_==1&&integerValued_);};
     162  /// Set whether set is integer valued or not
     163  inline void setIntegerValued(bool yesNo)
     164  { integerValued_=yesNo;};
    156165private:
    157166  /// data
     
    166175  /// SOS type
    167176   int sosType_;
     177  /// Whether integer valued
     178  bool integerValued_;
    168179};
    169180
     
    178189  CbcSimpleInteger ();
    179190
    180   // Useful constructor - passed integer index and model index
    181   CbcSimpleInteger (CbcModel * model, int sequence, int iColumn, double breakEven=0.5);
     191  // Useful constructor - passed model and index
     192  CbcSimpleInteger (CbcModel * model,  int iColumn, double breakEven=0.5);
     193 
     194  // Useful constructor - passed model and Osi object
     195  CbcSimpleInteger (CbcModel * model,  const OsiSimpleInteger * object);
    182196 
    183197  // Copy constructor
     
    192206  // Destructor
    193207  ~CbcSimpleInteger ();
    194  
     208  /// Construct an OsiSimpleInteger object
     209  OsiSimpleInteger * osiObject() const;
     210  /// Infeasibility - large is 0.5
     211  virtual double infeasibility(const OsiSolverInterface * solver,
     212                               const OsiBranchingInformation * info, int & preferredWay) const;
     213
     214  /** Set bounds to fix the variable at the current (integer) value.
     215
     216    Given an integer value, set the lower and upper bounds to fix the
     217    variable. Returns amount it had to move variable.
     218  */
     219  virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
     220
     221  /** Create a branching object and indicate which way to branch first.
     222     
     223      The branching object has to know how to create branches (fix
     224      variables, etc.)
     225  */
     226  virtual CbcBranchingObject * createBranch(OsiSolverInterface * solver,
     227                                            const OsiBranchingInformation * info, int way) ;
     228  /** Create an OsiSolverBranch object
     229
     230      This returns NULL if branch not represented by bound changes
     231  */
     232  virtual OsiSolverBranch * solverBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
    195233  /// Infeasibility - large is 0.5
    196234  virtual double infeasibility(int & preferredWay) const;
     
    209247  */
    210248  virtual CbcBranchingObject * createBranch(int way) ;
    211 
    212   /** Create an OsiSolverBranch object
    213 
    214       This returns NULL if branch not represented by bound changes
    215   */
    216   virtual OsiSolverBranch * solverBranch() const;
    217   /// Redoes data when sequence numbers change
    218   virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns);
    219  
    220   /** \brief Given a valid solution (with reduced costs, etc.),
    221       return a branching object which would give a new feasible
    222       point in the good direction.
    223 
    224     The preferred branching object will force the variable to be either the
    225     floor or ceiling of its current value, depending on the reduced cost and
    226     objective sense. If movement in the direction which improves the
    227     objective is impossible due to bounds on the variable, the branching
    228     object will move in the other direction.  If no movement is possible, the
    229     method returns NULL.
    230 
    231     Only the bounds on this variable are considered when determining if the new
    232     point is feasible.
    233   */
    234   virtual CbcBranchingObject * preferredNewFeasible() const;
    235  
    236   /** \brief Given a valid solution (with reduced costs, etc.),
    237       return a branching object which would give a new feasible
    238       point in a bad direction.
    239 
    240     As for preferredNewFeasible(), but the preferred branching object will
    241     force movement in a direction that degrades the objective.
    242   */
    243   virtual CbcBranchingObject * notPreferredNewFeasible() const ;
    244  
    245   /** Reset original upper and lower bound values from the solver.
    246  
    247     Handy for updating bounds held in this object after bounds held in the
    248     solver have been tightened.
    249    */
    250   virtual void resetBounds();
    251  
    252   /// Sequence number
    253   inline int sequence() const
    254   {return sequence_;};
    255 
    256   /// Model column number
    257   inline int modelSequence() const
    258   {return columnNumber_;};
    259   /// Set model column number
    260   inline void setColumnNumber(int value)
    261   {columnNumber_=value;};
    262  
    263249  /** Column number if single column object -1 otherwise,
    264250      so returns >= 0
     
    266252  */
    267253  virtual int columnNumber() const;
    268 
     254  /// Set column number
     255  inline void setColumnNumber(int value)
     256  { columnNumber_ = value;};
     257
     258  /** Reset variable bounds to their original values.
     259 
     260    Bounds may be tightened, so it may be good to be able to set this info in object.
     261   */
     262  virtual void resetBounds(const OsiSolverInterface * solver) ;
     263  /**  Change column numbers after preprocessing
     264   */
     265  virtual void resetSequenceEtc(int numberColumns, const int * originalColumns) ;
    269266  /// Original bounds
    270267  inline double originalLowerBound() const
     
    287284  /// data
    288285
    289   /// Sequence
    290   int sequence_;
    291   /// Column number in model
    292   int columnNumber_;
    293286  /// Original lower bound
    294287  double originalLower_;
     
    297290  /// Breakeven i.e. >= this preferred is up
    298291  double breakEven_;
    299 };
    300 
     292  /// Column number in model
     293  int columnNumber_;
     294  /// If -1 down always chosen first, +1 up always, 0 normal
     295  int preferredWay_;
     296};
    301297/** Define an n-way class for variables.
    302298    Only valid value is one at UB others at LB
     
    416412             Returns change in guessed objective on next branch
    417413  */
    418   virtual double branch(bool normalBranch=false);
     414  virtual double branch();
    419415
    420416  /** \brief Print something about branch - only if log level high
    421417  */
    422   virtual void print(bool normalBranch);
     418  virtual void print();
    423419
    424420protected:
     
    440436  CbcSimpleIntegerPseudoCost ();
    441437
    442   // Useful constructor - passed integer index and model index
    443   CbcSimpleIntegerPseudoCost (CbcModel * model, int sequence, int iColumn, double breakEven=0.5);
    444  
    445   // Useful constructor - passed integer index and model index and pseudo costs
    446   CbcSimpleIntegerPseudoCost (CbcModel * model, int sequence, int iColumn,
     438  // Useful constructor - passed model index
     439  CbcSimpleIntegerPseudoCost (CbcModel * model, int iColumn, double breakEven=0.5);
     440 
     441  // Useful constructor - passed and model index and pseudo costs
     442  CbcSimpleIntegerPseudoCost (CbcModel * model, int iColumn,
     443                              double downPseudoCost, double upPseudoCost);
     444  // Useful constructor - passed and model index and pseudo costs
     445  CbcSimpleIntegerPseudoCost (CbcModel * model, int dummy,int iColumn,
    447446                              double downPseudoCost, double upPseudoCost);
    448447 
     
    573572             This version also changes guessed objective value
    574573  */
    575   virtual double branch(bool normalBranch=false);
     574  virtual double branch();
    576575
    577576  /// Change in guessed
     
    621620 
    622621  /// Does next branch and updates state
    623   virtual double branch(bool normalBranch=false);
     622  virtual double branch();
    624623
    625624  /** \brief Print something about branch - only if log level high
    626625  */
    627   virtual void print(bool normalBranch);
     626  virtual void print();
    628627private:
    629628  /// data
     
    666665 
    667666  /// Does next branch and updates state
    668   virtual double branch(bool normalBranch=false);
     667  virtual double branch();
    669668
    670669  /** \brief Print something about branch - only if log level high
    671670  */
    672   virtual void print(bool normalBranch);
     671  virtual void print();
    673672private:
    674673  /// data
     
    710709 
    711710  /// Does next branch and updates state
    712   virtual double branch(bool normalBranch=false);
     711  virtual double branch();
    713712
    714713  /** \brief Print something about branch - only if log level high
    715714  */
    716   virtual void print(bool normalBranch);
     715  virtual void print();
    717716private:
    718717  /// data
     
    752751 
    753752  /// Does next branch and updates state
    754   virtual double branch(bool normalBranch=false);
     753  virtual double branch();
    755754
    756755  /** \brief Print something about branch - only if log level high
    757756  */
    758   virtual void print(bool normalBranch);
     757  virtual void print();
    759758  /** The number of branch arms created for this branching object
    760759  */
     
    852851  double bestChangeDown_;
    853852
     853  /// Pointer to best branching object
     854  CbcBranchingObject * bestObject_;
     855
    854856  /// Number of infeasibilities for down
    855857  int bestNumberDown_;
    856 
    857   /// Pointer to best branching object
    858   CbcBranchingObject * bestObject_;
    859858
    860859};
     
    942941 
    943942  /// Does next branch and updates state
    944   virtual double branch(bool normalBranch=false);
     943  virtual double branch();
    945944
    946945  /** \brief Print something about branch - only if log level high
    947946  */
    948   virtual void print(bool normalBranch);
     947  virtual void print();
    949948private:
    950949  /// data
     
    10111010  int * variable_;
    10121011};
     1012/** Dummy branching object
     1013
     1014  This object specifies a one-way dummy branch.
     1015  This is so one can carry on branching even when it looks feasible
     1016*/
     1017
     1018class CbcDummyBranchingObject : public CbcBranchingObject {
     1019
     1020public:
     1021
     1022  /// Default constructor
     1023  CbcDummyBranchingObject (CbcModel * model=NULL);
     1024
     1025  /// Copy constructor
     1026  CbcDummyBranchingObject ( const CbcDummyBranchingObject &);
     1027   
     1028  /// Assignment operator
     1029  CbcDummyBranchingObject & operator= (const CbcDummyBranchingObject& rhs);
     1030
     1031  /// Clone
     1032  virtual CbcBranchingObject * clone() const;
     1033
     1034  /// Destructor
     1035  virtual ~CbcDummyBranchingObject ();
     1036 
     1037  /** \brief Dummy branch
     1038  */
     1039  virtual double branch();
     1040
     1041  /** \brief Print something about branch - only if log level high
     1042  */
     1043  virtual void print();
     1044
     1045};
     1046
    10131047
    10141048#endif
  • trunk/Cbc/src/CbcBranchBase.cpp

    r310 r640  
    1111#include "OsiSolverInterface.hpp"
    1212#include "OsiSolverBranch.hpp"
     13#include "OsiChooseVariable.hpp"
    1314#include "CbcModel.hpp"
    1415#include "CbcMessage.hpp"
     
    1819// Default Constructor
    1920CbcObject::CbcObject()
    20   :model_(NULL),
     21  : OsiObject(),
     22    model_(NULL),
    2123   id_(-1),
    22    priority_(1000),
    2324   preferredWay_(0)
    2425{
     
    2728// Constructor from model
    2829CbcObject::CbcObject(CbcModel * model)
    29 :
    30   model_(model),
    31   id_(-1),
    32   priority_(1000),
    33   preferredWay_(0)
     30  : OsiObject(),
     31    model_(model),
     32    id_(-1),
     33    preferredWay_(0)
    3434{
    3535}
     
    4343// Copy constructor
    4444CbcObject::CbcObject ( const CbcObject & rhs)
     45  : OsiObject(rhs)
    4546{
    4647  model_ = rhs.model_;
    4748  id_ = rhs.id_;
    48   priority_ = rhs.priority_;
    4949  preferredWay_ = rhs.preferredWay_;
    5050}
     
    5555{
    5656  if (this!=&rhs) {
     57    OsiObject::operator=(rhs);
    5758    model_ = rhs.model_;
    5859    id_ = rhs.id_;
    59     priority_ = rhs.priority_;
    6060    preferredWay_ = rhs.preferredWay_;
    6161  }
     
    7676  ceilingValue = floorValue+1.0;
    7777}
    78 // Return "up" estimate (default 1.0e-5)
     78/* Infeasibility of the object
     79     
     80    This is some measure of the infeasibility of the object. 0.0
     81    indicates that the object is satisfied.
     82 
     83    The preferred branching direction is returned in way,
     84 
     85    This is used to prepare for strong branching but should also think of
     86    case when no strong branching
     87 
     88    The object may also compute an estimate of cost of going "up" or "down".
     89    This will probably be based on pseudo-cost ideas
     90
     91    This should also set mutable infeasibility_ and whichWay_
     92    This is for instant re-use for speed
     93*/
    7994double
    80 CbcObject::upEstimate() const
    81 {
    82   return 1.0e-5;
    83 }
    84 // Return "down" estimate (default 1.0e-5)
     95CbcObject::infeasibility(const OsiSolverInterface * solver,int &preferredWay) const
     96{
     97  assert (solver==model_->solver());
     98  return infeasibility(preferredWay);
     99}
     100 
     101/* For the variable(s) referenced by the object,
     102      look at the current solution and set bounds to match the solution.
     103      Returns measure of how much it had to move solution to make feasible
     104*/
    85105double
    86 CbcObject::downEstimate() const
    87 {
    88   return 1.0e-5;
    89 }
    90 // Column number if single column object -1 otherwise
    91 int
    92 CbcObject::columnNumber() const
    93 {
    94   // Say not as at present only used by heuristics
    95   return -1;
     106CbcObject::feasibleRegion(OsiSolverInterface * solver) const
     107{
     108  assert (solver==model_->solver());
     109  CbcObject * fudge = const_cast<CbcObject *>(this);
     110  fudge->feasibleRegion();
     111  return 0.0;
     112}
     113/* Infeasibility of the object
     114     
     115    This is some measure of the infeasibility of the object. 0.0
     116    indicates that the object is satisfied.
     117 
     118    The preferred branching direction is returned in way,
     119 
     120    This is used to prepare for strong branching but should also think of
     121    case when no strong branching
     122 
     123    The object may also compute an estimate of cost of going "up" or "down".
     124    This will probably be based on pseudo-cost ideas
     125
     126    This should also set mutable infeasibility_ and whichWay_
     127    This is for instant re-use for speed
     128*/
     129double
     130CbcObject::infeasibility(const OsiBranchingInformation * info,
     131                         int &preferredWay) const
     132{
     133  return infeasibility(preferredWay);
     134}
     135 
     136/* For the variable(s) referenced by the object,
     137      look at the current solution and set bounds to match the solution.
     138      Returns measure of how much it had to move solution to make feasible
     139*/
     140double
     141CbcObject::feasibleRegion(OsiSolverInterface * solver,const OsiBranchingInformation * info) const
     142{
     143  assert (solver==model_->solver());
     144  CbcObject * fudge = const_cast<CbcObject *>(this);
     145  fudge->feasibleRegion();
     146  return 0.0;
     147}
     148 
     149/* Create a branching object and indicate which way to branch first.
     150     
     151      The branching object has to know how to create branches (fix
     152      variables, etc.)
     153*/
     154OsiBranchingObject *
     155CbcObject::createBranch(OsiSolverInterface * solver, int way) const
     156{
     157  assert (solver==model_->solver());
     158  CbcObject * fudge = const_cast<CbcObject *>(this);
     159  return fudge->createBranch(way);
     160}
     161/* Create a branching object and indicate which way to branch first.
     162     
     163      The branching object has to know how to create branches (fix
     164      variables, etc.)
     165*/
     166OsiBranchingObject *
     167CbcObject::createBranch(OsiSolverInterface * solver,const OsiBranchingInformation * info, int way) const
     168{
     169  assert (solver==model_->solver());
     170  CbcObject * fudge = const_cast<CbcObject *>(this);
     171  return fudge->createBranch(way);
    96172}
    97173/* Create an OsiSolverBranch object
     
    107183// Default Constructor
    108184CbcBranchingObject::CbcBranchingObject()
     185  : OsiBranchingObject()
    109186{
    110187  model_=NULL;
    111   originalObject_=NULL;
     188  originalCbcObject_=NULL;
    112189  variable_=-1;
    113190  way_=0;
    114   value_=0.0;
    115   numberBranchesLeft_=2;
    116191}
    117192
    118193// Useful constructor
    119194CbcBranchingObject::CbcBranchingObject (CbcModel * model, int variable, int way , double value)
     195  : OsiBranchingObject(model->solver(),value)
    120196{
    121197  model_= model;
    122   originalObject_=NULL;
     198  originalCbcObject_=NULL;
    123199  variable_=variable;
    124200  way_=way;
    125   value_=value;
    126   numberBranchesLeft_=2;
    127201}
    128202
    129203// Copy constructor
    130204CbcBranchingObject::CbcBranchingObject ( const CbcBranchingObject & rhs)
     205  : OsiBranchingObject(rhs)
    131206{
    132207  model_=rhs.model_;
    133   originalObject_=rhs.originalObject_;
     208  originalCbcObject_=rhs.originalCbcObject_;
    134209  variable_=rhs.variable_;
    135210  way_=rhs.way_;
    136211  value_=rhs.value_;
    137   numberBranchesLeft_=rhs.numberBranchesLeft_;
    138212}
    139213
     
    143217{
    144218  if (this != &rhs) {
     219    OsiBranchingObject::operator=(rhs);
    145220    model_=rhs.model_;
    146     originalObject_=rhs.originalObject_;
     221    originalCbcObject_=rhs.originalCbcObject_;
    147222    variable_=rhs.variable_;
    148223    way_=rhs.way_;
    149     value_=rhs.value_;
    150     numberBranchesLeft_=rhs.numberBranchesLeft_;
    151224  }
    152225  return *this;
     
    159232// Default Constructor
    160233CbcBranchDecision::CbcBranchDecision ()
    161   : object_(NULL)
    162 {
     234  : object_(NULL),model_(NULL),chooseMethod_(NULL)
     235{
     236}
     237
     238// Copy Constructor
     239CbcBranchDecision::CbcBranchDecision (const CbcBranchDecision &rhs)
     240  : object_(NULL),model_(rhs.model_),chooseMethod_(NULL)
     241{
     242  if (rhs.chooseMethod_)
     243    chooseMethod_ = rhs.chooseMethod_->clone();
    163244}
    164245
     
    166247{
    167248  delete object_;
     249  delete chooseMethod_;
    168250}
    169251/* Compare N branching objects. Return index of best
     
    205287  return whichObject;
    206288}
    207 
     289// Set (clone) chooseMethod
     290void
     291CbcBranchDecision::setChooseMethod(const OsiChooseVariable & method)
     292{
     293  delete chooseMethod_;
     294  chooseMethod_ = method.clone();
     295}
    208296// Default constructor
    209297CbcConsequence::CbcConsequence()
  • trunk/Cbc/src/CbcBranchBase.hpp

    r356 r640  
    66#include <string>
    77#include <vector>
    8 
     8#include "OsiBranchingObject.hpp"
    99class OsiSolverInterface;
    1010class OsiSolverBranch;
     
    1414class CbcNodeInfo;
    1515class CbcBranchingObject;
     16class OsiChooseVariable;
    1617
    1718//#############################################################################
    1819
    1920/** Abstract base class for `objects'.
     21    It now just has stuff that OsiObject does not have
    2022
    2123  The branching model used in Cbc is based on the idea of an <i>object</i>.
     
    5860  } CbcStrongInfo;
    5961
    60 class CbcObject {
     62class CbcObject : public OsiObject {
    6163
    6264public:
     
    9597  */
    9698  virtual double infeasibility(int &preferredWay) const = 0;
     99  /// Dummy one for compatibility
     100  virtual double infeasibility(const OsiBranchingInformation * info,
     101                               int &preferredWay) const;
    97102
    98103  /** For the variable(s) referenced by the object,
     
    100105  */
    101106  virtual void feasibleRegion() = 0;
     107  /// Dummy one for compatibility
     108  virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
    102109
    103110  /** Create a branching object and indicate which way to branch first.
     
    108115  virtual CbcBranchingObject * createBranch(int way) = 0;
    109116 
     117  /** Infeasibility of the object
     118     
     119    This is some measure of the infeasibility of the object. 0.0
     120    indicates that the object is satisfied.
     121 
     122    The preferred branching direction is returned in way,
     123 
     124    This is used to prepare for strong branching but should also think of
     125    case when no strong branching
     126 
     127    The object may also compute an estimate of cost of going "up" or "down".
     128    This will probably be based on pseudo-cost ideas
     129
     130    This should also set mutable infeasibility_ and whichWay_
     131    This is for instant re-use for speed
     132  */
     133  virtual double infeasibility(const OsiSolverInterface * solver,int &preferredWay) const;
     134 
     135  /** For the variable(s) referenced by the object,
     136      look at the current solution and set bounds to match the solution.
     137      Returns measure of how much it had to move solution to make feasible
     138  */
     139  virtual double feasibleRegion(OsiSolverInterface * solver) const ;
     140 
     141  /** Create a branching object and indicate which way to branch first.
     142     
     143      The branching object has to know how to create branches (fix
     144      variables, etc.)
     145  */
     146  virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, int way) const;
     147  /** Create a branching object and indicate which way to branch first.
     148     
     149      The branching object has to know how to create branches (fix
     150      variables, etc.)
     151  */
     152  virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver,const OsiBranchingInformation * info, int way) const;
    110153  /** Create an OsiSolverBranch object
    111154
     
    138181  /** Reset variable bounds to their original values.
    139182 
    140     Bounds may be tightened, so it may be good to be able to reset them to
    141     their original values.
     183    Bounds may be tightened, so it may be good to be able to set this info in object.
    142184   */
    143   virtual void resetBounds() {};
    144  
    145   /** \brief Return true if branch created by object should fix variables
    146   */
    147   virtual bool boundBranch() const
    148   {return true;};
     185  virtual void resetBounds(const OsiSolverInterface * solver) {};
     186 
    149187  /** Returns floor and ceiling i.e. closest valid points
    150188  */
     
    155193  inline int id() const
    156194  { return id_;};
    157   /// Return Priority
    158   inline int priority() const
    159   { return priority_;};
    160   /// Set priority
    161   inline void setPriority(int priority)
    162   { priority_ = priority;};
    163  
    164   /// Column number if single column object -1 otherwise
    165   virtual int columnNumber() const;
    166 
    167195 
    168196   /// update model
     
    174202  {return  model_;};
    175203
    176   /// Return "up" estimate (default 1.0e-5)
    177   virtual double upEstimate() const;
    178   /// Return "down" estimate (default 1.0e-5)
    179   virtual double downEstimate() const;
    180204  /// If -1 down always chosen first, +1 up always, 0 normal
    181205  inline int preferredWay() const
     
    194218  /// Identifier (normally column number in matrix)
    195219  int id_;
    196   /// Priority
    197   int priority_;
    198220  /// If -1 down always chosen first, +1 up always, 0 normal
    199221  int preferredWay_;
     
    202224
    203225/** \brief Abstract branching object base class
     226    Now just difference with OsiBranchingObject
    204227
    205228  In the abstract, an CbcBranchingObject contains instructions for how to
     
    218241*/
    219242
    220 class CbcBranchingObject {
     243class CbcBranchingObject : public OsiBranchingObject {
    221244
    222245public:
     
    245268      Returns nonzero if skip is wanted */
    246269  virtual int fillStrongInfo( CbcStrongInfo & info) {return 0;};
    247   /** The number of branch arms created for this branching object
    248 
    249     \todo The hardwired `2' has to be changed before cbc can do branches with
    250           more than two arms.
    251   */
    252   virtual int numberBranches() const
    253   {return 2;};
    254 
    255   /// The number of branch arms left to be evaluated
    256   virtual int numberBranchesLeft() const
    257   {return numberBranchesLeft_;};
    258270  /// Reset number of branches left to original
    259271  inline void resetNumberBranchesLeft()
    260   { numberBranchesLeft_ = numberBranches();};
     272  { branchIndex_=0;};
    261273
    262274  /** \brief Execute the actions required to branch, as specified by the
     
    266278             Returns change in guessed objective on next branch
    267279  */
    268   virtual double branch(bool normalBranch=false)=0;
     280  virtual double branch()=0;
     281  /** \brief Execute the actions required to branch, as specified by the
     282             current state of the branching object, and advance the object's
     283             state.  Mainly for diagnostics, whether it is true branch or
     284             strong branching is also passed.
     285             Returns change in guessed objective on next branch
     286  */
     287  virtual double branch(OsiSolverInterface * solver)
     288  { return branch();};
    269289
    270290  /** \brief Print something about branch - only if log level high
    271291  */
    272   virtual void print(bool normalBranch) {};
    273 
    274   /** \brief Return true if branch should fix variables
    275   */
    276   virtual bool boundBranch() const
    277   {return true;};
     292  virtual void print() const {};
    278293
    279294  /** \brief Index identifying the associated CbcObject within its class.
     
    308323  {way_=way;};
    309324
    310   /// Current value
    311   inline double value() const
    312   {return value_;};
    313  
    314325  /// Return model
    315326  inline CbcModel * model() const
     
    318329  /// Return pointer back to object which created
    319330  inline CbcObject * object() const
    320   {return  originalObject_;};
     331  {return  originalCbcObject_;};
    321332  /// Set pointer back to object which created
    322333  inline void setOriginalObject(CbcObject * object)
    323   {originalObject_=object;};
     334  {originalCbcObject_=object;};
    324335
    325336protected:
     
    328339  CbcModel * model_;
    329340  /// Pointer back to object which created
    330   CbcObject * originalObject_;
     341  CbcObject * originalCbcObject_;
    331342
    332343  /// Branching variable (0 is first integer)
     
    342353  int way_;
    343354
    344   /// Current value
    345   double value_;
    346 
    347   /** Number of arms remaining to be evaluated
    348 
    349     \todo Compare with CbcNodeInfo::numberBranchesLeft_, and check for
    350           redundancy.
    351   */
    352   int numberBranchesLeft_;
    353 
    354355};
    355356
     
    373374  CbcBranchDecision ();
    374375
     376  // Copy constructor
     377  CbcBranchDecision ( const CbcBranchDecision &);
     378   
    375379  /// Destructor
    376380  virtual ~CbcBranchDecision();
     
    415419  /** Saves a clone of current branching object.  Can be used to update
    416420      information on object causing branch - after branch */
    417   virtual void saveBranchingObject(CbcBranchingObject * object) {};
     421  virtual void saveBranchingObject(OsiBranchingObject * object) {};
    418422  /** Pass in information on branch just done.
    419423      assumes object can get information from solver */
     
    425429  /// Create C++ lines to get to current state
    426430  virtual void generateCpp( FILE * fp) {};
     431  /// Model
     432  inline CbcModel * cbcModel() const
     433  { return model_;}
     434  /* If chooseMethod_ id non-null then the rest is fairly pointless
     435     as choosemethod_ will be doing all work
     436  */
     437  OsiChooseVariable * chooseMethod() const
     438  { return chooseMethod_;};
     439  /// Set (clone) chooseMethod
     440  void setChooseMethod(const OsiChooseVariable & method);
    427441
    428442protected:
     
    430444  // Clone of branching object
    431445  CbcBranchingObject * object_;
     446  /// Pointer to model
     447  CbcModel * model_;
     448  /* If chooseMethod_ id non-null then the rest is fairly pointless
     449     as choosemethod_ will be doing all work
     450  */
     451  OsiChooseVariable * chooseMethod_;
    432452private:
    433453  /// Assignment is illegal
  • trunk/Cbc/src/CbcBranchCut.cpp

    r310 r640  
    186186*/
    187187double
    188 CbcCutBranchingObject::branch(bool normalBranch)
    189 {
    190   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    191     print(normalBranch);
    192   numberBranchesLeft_--;
     188CbcCutBranchingObject::branch()
     189{
     190  decrementNumberBranchesLeft();
    193191  OsiRowCut * cut;
    194192  if (way_<0) {
     
    252250// Print what would happen 
    253251void
    254 CbcCutBranchingObject::print(bool normalBranch)
     252CbcCutBranchingObject::print()
    255253{
    256254  OsiRowCut * cut;
  • trunk/Cbc/src/CbcBranchCut.hpp

    r216 r640  
    131131             Returns change in guessed objective on next branch
    132132  */
    133   virtual double branch(bool normalBranch=false);
     133  virtual double branch();
    134134
    135135  /** \brief Print something about branch - only if log level high
    136136  */
    137   virtual void print(bool normalBranch);
     137  virtual void print();
    138138
    139139  /** \brief Return true if branch should fix variables
  • trunk/Cbc/src/CbcBranchDynamic.cpp

    r310 r640  
    4444    numberTimesUpInfeasible_(0),
    4545    numberBeforeTrust_(0),
     46    numberTimesDownLocalFixed_(0),
     47    numberTimesUpLocalFixed_(0),
     48    numberTimesDownTotalFixed_(0.0),
     49    numberTimesUpTotalFixed_(0.0),
     50    numberTimesProbingTotal_(0),
    4651    method_(0)
    4752{
     
    5257  Loads dynamic upper & lower bounds for the specified variable.
    5358*/
    54 CbcSimpleIntegerDynamicPseudoCost::CbcSimpleIntegerDynamicPseudoCost (CbcModel * model, int sequence,
     59CbcSimpleIntegerDynamicPseudoCost::CbcSimpleIntegerDynamicPseudoCost (CbcModel * model,
    5560                                    int iColumn, double breakEven)
    56   : CbcSimpleInteger(model,sequence,iColumn,breakEven),
     61  : CbcSimpleInteger(model,iColumn,breakEven),
    5762    upDownSeparator_(-1.0),
    5863    sumDownCost_(0.0),
     
    7378    numberTimesUpInfeasible_(0),
    7479    numberBeforeTrust_(0),
     80    numberTimesDownLocalFixed_(0),
     81    numberTimesUpLocalFixed_(0),
     82    numberTimesDownTotalFixed_(0.0),
     83    numberTimesUpTotalFixed_(0.0),
     84    numberTimesProbingTotal_(0),
    7585    method_(0)
    7686{
     
    110120  Loads dynamic upper & lower bounds for the specified variable.
    111121*/
    112 CbcSimpleIntegerDynamicPseudoCost::CbcSimpleIntegerDynamicPseudoCost (CbcModel * model, int sequence,
     122CbcSimpleIntegerDynamicPseudoCost::CbcSimpleIntegerDynamicPseudoCost (CbcModel * model,
    113123                                    int iColumn, double downDynamicPseudoCost,
    114124                                                        double upDynamicPseudoCost)
    115   : CbcSimpleInteger(model,sequence,iColumn),
     125  : CbcSimpleInteger(model,iColumn),
    116126    upDownSeparator_(-1.0),
    117127    sumDownCost_(0.0),
     
    132142    numberTimesUpInfeasible_(0),
    133143    numberBeforeTrust_(0),
     144    numberTimesDownLocalFixed_(0),
     145    numberTimesUpLocalFixed_(0),
     146    numberTimesDownTotalFixed_(0.0),
     147    numberTimesUpTotalFixed_(0.0),
     148    numberTimesProbingTotal_(0),
    134149    method_(0)
    135150{
     
    161176#endif
    162177}
     178/** Useful constructor
     179
     180  Loads dynamic upper & lower bounds for the specified variable.
     181*/
     182CbcSimpleIntegerDynamicPseudoCost::CbcSimpleIntegerDynamicPseudoCost (CbcModel * model,
     183                                    int dummy, int iColumn, double downDynamicPseudoCost,
     184                                                        double upDynamicPseudoCost)
     185{
     186  CbcSimpleIntegerDynamicPseudoCost(model,iColumn,downDynamicPseudoCost,upDynamicPseudoCost);
     187}
    163188
    164189// Copy constructor
     
    185210   numberTimesUpInfeasible_(rhs.numberTimesUpInfeasible_),
    186211   numberBeforeTrust_(rhs.numberBeforeTrust_),
     212   numberTimesDownLocalFixed_(rhs.numberTimesDownLocalFixed_),
     213   numberTimesUpLocalFixed_(rhs.numberTimesUpLocalFixed_),
     214   numberTimesDownTotalFixed_(rhs.numberTimesDownTotalFixed_),
     215   numberTimesUpTotalFixed_(rhs.numberTimesUpTotalFixed_),
     216   numberTimesProbingTotal_(rhs.numberTimesProbingTotal_),
    187217   method_(rhs.method_)
    188218
     
    223253    numberTimesUpInfeasible_ = rhs.numberTimesUpInfeasible_;
    224254    numberBeforeTrust_ = rhs.numberBeforeTrust_;
     255    numberTimesDownLocalFixed_ = rhs.numberTimesDownLocalFixed_;
     256    numberTimesUpLocalFixed_ = rhs.numberTimesUpLocalFixed_;
     257    numberTimesDownTotalFixed_ = rhs.numberTimesDownTotalFixed_;
     258    numberTimesUpTotalFixed_ = rhs.numberTimesUpTotalFixed_;
     259    numberTimesProbingTotal_ = rhs.numberTimesProbingTotal_;
    225260    method_=rhs.method_;
    226261  }
     
    259294  }
    260295  CbcDynamicPseudoCostBranchingObject * newObject =
    261     new CbcDynamicPseudoCostBranchingObject(model_,sequence_,way,
     296    new CbcDynamicPseudoCostBranchingObject(model_,columnNumber_,way,
    262297                                            value,this);
    263298  double up =  upDynamicPseudoCost_*(ceil(value)-value);
     
    326361    below = above -1;
    327362  }
    328 #define INFEAS
    329 #ifdef INFEAS
     363#define INFEAS 1
     364#if INFEAS==1
    330365  double distanceToCutoff=0.0;
    331366  double objectiveValue = model_->getCurrentMinimizationObjValue();
     
    341376  sum = sumDownCost_;
    342377  number = numberTimesDown_;
    343 #ifdef INFEAS
     378#if INFEAS==1
    344379  sum += numberTimesDownInfeasible_*(distanceToCutoff/(downCost+1.0e-12));
     380  number += numberTimesDownInfeasible_;
    345381#endif
    346382  if (number>0)
     
    351387  sum = sumUpCost_;
    352388  number = numberTimesUp_;
    353 #ifdef INFEAS
     389#if INFEAS==1
    354390  sum += numberTimesUpInfeasible_*(distanceToCutoff/(upCost+1.0e-12));
     391  number += numberTimesUpInfeasible_;
    355392#endif
    356393  if (number>0)
     
    399436    //returnValue = 2.0*returnValue + 0.1;
    400437    //}
     438    if (method_==1) {
     439      // probing
     440      // average
     441      double up=1.0e-15;
     442      double down=1.0e-15;
     443      if (numberTimesProbingTotal_) {
     444        up += numberTimesUpTotalFixed_/((double) numberTimesProbingTotal_);
     445        down += numberTimesDownTotalFixed_/((double) numberTimesProbingTotal_);
     446      }
     447      returnValue = 1 + 10.0*CoinMin(numberTimesDownLocalFixed_,numberTimesUpLocalFixed_) +
     448        CoinMin(down,up);
     449      returnValue *= 1.0e-3;
     450    }
    401451    return CoinMax(returnValue,1.0e-15);
    402452  }
     453}
     454
     455double
     456CbcSimpleIntegerDynamicPseudoCost::infeasibility(const OsiSolverInterface * solver, const OsiBranchingInformation * info,
     457                         int & preferredWay) const
     458{
     459  double value = info->solution_[columnNumber_];
     460  value = CoinMax(value, info->lower_[columnNumber_]);
     461  value = CoinMin(value, info->upper_[columnNumber_]);
     462  if (info->upper_[columnNumber_]==info->lower_[columnNumber_]) {
     463    // fixed
     464    preferredWay=1;
     465    return 0.0;
     466  }
     467  assert (breakEven_>0.0&&breakEven_<1.0);
     468  double nearest = floor(value+0.5);
     469  double integerTolerance = info->integerTolerance_;
     470  double below = floor(value+integerTolerance);
     471  double above = below+1.0;
     472  if (above>info->upper_[columnNumber_]) {
     473    above=below;
     474    below = above -1;
     475  }
     476#if INFEAS==1
     477  double objectiveValue = info->objectiveValue_;
     478  double distanceToCutoff =  info->cutoff_  - objectiveValue;
     479  if (distanceToCutoff<1.0e20)
     480    distanceToCutoff *= 10.0;
     481  else
     482    distanceToCutoff = 1.0e2 + fabs(objectiveValue);
     483#endif
     484  double sum;
     485  int number;
     486  double downCost = CoinMax(value-below,0.0);
     487  sum = sumDownCost_;
     488  number = numberTimesDown_;
     489#if INFEAS==1
     490  sum += numberTimesDownInfeasible_*(distanceToCutoff/(downCost+1.0e-12));
     491  number += numberTimesDownInfeasible_;
     492#endif
     493  if (number>0)
     494    downCost *= sum / (double) number;
     495  else
     496    downCost  *=  downDynamicPseudoCost_;
     497  double upCost = CoinMax((above-value),0.0);
     498  sum = sumUpCost_;
     499  number = numberTimesUp_;
     500#if INFEAS==1
     501  sum += numberTimesUpInfeasible_*(distanceToCutoff/(upCost+1.0e-12));
     502  number += numberTimesUpInfeasible_;
     503#endif
     504  if (number>0)
     505    upCost *= sum / (double) number;
     506  else
     507    upCost  *=  upDynamicPseudoCost_;
     508  if (downCost>=upCost)
     509    preferredWay=1;
     510  else
     511    preferredWay=-1;
     512  // See if up down choice set
     513  if (upDownSeparator_>0.0) {
     514    preferredWay = (value-below>=upDownSeparator_) ? 1 : -1;
     515  }
     516  if (preferredWay_)
     517    preferredWay=preferredWay_;
     518  // weight at 1.0 is max min
     519#define WEIGHT_BEFORE 0.3
     520  if (fabs(value-nearest)<=integerTolerance) {
     521    return 0.0;
     522  } else {
     523    double returnValue=0.0;
     524    double minValue = CoinMin(downCost,upCost);
     525    double maxValue = CoinMax(downCost,upCost);
     526    if (!info->numberBranchingSolutions_||info->depth_<=10/* was ||maxValue>0.2*distanceToCutoff*/) {
     527      // no solution
     528      returnValue = WEIGHT_BEFORE*minValue + (1.0-WEIGHT_BEFORE)*maxValue;
     529    } else {
     530      // some solution
     531      returnValue = WEIGHT_AFTER*minValue + (1.0-WEIGHT_AFTER)*maxValue;
     532    }
     533    if (numberTimesUp_<numberBeforeTrust_||
     534        numberTimesDown_<numberBeforeTrust_) {
     535      //if (returnValue<1.0e10)
     536      //returnValue += 1.0e12;
     537      //else
     538      returnValue *= 1.0e3;
     539      if (!numberTimesUp_&&!numberTimesDown_)
     540        returnValue=1.0e50;
     541    }
     542    //if (fabs(value-0.5)<1.0e-5) {
     543    //returnValue = 3.0*returnValue + 0.2;
     544    //} else if (value>0.9) {
     545    //returnValue = 2.0*returnValue + 0.1;
     546    //}
     547    if (method_==1) {
     548      // probing
     549      // average
     550      double up=1.0e-15;
     551      double down=1.0e-15;
     552      if (numberTimesProbingTotal_) {
     553        up += numberTimesUpTotalFixed_/((double) numberTimesProbingTotal_);
     554        down += numberTimesDownTotalFixed_/((double) numberTimesProbingTotal_);
     555      }
     556      returnValue = 1 + 10.0*CoinMin(numberTimesDownLocalFixed_,numberTimesUpLocalFixed_) +
     557        CoinMin(down,up);
     558      returnValue *= 1.0e-3;
     559    }
     560    return CoinMax(returnValue,1.0e-15);
     561  }
     562}
     563// Creates a branching object
     564CbcBranchingObject *
     565CbcSimpleIntegerDynamicPseudoCost::createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way)
     566{
     567  double value = info->solution_[columnNumber_];
     568  value = CoinMax(value, info->lower_[columnNumber_]);
     569  value = CoinMin(value, info->upper_[columnNumber_]);
     570  assert (info->upper_[columnNumber_]>info->lower_[columnNumber_]);
     571  if (!info->hotstartSolution_) {
     572#ifndef NDEBUG
     573    double nearest = floor(value+0.5);
     574    assert (fabs(value-nearest)>info->integerTolerance_);
     575#endif
     576  } else {
     577    double targetValue = info->hotstartSolution_[columnNumber_];
     578    if (way>0)
     579      value = targetValue-0.1;
     580    else
     581      value = targetValue+0.1;
     582  }
     583  CbcDynamicPseudoCostBranchingObject * newObject =
     584    new CbcDynamicPseudoCostBranchingObject(model_,columnNumber_,way,
     585                                            value,this);
     586  double up =  upDynamicPseudoCost_*(ceil(value)-value);
     587  double down =  downDynamicPseudoCost_*(value-floor(value));
     588  double changeInGuessed=up-down;
     589  if (way>0)
     590    changeInGuessed = - changeInGuessed;
     591  changeInGuessed=CoinMax(0.0,changeInGuessed);
     592  //if (way>0)
     593  //changeInGuessed += 1.0e8; // bias to stay up
     594  newObject->setChangeInGuessed(changeInGuessed);
     595  newObject->setOriginalObject(this);
     596  return newObject;
    403597}
    404598
     
    452646  double downCost = CoinMax((value-below)*downDynamicPseudoCost_,0.0);
    453647  return downCost;
     648}
     649// Pass in probing information
     650void
     651CbcSimpleIntegerDynamicPseudoCost::setProbingInformation(int fixedDown, int fixedUp)
     652{
     653  numberTimesProbingTotal_++;
     654  numberTimesDownLocalFixed_ = fixedDown;
     655  numberTimesDownTotalFixed_ += fixedDown;
     656  numberTimesUpLocalFixed_ = fixedUp;
     657  numberTimesUpTotalFixed_ += fixedUp;
    454658}
    455659// Print
     
    603807*/
    604808double
    605 CbcDynamicPseudoCostBranchingObject::branch(bool normalBranch)
    606 {
    607   CbcIntegerBranchingObject::branch(normalBranch);
     809CbcDynamicPseudoCostBranchingObject::branch()
     810{
     811  CbcIntegerBranchingObject::branch();
    608812  return changeInGuessed_;
    609813}
     
    689893      information on object causing branch - after branch */
    690894void
    691 CbcBranchDynamicDecision::saveBranchingObject(CbcBranchingObject * object)
    692 {
    693   object_ = object->clone();
     895CbcBranchDynamicDecision::saveBranchingObject(OsiBranchingObject * object)
     896{
     897  OsiBranchingObject * obj = object->clone();
     898  CbcDynamicPseudoCostBranchingObject * branchingObject =
     899    dynamic_cast<CbcDynamicPseudoCostBranchingObject *>(obj);
     900  assert (branchingObject);
     901  object_=branchingObject;
    694902}
    695903/* Pass in information on branch just done.
     
    712920  CbcDynamicPseudoCostBranchingObject * branchingObject =
    713921    dynamic_cast<CbcDynamicPseudoCostBranchingObject *>(object_);
    714   assert (branchingObject);
     922  if (!branchingObject) {
     923    delete object_;
     924    object_=NULL;
     925    return;
     926  }
    715927  CbcSimpleIntegerDynamicPseudoCost *  object = branchingObject->object();
    716928  double change = CoinMax(0.0,objectiveValue-originalValue);
     
    740952  int way = object_->way();
    741953  double value = object_->value();
    742 #define TYPE2
     954#define TYPE2 1
     955#define TYPERATIO 0.9
    743956  if (way<0) {
    744957    // down
    745958    if (feasible) {
     959      //printf("(down change %g value down %g ",change,value-floor(value));
    746960      object->incrementNumberTimesDown();
    747961      object->addToSumDownChange(1.0e-30+value-floor(value));
    748962      object->addToSumDownDecrease(originalUnsatisfied-unsatisfied);
    749 #ifndef TYPE2
     963#if TYPE2==0
    750964      object->addToSumDownCost(change/(1.0e-30+(value-floor(value))));
    751965      object->setDownDynamicPseudoCost(object->sumDownCost()/(double) object->numberTimesDown());
    752 #else
     966#elif TYPE2==1
    753967      object->addToSumDownCost(change);
    754968      object->setDownDynamicPseudoCost(object->sumDownCost()/object->sumDownChange());
     969#elif TYPE2==2
     970      object->addToSumDownCost(change*TYPERATIO+(1.0-TYPERATIO)*change/(1.0e-30+(value-floor(value))));
     971      object->setDownDynamicPseudoCost(object->sumDownCost()*(TYPERATIO/object->sumDownChange()+(1.0-TYPERATIO)/(double) object->numberTimesDown()));
    755972#endif
    756973    } else {
     974      //printf("(down infeasible value down %g ",change,value-floor(value));
    757975      object->incrementNumberTimesDownInfeasible();
     976#if INFEAS==2
     977      double distanceToCutoff=0.0;
     978      double objectiveValue = model->getCurrentMinimizationObjValue();
     979      distanceToCutoff =  model->getCutoff()  - originalValue;
     980      if (distanceToCutoff<1.0e20)
     981        change = distanceToCutoff*2.0;
     982      else
     983        change = object->downDynamicPseudoCost()*(value-floor(value))*10.0;
     984      change = CoinMax(1.0e-12*(1.0+fabs(originalValue)),change);
     985      object->incrementNumberTimesDown();
     986      object->addToSumDownChange(1.0e-30+value-floor(value));
     987      object->addToSumDownDecrease(originalUnsatisfied-unsatisfied);
     988#if TYPE2==0
     989      object->addToSumDownCost(change/(1.0e-30+(value-floor(value))));
     990      object->setDownDynamicPseudoCost(object->sumDownCost()/(double) object->numberTimesDown());
     991#elif TYPE2==1
     992      object->addToSumDownCost(change);
     993      object->setDownDynamicPseudoCost(object->sumDownCost()/object->sumDownChange());
     994#elif TYPE2==2
     995      object->addToSumDownCost(change*TYPERATIO+(1.0-TYPERATIO)*change/(1.0e-30+(value-floor(value))));
     996      object->setDownDynamicPseudoCost(object->sumDownCost()*(TYPERATIO/object->sumDownChange()+(1.0-TYPERATIO)/(double) object->numberTimesDown()));
     997#endif
     998#endif
    758999    }
    7591000  } else {
    7601001    // up
    7611002    if (feasible) {
     1003      //printf("(up change %g value down %g ",change,ceil(value)-value);
    7621004      object->incrementNumberTimesUp();
    7631005      object->addToSumUpChange(1.0e-30+ceil(value)-value);
    7641006      object->addToSumUpDecrease(unsatisfied-originalUnsatisfied);
    765 #ifndef TYPE2
     1007#if TYPE2==0
    7661008      object->addToSumUpCost(change/(1.0e-30+(ceil(value)-value)));
    7671009      object->setUpDynamicPseudoCost(object->sumUpCost()/(double) object->numberTimesUp());
    768 #else
     1010#elif TYPE2==1
    7691011      object->addToSumUpCost(change);
    7701012      object->setUpDynamicPseudoCost(object->sumUpCost()/object->sumUpChange());
     1013#elif TYPE2==2
     1014      object->addToSumUpCost(change*TYPERATIO+(1.0-TYPERATIO)*change/(1.0e-30+(ceil(value)-value)));
     1015      object->setUpDynamicPseudoCost(object->sumUpCost()*(TYPERATIO/object->sumUpChange()+(1.0-TYPERATIO)/(double) object->numberTimesUp()));
    7711016#endif
    7721017    } else {
     1018      //printf("(up infeasible value down %g ",change,ceil(value)-value);
    7731019      object->incrementNumberTimesUpInfeasible();
    774     }
    775   }
     1020#if INFEAS==2
     1021      double distanceToCutoff=0.0;
     1022      double objectiveValue = model->getCurrentMinimizationObjValue();
     1023      distanceToCutoff =  model->getCutoff()  - originalValue;
     1024      if (distanceToCutoff<1.0e20)
     1025        change = distanceToCutoff*2.0;
     1026      else
     1027        change = object->upDynamicPseudoCost()*(ceil(value)-value)*10.0;
     1028      change = CoinMax(1.0e-12*(1.0+fabs(originalValue)),change);
     1029      object->incrementNumberTimesUp();
     1030      object->addToSumUpChange(1.0e-30+ceil(value)-value);
     1031      object->addToSumUpDecrease(unsatisfied-originalUnsatisfied);
     1032#if TYPE2==0
     1033      object->addToSumUpCost(change/(1.0e-30+(ceil(value)-value)));
     1034      object->setUpDynamicPseudoCost(object->sumUpCost()/(double) object->numberTimesUp());
     1035#elif TYPE2==1
     1036      object->addToSumUpCost(change);
     1037      object->setUpDynamicPseudoCost(object->sumUpCost()/object->sumUpChange());
     1038#elif TYPE2==2
     1039      object->addToSumUpCost(change*TYPERATIO+(1.0-TYPERATIO)*change/(1.0e-30+(ceil(value)-value)));
     1040      object->setUpDynamicPseudoCost(object->sumUpCost()*(TYPERATIO/object->sumUpChange()+(1.0-TYPERATIO)/(double) object->numberTimesUp()));
     1041#endif
     1042#endif
     1043    }
     1044  }
     1045  //object->print();
    7761046  delete object_;
    7771047  object_=NULL;
     
    8751145    CbcDynamicPseudoCostBranchingObject * branchingObject =
    8761146      dynamic_cast<CbcDynamicPseudoCostBranchingObject *>(thisOne);
    877     assert (branchingObject);
    878     CbcSimpleIntegerDynamicPseudoCost *  object = branchingObject->object();
    879     double separator = object->upDownSeparator();
    880     if (separator>0.0) {
    881       const double * solution = thisOne->model()->testSolution();
    882       double valueVariable = solution[object->columnNumber()];
    883       betterWay = (valueVariable-floor(valueVariable)>=separator) ? 1 : -1;
     1147    if (branchingObject) {
     1148      CbcSimpleIntegerDynamicPseudoCost *  object = branchingObject->object();
     1149      double separator = object->upDownSeparator();
     1150      if (separator>0.0) {
     1151        const double * solution = thisOne->model()->testSolution();
     1152        double valueVariable = solution[object->columnNumber()];
     1153        betterWay = (valueVariable-floor(valueVariable)>=separator) ? 1 : -1;
     1154      }
    8841155    }
    8851156    bestCriterion_ = value;
  • trunk/Cbc/src/CbcBranchDynamic.hpp

    r231 r640  
    2424  CbcSimpleIntegerDynamicPseudoCost ();
    2525
    26   // Useful constructor - passed integer index and model index
    27   CbcSimpleIntegerDynamicPseudoCost (CbcModel * model, int sequence, int iColumn, double breakEven=0.5);
    28  
    29   // Useful constructor - passed integer index and model index and pseudo costs
    30   CbcSimpleIntegerDynamicPseudoCost (CbcModel * model, int sequence, int iColumn,
     26  // Useful constructor - passed  model index
     27  CbcSimpleIntegerDynamicPseudoCost (CbcModel * model,  int iColumn, double breakEven=0.5);
     28 
     29  // Useful constructor - passed  model index and pseudo costs
     30  CbcSimpleIntegerDynamicPseudoCost (CbcModel * model, int iColumn,
     31                              double downDynamicPseudoCost, double upDynamicPseudoCost);
     32 
     33  // Useful constructor - passed  model index and pseudo costs
     34  CbcSimpleIntegerDynamicPseudoCost (CbcModel * model, int dummy, int iColumn,
    3135                              double downDynamicPseudoCost, double upDynamicPseudoCost);
    3236 
     
    4852  /// Creates a branching object
    4953  virtual CbcBranchingObject * createBranch(int way) ;
     54  /// Infeasibility - large is 0.5
     55  virtual double infeasibility(const OsiSolverInterface * solver,
     56                               const OsiBranchingInformation * info, int & preferredWay) const;
     57
     58
     59  /** Create a branching object and indicate which way to branch first.
     60     
     61      The branching object has to know how to create branches (fix
     62      variables, etc.)
     63  */
     64  virtual CbcBranchingObject * createBranch(OsiSolverInterface * solver,
     65                                            const OsiBranchingInformation * info, int way) ;
    5066
    5167  /** Create an OsiSolverBranch object
     
    199215  /// Pass in information on a up branch
    200216  void setUpInformation(double changeObjectiveUp, int changeInfeasibilityUp);
     217  /// Pass in probing information
     218  void setProbingInformation(int fixedDown, int fixedUp);
    201219
    202220  /// Print - 0 -summary, 1 just before strong
     
    248266  /// Number of branches before we trust
    249267  int numberBeforeTrust_;
     268  /// Number of local probing fixings going down
     269  int numberTimesDownLocalFixed_;
     270  /// Number of local probing fixings going up
     271  int numberTimesUpLocalFixed_;
     272  /// Number of total probing fixings going down
     273  double numberTimesDownTotalFixed_;
     274  /// Number of total probing fixings going up
     275  double numberTimesUpTotalFixed_;
     276  /// Number of times probing done
     277  int numberTimesProbingTotal_;
    250278  /** Method -
    251       ??
     279      0 - pseudo costs
     280      1 - probing
    252281  */
    253282  int method_;
     
    309338             This version also changes guessed objective value
    310339  */
    311   virtual double branch(bool normalBranch=false);
     340  virtual double branch();
    312341  /** Some branchingObjects may claim to be able to skip
    313342      strong branching.  If so they have to fill in CbcStrongInfo.
     
    386415  /** Saves a clone of current branching object.  Can be used to update
    387416      information on object causing branch - after branch */
    388   virtual void saveBranchingObject(CbcBranchingObject * object) ;
     417  virtual void saveBranchingObject(OsiBranchingObject * object) ;
    389418  /** Pass in information on branch just done.
    390419      assumes object can get information from solver */
  • trunk/Cbc/src/CbcBranchLotsize.cpp

    r356 r640  
    642642 */
    643643void
    644 CbcLotsize::resetBounds()
    645 {
    646   //printf("resetBounds needs coding for CbcLotSize\n");
     644CbcLotsize::resetBounds(const OsiSolverInterface * solver)
     645{
    647646}
    648647
     
    679678  :CbcBranchingObject(model,variable,way,lowerValue)
    680679{
    681   numberBranchesLeft_=1;
     680  setNumberBranchesLeft(1);
    682681  down_[0] = lowerValue;
    683682  down_[1] = upperValue;
     
    731730*/
    732731double
    733 CbcLotsizeBranchingObject::branch(bool normalBranch)
    734 {
    735   if (model_->messageHandler()->logLevel()>2&&normalBranch)
    736     print(normalBranch);
    737   numberBranchesLeft_--;
     732CbcLotsizeBranchingObject::branch()
     733{
     734  decrementNumberBranchesLeft();
    738735  int iColumn = variable_;
    739736  if (way_<0) {
     
    764761// Print
    765762void
    766 CbcLotsizeBranchingObject::print(bool normalBranch)
     763CbcLotsizeBranchingObject::print()
    767764{
    768765  int iColumn = variable_;
  • trunk/Cbc/src/CbcBranchLotsize.hpp