Changeset 1088


Ignore:
Timestamp:
Aug 20, 2007 12:05:19 AM (12 years ago)
Author:
andreasw
Message:

merging changes from Bug Squashing Party Aug 2007 to regular trunk

Location:
trunk/Clp
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/README

    r797 r1088  
    55To use Clp you need the Clp and Coin libraries
    66
    7 To make the unitTest and standalone executable do
     7To make standalone executable do 'make Clp' in the Clp directory.
     8This creates an executable clp in Clp/src.
    89
    9 make unitTest in the Clp directory (or make in Clp/test).  This creates an executable clp.in Clp
     10To run unitTest do 'make unitTest' in the Clp directory. This will
     11do some minimal testing.
     12
     13To run clp on all netlib problems do 'make unitTest NETLIBDIR=<dirname>'
     14dirname should be the path to the directory containing all the
     15netlib files. If you have compiled Clp without zlib support then the
     16files must be uncompressed.
    1017
    1118Running clp gives you some hints.  It can do a unit test (clp -unitTest) and solve netlib
  • trunk/Clp/configure

    r1063 r1088  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.59 for Clp 0.1.
     3# Generated by GNU Autoconf 2.59 for Clp 1.4trunk.
    44#
    55# Report bugs to <coin-clp@list.coin-or.org>.
     
    430430PACKAGE_NAME='Clp'
    431431PACKAGE_TARNAME='clp'
    432 PACKAGE_VERSION='0.1'
    433 PACKAGE_STRING='Clp 0.1'
     432PACKAGE_VERSION='1.4trunk'
     433PACKAGE_STRING='Clp 1.4trunk'
    434434PACKAGE_BUGREPORT='coin-clp@list.coin-or.org'
    435435
     
    10021002  # This message is too long to be a string in the A/UX 3.1 sh.
    10031003  cat <<_ACEOF
    1004 \`configure' configures Clp 0.1 to adapt to many kinds of systems.
     1004\`configure' configures Clp 1.4trunk to adapt to many kinds of systems.
    10051005
    10061006Usage: $0 [OPTION]... [VAR=VALUE]...
     
    10681068if test -n "$ac_init_help"; then
    10691069  case $ac_init_help in
    1070      short | recursive ) echo "Configuration of Clp 0.1:";;
     1070     short | recursive ) echo "Configuration of Clp 1.4trunk:";;
    10711071   esac
    10721072  cat <<\_ACEOF
     
    12331233if $ac_init_version; then
    12341234  cat <<\_ACEOF
    1235 Clp configure 0.1
     1235Clp configure 1.4trunk
    12361236generated by GNU Autoconf 2.59
    12371237
     
    12531253running configure, to aid debugging if configure makes a mistake.
    12541254
    1255 It was created by Clp $as_me 0.1, which was
     1255It was created by Clp $as_me 1.4trunk, which was
    12561256generated by GNU Autoconf 2.59.  Invocation command line was
    12571257
     
    18131813  if test "$enable_doscompile" != no; then
    18141814     case $build in
    1815        *-cygwin*) ;;
    1816        *) { { echo "$as_me:$LINENO: error: --enable-doscompile option makes sense only under Cygwin" >&5
    1817 echo "$as_me: error: --enable-doscompile option makes sense only under Cygwin" >&2;}
     1815       *-cygwin* | *-mingw*) ;;
     1816       *) { { echo "$as_me:$LINENO: error: --enable-doscompile option makes sense only under Cygwin or MinGW" >&5
     1817echo "$as_me: error: --enable-doscompile option makes sense only under Cygwin or MinGW" >&2;}
    18181818   { (exit 1); exit 1; }; } ;;
    18191819     esac
     
    18231823fi;
    18241824 case "$enable_doscompile" in
    1825    msvc|mingw|no) ;;
     1825   mingw)
     1826     case $build in
     1827       *-mingw*) enable_doscompile=no ;;
     1828     esac
     1829     ;;
     1830   msvc|no) ;;
    18261831   yes) enable_doscompile=mingw ;;
    18271832   *) { { echo "$as_me:$LINENO: error: Invalid value $enable_doscompile for --enable-doscompile.
     
    27732778          xlc* | */xlc* | mpxlc* | */mpxlc*)
    27742779            coin_opt_cflags="-O3 -qarch=auto -qcache=auto -qtune=auto -qmaxmem=-1"
    2775             coin_add_cflags="-bmaxdata:0x80000000"
     2780            coin_add_cflags="-bmaxdata:0x80000000 -qsuppress=1500-036 -qsuppress=1500-029"
    27762781            coin_dbg_cflags="-g"
    27772782          ;;
     
    36143619          xlC* | */xlC* | mpxlC* | */mpxlC*)
    36153620            coin_opt_cxxflags="-O3 -qarch=auto -qcache=auto -qtune=auto -qmaxmem=-1"
    3616             coin_add_cxxflags="-bmaxdata:0x80000000 -qrtti=dyna"
     3621            coin_add_cxxflags="-bmaxdata:0x80000000 -qrtti=dyna -qsuppress=1500-036 -qsuppress=1500-029"
    36173622            coin_dbg_cxxflags="-g"
    36183623            ;;
     
    43104315# Define the identity of the package.
    43114316 PACKAGE='clp'
    4312  VERSION='0.1'
     4317 VERSION='1.4trunk'
    43134318
    43144319
     
    56125617*-*-irix6*)
    56135618  # Find out which ABI we are using.
    5614   echo '#line 5614 "configure"' > conftest.$ac_ext
     5619  echo '#line 5619 "configure"' > conftest.$ac_ext
    56155620  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    56165621  (eval $ac_compile) 2>&5
     
    67466751
    67476752# Provide some information about the compiler.
    6748 echo "$as_me:6748:" \
     6753echo "$as_me:6753:" \
    67496754     "checking for Fortran 77 compiler version" >&5
    67506755ac_compiler=`set X $ac_compile; echo $2`
     
    78137818   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    78147819   -e 's:$: $lt_compiler_flag:'`
    7815    (eval echo "\"\$as_me:7815: $lt_compile\"" >&5)
     7820   (eval echo "\"\$as_me:7820: $lt_compile\"" >&5)
    78167821   (eval "$lt_compile" 2>conftest.err)
    78177822   ac_status=$?
    78187823   cat conftest.err >&5
    7819    echo "$as_me:7819: \$? = $ac_status" >&5
     7824   echo "$as_me:7824: \$? = $ac_status" >&5
    78207825   if (exit $ac_status) && test -s "$ac_outfile"; then
    78217826     # The compiler can only warn and ignore the option if not recognized
     
    80818086   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    80828087   -e 's:$: $lt_compiler_flag:'`
    8083    (eval echo "\"\$as_me:8083: $lt_compile\"" >&5)
     8088   (eval echo "\"\$as_me:8088: $lt_compile\"" >&5)
    80848089   (eval "$lt_compile" 2>conftest.err)
    80858090   ac_status=$?
    80868091   cat conftest.err >&5
    8087    echo "$as_me:8087: \$? = $ac_status" >&5
     8092   echo "$as_me:8092: \$? = $ac_status" >&5
    80888093   if (exit $ac_status) && test -s "$ac_outfile"; then
    80898094     # The compiler can only warn and ignore the option if not recognized
     
    81858190   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81868191   -e 's:$: $lt_compiler_flag:'`
    8187    (eval echo "\"\$as_me:8187: $lt_compile\"" >&5)
     8192   (eval echo "\"\$as_me:8192: $lt_compile\"" >&5)
    81888193   (eval "$lt_compile" 2>out/conftest.err)
    81898194   ac_status=$?
    81908195   cat out/conftest.err >&5
    8191    echo "$as_me:8191: \$? = $ac_status" >&5
     8196   echo "$as_me:8196: \$? = $ac_status" >&5
    81928197   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    81938198   then
     
    1053010535  lt_status=$lt_dlunknown
    1053110536  cat > conftest.$ac_ext <<EOF
    10532 #line 10532 "configure"
     10537#line 10537 "configure"
    1053310538#include "confdefs.h"
    1053410539
     
    1063010635  lt_status=$lt_dlunknown
    1063110636  cat > conftest.$ac_ext <<EOF
    10632 #line 10632 "configure"
     10637#line 10637 "configure"
    1063310638#include "confdefs.h"
    1063410639
     
    1297412979   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1297512980   -e 's:$: $lt_compiler_flag:'`
    12976    (eval echo "\"\$as_me:12976: $lt_compile\"" >&5)
     12981   (eval echo "\"\$as_me:12981: $lt_compile\"" >&5)
    1297712982   (eval "$lt_compile" 2>conftest.err)
    1297812983   ac_status=$?
    1297912984   cat conftest.err >&5
    12980    echo "$as_me:12980: \$? = $ac_status" >&5
     12985   echo "$as_me:12985: \$? = $ac_status" >&5
    1298112986   if (exit $ac_status) && test -s "$ac_outfile"; then
    1298212987     # The compiler can only warn and ignore the option if not recognized
     
    1307813083   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1307913084   -e 's:$: $lt_compiler_flag:'`
    13080    (eval echo "\"\$as_me:13080: $lt_compile\"" >&5)
     13085   (eval echo "\"\$as_me:13085: $lt_compile\"" >&5)
    1308113086   (eval "$lt_compile" 2>out/conftest.err)
    1308213087   ac_status=$?
    1308313088   cat out/conftest.err >&5
    13084    echo "$as_me:13084: \$? = $ac_status" >&5
     13089   echo "$as_me:13089: \$? = $ac_status" >&5
    1308513090   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1308613091   then
     
    1464814653   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1464914654   -e 's:$: $lt_compiler_flag:'`
    14650    (eval echo "\"\$as_me:14650: $lt_compile\"" >&5)
     14655   (eval echo "\"\$as_me:14655: $lt_compile\"" >&5)
    1465114656   (eval "$lt_compile" 2>conftest.err)
    1465214657   ac_status=$?
    1465314658   cat conftest.err >&5
    14654    echo "$as_me:14654: \$? = $ac_status" >&5
     14659   echo "$as_me:14659: \$? = $ac_status" >&5
    1465514660   if (exit $ac_status) && test -s "$ac_outfile"; then
    1465614661     # The compiler can only warn and ignore the option if not recognized
     
    1475214757   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1475314758   -e 's:$: $lt_compiler_flag:'`
    14754    (eval echo "\"\$as_me:14754: $lt_compile\"" >&5)
     14759   (eval echo "\"\$as_me:14759: $lt_compile\"" >&5)
    1475514760   (eval "$lt_compile" 2>out/conftest.err)
    1475614761   ac_status=$?
    1475714762   cat out/conftest.err >&5
    14758    echo "$as_me:14758: \$? = $ac_status" >&5
     14763   echo "$as_me:14763: \$? = $ac_status" >&5
    1475914764   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1476014765   then
     
    1695916964   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1696016965   -e 's:$: $lt_compiler_flag:'`
    16961    (eval echo "\"\$as_me:16961: $lt_compile\"" >&5)
     16966   (eval echo "\"\$as_me:16966: $lt_compile\"" >&5)
    1696216967   (eval "$lt_compile" 2>conftest.err)
    1696316968   ac_status=$?
    1696416969   cat conftest.err >&5
    16965    echo "$as_me:16965: \$? = $ac_status" >&5
     16970   echo "$as_me:16970: \$? = $ac_status" >&5
    1696616971   if (exit $ac_status) && test -s "$ac_outfile"; then
    1696716972     # The compiler can only warn and ignore the option if not recognized
     
    1722717232   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1722817233   -e 's:$: $lt_compiler_flag:'`
    17229    (eval echo "\"\$as_me:17229: $lt_compile\"" >&5)
     17234   (eval echo "\"\$as_me:17234: $lt_compile\"" >&5)
    1723017235   (eval "$lt_compile" 2>conftest.err)
    1723117236   ac_status=$?
    1723217237   cat conftest.err >&5
    17233    echo "$as_me:17233: \$? = $ac_status" >&5
     17238   echo "$as_me:17238: \$? = $ac_status" >&5
    1723417239   if (exit $ac_status) && test -s "$ac_outfile"; then
    1723517240     # The compiler can only warn and ignore the option if not recognized
     
    1733117336   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1733217337   -e 's:$: $lt_compiler_flag:'`
    17333    (eval echo "\"\$as_me:17333: $lt_compile\"" >&5)
     17338   (eval echo "\"\$as_me:17338: $lt_compile\"" >&5)
    1733417339   (eval "$lt_compile" 2>out/conftest.err)
    1733517340   ac_status=$?
    1733617341   cat out/conftest.err >&5
    17337    echo "$as_me:17337: \$? = $ac_status" >&5
     17342   echo "$as_me:17342: \$? = $ac_status" >&5
    1733817343   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1733917344   then
     
    2128621291cat >&5 <<_CSEOF
    2128721292
    21288 This file was extended by Clp $as_me 0.1, which was
     21293This file was extended by Clp $as_me 1.4trunk, which was
    2128921294generated by GNU Autoconf 2.59.  Invocation command line was
    2129021295
     
    2134921354cat >>$CONFIG_STATUS <<_ACEOF
    2135021355ac_cs_version="\\
    21351 Clp config.status 0.1
     21356Clp config.status 1.4trunk
    2135221357configured by $0, generated by GNU Autoconf 2.59,
    2135321358  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
  • trunk/Clp/configure.ac

    r994 r1088  
    1313AC_PREREQ(2.59)
    1414
    15 AC_INIT([Clp],[0.1],[coin-clp@list.coin-or.org])
     15AC_INIT([Clp],[1.4trunk],[coin-clp@list.coin-or.org])
    1616
    1717AC_COPYRIGHT([
  • trunk/Clp/src/CbcOrClpParam.cpp

    r1084 r1088  
    14301430     "This sets the directory which import, export, saveModel, restoreModel etc will use.\
    14311431  It is initialized to './'"
     1432     );
     1433  parameters[numberParameters++]=
     1434    CbcOrClpParam("dirSample","Set directory where the COIN-OR sample problems are.",
     1435                  DIRSAMPLE);
     1436  parameters[numberParameters-1].setLonghelp
     1437    (
     1438     "This sets the directory where the COIN-OR sample problems reside. It is\
     1439 used only when -unitTest is passed to clp. clp will pick up the test problems\
     1440 from this directory.\
     1441 It is initialized to '../../Data/Sample'"
     1442     );
     1443  parameters[numberParameters++]=
     1444    CbcOrClpParam("dirNetlib","Set directory where the netlib problems are.",
     1445                  DIRNETLIB);
     1446  parameters[numberParameters-1].setLonghelp
     1447    (
     1448     "This sets the directory where the netlib problems reside. One can get\
     1449 the netlib problems from COIN-OR or from the main netlib site. This\
     1450 parameter is used only when -netlib is passed to clp. clp will pick up the\
     1451 netlib problems from this directory. If clp is built without zlib support\
     1452 then the problems must be uncompressed.\
     1453 It is initialized to '../../Data/Netlib'"
     1454     );
     1455  parameters[numberParameters++]=
     1456    CbcOrClpParam("dirMiplib","Set directory where the miplib 2003 problems are.",
     1457                  DIRMIPLIB);
     1458  parameters[numberParameters-1].setLonghelp
     1459    (
     1460     "This sets the directory where the miplib 2003 problems reside. One can\
     1461 get the miplib problems from COIN-OR or from the main miplib site. This\
     1462 parameter is used only when -miplib is passed to cbc. cbc will pick up the\
     1463 miplib problems from this directory. If cbc is built without zlib support\
     1464 then the problems must be uncompressed.\
     1465 It is initialized to '../../Data/miplib3'"
    14321466     );
    14331467#ifdef COIN_HAS_CBC
  • trunk/Clp/src/CbcOrClpParam.hpp

    r1084 r1088  
    8181    LANDPCUTS,RINS,RESIDCUTS,
    8282   
    83     DIRECTORY=301,IMPORT,EXPORT,RESTORE,SAVE,DUALSIMPLEX,PRIMALSIMPLEX,EITHERSIMPLEX,
     83    DIRECTORY=301,DIRSAMPLE,DIRNETLIB,DIRMIPLIB,IMPORT,EXPORT,RESTORE,SAVE,DUALSIMPLEX,PRIMALSIMPLEX,EITHERSIMPLEX,
    8484    MAXIMIZE,MINIMIZE,EXIT,STDIN,UNITTEST,NETLIB_EITHER,NETLIB_DUAL,NETLIB_PRIMAL,SOLUTION,SAVESOL,
    8585    TIGHTEN,FAKEBOUND,HELP,PLUSMINUS,NETWORK,ALLSLACK,REVERSE,BARRIER,NETLIB_BARRIER,NETLIB_TUNE,
  • trunk/Clp/src/ClpDummyMatrix.hpp

    r1055 r1088  
    111111                                const double * rowScale,
    112112                                const double * columnScale) const;
     113
     114  using ClpMatrixBase::transposeTimes ;
    113115    /** Return <code>x * scalar * A + y</code> in <code>z</code>.
    114116        Can use y as temporary array (will be empty at end)
  • trunk/Clp/src/ClpDynamicExampleMatrix.cpp

    r754 r1088  
    9494  // and size correctly
    9595  row_ = new int [maximumElements_];
    96   element_ = new float [maximumElements_];
     96  element_ = new double [maximumElements_];
    9797  startColumn_ = new CoinBigIndex [maximumGubColumns_+1];
    9898  // say no columns yet
    9999  numberGubColumns_=0;
    100100  startColumn_[0]=0;
    101   cost_ = new float[maximumGubColumns_];
     101  cost_ = new double[maximumGubColumns_];
    102102  dynamicStatus_ = new unsigned char [maximumGubColumns_];
    103103  memset(dynamicStatus_,0,maximumGubColumns_);
    104104  id_ = new int[maximumGubColumns_];
    105105  if (columnLower)
    106     columnLower_ = new float[maximumGubColumns_];
     106    columnLower_ = new double[maximumGubColumns_];
    107107  else
    108108    columnLower_ = NULL;
    109109  if (columnUpper)
    110     columnUpper_ = new float[maximumGubColumns_];
     110    columnUpper_ = new double[maximumGubColumns_];
    111111  else
    112112    columnUpper_=NULL;
     
    122122  CoinBigIndex numberElements = startColumnGen_[numberColumns_];
    123123  rowGen_ = ClpCopyOfArray(row,numberElements);
    124   elementGen_ = new float[numberElements];
     124  elementGen_ = new double[numberElements];
    125125  for (i=0;i<numberElements;i++)
    126126    elementGen_[i]=element[i];
    127   costGen_ = new float[numberColumns_];
     127  costGen_ = new double[numberColumns_];
    128128  for (i=0;i<numberColumns_;i++) {
    129129    costGen_[i]=cost[i];
     
    132132  }
    133133  if (columnLower) {
    134     columnLowerGen_ = new float[numberColumns_];
     134    columnLowerGen_ = new double[numberColumns_];
    135135    for (i=0;i<numberColumns_;i++) {
    136136      columnLowerGen_[i]=columnLower[i];
     
    144144  }
    145145  if (columnUpper) {
    146     columnUpperGen_ = new float[numberColumns_];
     146    columnUpperGen_ = new double[numberColumns_];
    147147    for (i=0;i<numberColumns_;i++)
    148148      columnUpperGen_[i]=columnUpper[i];
     
    224224                          const double * lower, const double * upper,
    225225                          int * startColumn, int * row,
    226                           float * element, float * cost,
    227                           float * columnLower, float * columnUpper,
     226                          double * element, double * cost,
     227                          double * columnLower, double * columnUpper,
    228228                          const unsigned char * status,
    229229                          const unsigned char * dynamicStatus,
     
    253253  // and size correctly
    254254  row_ = new int [maximumElements_];
    255   element_ = new float [maximumElements_];
     255  element_ = new double [maximumElements_];
    256256  startColumn_ = new CoinBigIndex [maximumGubColumns_+1];
    257257  // say no columns yet
    258258  numberGubColumns_=0;
    259259  startColumn_[0]=0;
    260   cost_ = new float[maximumGubColumns_];
     260  cost_ = new double[maximumGubColumns_];
    261261  dynamicStatus_ = new unsigned char [maximumGubColumns_];
    262262  memset(dynamicStatus_,0,maximumGubColumns_);
    263263  id_ = new int[maximumGubColumns_];
    264264  if (columnLower)
    265     columnLower_ = new float[maximumGubColumns_];
     265    columnLower_ = new double[maximumGubColumns_];
    266266  else
    267267    columnLower_ = NULL;
    268268  if (columnUpper)
    269     columnUpper_ = new float[maximumGubColumns_];
     269    columnUpper_ = new double[maximumGubColumns_];
    270270  else
    271271    columnUpper_=NULL;
  • trunk/Clp/src/ClpDynamicExampleMatrix.hpp

    r1055 r1088  
    7474                          const double * lower, const double * upper,
    7575                          int * startColumn, int * row,
    76                           float * element, float * cost,
    77                           float * columnLower=NULL, float * columnUpper=NULL,
     76                          double * element, double * cost,
     77                          double * columnLower=NULL, double * columnUpper=NULL,
    7878                          const unsigned char * status=NULL,
    7979                          const unsigned char * dynamicStatus=NULL,
     
    101101  { return rowGen_;}
    102102  /// elements
    103   inline float * elementGen() const
     103  inline double * elementGen() const
    104104  { return elementGen_;}
    105105  /// costs
    106   inline float * costGen() const
     106  inline double * costGen() const
    107107  { return costGen_;}
    108108  /// full starts
     
    113113  { return idGen_;}
    114114  /// Optional lower bounds on columns
    115   inline float * columnLowerGen() const
     115  inline double * columnLowerGen() const
    116116  { return columnLowerGen_;}
    117117  /// Optional upper bounds on columns
    118   inline float * columnUpperGen() const
     118  inline double * columnUpperGen() const
    119119  { return columnUpperGen_;}
    120120  /// size
     
    153153  int * rowGen_;
    154154  /// elements
    155   float * elementGen_;
     155  double * elementGen_;
    156156  /// costs
    157   float * costGen_;
     157  double * costGen_;
    158158  /// start of each set
    159159  int * fullStartGen_;
     
    165165  int * idGen_;
    166166  /// Optional lower bounds on columns
    167   float * columnLowerGen_;
     167  double * columnLowerGen_;
    168168  /// Optional upper bounds on columns
    169   float * columnUpperGen_;
     169  double * columnUpperGen_;
    170170   //@}
    171171};
  • trunk/Clp/src/ClpDynamicMatrix.cpp

    r1034 r1088  
    177177  CoinBigIndex numberElements = startColumn_[numberGubColumns_];
    178178  row_ = ClpCopyOfArray(row,numberElements);
    179   element_ = new float[numberElements];
     179  element_ = new double[numberElements];
    180180  CoinBigIndex i;
    181181  for (i=0;i<numberElements;i++)
    182182    element_[i]=element[i];
    183   cost_ = new float[numberGubColumns_];
     183  cost_ = new double[numberGubColumns_];
    184184  for (i=0;i<numberGubColumns_;i++) {
    185185    cost_[i]=cost[i];
     
    188188  }
    189189  if (columnLower) {
    190     columnLower_ = new float[numberGubColumns_];
     190    columnLower_ = new double[numberGubColumns_];
    191191    for (i=0;i<numberGubColumns_;i++)
    192192      columnLower_[i]=columnLower[i];
     
    195195  }
    196196  if (columnUpper) {
    197     columnUpper_ = new float[numberGubColumns_];
     197    columnUpper_ = new double[numberGubColumns_];
    198198    for (i=0;i<numberGubColumns_;i++)
    199199      columnUpper_[i]=columnUpper[i];
     
    201201    columnUpper_=NULL;
    202202  }
    203   lowerSet_ = new float[numberSets_];
     203  lowerSet_ = new double[numberSets_];
    204204  for (i=0;i<numberSets_;i++) {
    205205    if (lower[i]>-1.0e20)
     
    208208      lowerSet_[i] = -1.0e30;
    209209  }
    210   upperSet_ = new float[numberSets_];
     210  upperSet_ = new double[numberSets_];
    211211  for (i=0;i<numberSets_;i++) {
    212212    if (upper[i]<1.0e20)
     
    22182218// Adds in a column to gub structure (called from descendant)
    22192219int
    2220 ClpDynamicMatrix::addColumn(int numberEntries,const int * row, const float * element,
    2221                             float cost, float lower, float upper,int iSet,
     2220ClpDynamicMatrix::addColumn(int numberEntries,const int * row, const double * element,
     2221                            double cost, double lower, double upper,int iSet,
    22222222                            DynamicStatus status)
    22232223{
     
    22272227    if (startColumn_[j+1]-startColumn_[j]==numberEntries) {
    22282228      const int * row2 = row_+startColumn_[j];
    2229       const float * element2 = element_ + startColumn_[j];
     2229      const double * element2 = element_ + startColumn_[j];
    22302230      bool same=true;
    22312231      for (int k=0;k<numberEntries;k++) {
  • trunk/Clp/src/ClpDynamicMatrix.hpp

    r1055 r1088  
    4040  virtual double * rhsOffset(ClpSimplex * model,bool forceRefresh=false,
    4141                                bool check=false);
     42
     43  using ClpPackedMatrix::times ;
    4244    /** Return <code>y + A * scalar *x</code> in <code>y</code>.
    4345        @pre <code>x</code> must be of size <code>numColumns()</code>
     
    9395  void initialProblem();
    9496  /** Adds in a column to gub structure (called from descendant) and returns sequence */
    95   int addColumn(int numberEntries,const int * row, const float * element,
    96                  float cost, float lower, float upper, int iSet,
     97  int addColumn(int numberEntries,const int * row, const double * element,
     98                 double cost, double lower, double upper, int iSet,
    9799                 DynamicStatus status);
    98100  /** If addColumn forces compression then this allows descendant to know what to do.
     
    188190  { return row_;}
    189191  /// elements
    190   inline float * element() const
     192  inline double * element() const
    191193  { return element_;}
    192194  /// costs
    193   inline float * cost() const
     195  inline double * cost() const
    194196  { return cost_;}
    195197  /// ids of active columns (just index here)
     
    197199  { return id_;}
    198200  /// Optional lower bounds on columns
    199   inline float * columnLower() const
     201  inline double * columnLower() const
    200202  { return columnLower_;}
    201203  /// Optional upper bounds on columns
    202   inline float * columnUpper() const
     204  inline double * columnUpper() const
    203205  { return columnUpper_;}
    204206  /// Lower bounds on sets
    205   inline float * lowerSet() const
     207  inline double * lowerSet() const
    206208  { return lowerSet_;}
    207209  /// Upper bounds on sets
    208   inline float * upperSet() const
     210  inline double * upperSet() const
    209211  { return upperSet_;}
    210212  /// size
     
    272274  double objectiveOffset_;
    273275  /// Lower bounds on sets
    274   float * lowerSet_;
     276  double * lowerSet_;
    275277  /// Upper bounds on sets
    276   float * upperSet_;
     278  double * upperSet_;
    277279  /// Status of slack on set
    278280  unsigned char * status_;
     
    318320  int * row_;
    319321  /// elements
    320   float * element_;
     322  double * element_;
    321323  /// costs
    322   float * cost_;
     324  double * cost_;
    323325  /// ids of active columns (just index here)
    324326  int * id_;
     
    326328  unsigned char * dynamicStatus_;
    327329  /// Optional lower bounds on columns
    328   float * columnLower_;
     330  double * columnLower_;
    329331  /// Optional upper bounds on columns
    330   float * columnUpper_;
     332  double * columnUpper_;
    331333   //@}
    332334};
  • trunk/Clp/src/ClpGubDynamicMatrix.cpp

    r1054 r1088  
    107107  CoinBigIndex numberElements = startColumn_[numberGubColumns_];
    108108  row_ = ClpCopyOfArray(row,numberElements);
    109   element_ = new float[numberElements];
     109  element_ = new double[numberElements];
    110110  CoinBigIndex i;
    111111  for (i=0;i<numberElements;i++)
    112112    element_[i]=element[i];
    113   cost_ = new float[numberGubColumns_];
     113  cost_ = new double[numberGubColumns_];
    114114  for (i=0;i<numberGubColumns_;i++) {
    115115    cost_[i]=cost[i];
     
    118118  }
    119119  if (lowerColumn) {
    120     lowerColumn_ = new float[numberGubColumns_];
     120    lowerColumn_ = new double[numberGubColumns_];
    121121    for (i=0;i<numberGubColumns_;i++)
    122122      lowerColumn_[i]=lowerColumn[i];
     
    125125  }
    126126  if (upperColumn) {
    127     upperColumn_ = new float[numberGubColumns_];
     127    upperColumn_ = new double[numberGubColumns_];
    128128    for (i=0;i<numberGubColumns_;i++)
    129129      upperColumn_[i]=upperColumn[i];
     
    132132  }
    133133  if (upperColumn||lowerColumn) {
    134     lowerSet_ = new float[numberSets_];
     134    lowerSet_ = new double[numberSets_];
    135135    for (i=0;i<numberSets_;i++) {
    136136      if (lower[i]>-1.0e20)
     
    139139        lowerSet_[i] = -1.0e30;
    140140    }
    141     upperSet_ = new float[numberSets_];
     141    upperSet_ = new double[numberSets_];
    142142    for (i=0;i<numberSets_;i++) {
    143143      if (upper[i]<1.0e20)
  • trunk/Clp/src/ClpGubDynamicMatrix.hpp

    r1055 r1088  
    4747  virtual double * rhsOffset(ClpSimplex * model,bool forceRefresh=false,
    4848                                bool check=false);
     49
     50  using ClpPackedMatrix::times ;
    4951    /** Return <code>y + A * scalar *x</code> in <code>y</code>.
    5052        @pre <code>x</code> must be of size <code>numColumns()</code>
     
    126128  { return row_;}
    127129  /// elements
    128   inline float * element() const
     130  inline double * element() const
    129131  { return element_;}
    130132  /// costs
    131   inline float * cost() const
     133  inline double * cost() const
    132134  { return cost_;}
    133135  /// full starts
     
    138140  { return id_;}
    139141  /// Optional lower bounds on columns
    140   inline float * lowerColumn() const
     142  inline double * lowerColumn() const
    141143  { return lowerColumn_;}
    142144  /// Optional upper bounds on columns
    143   inline float * upperColumn() const
     145  inline double * upperColumn() const
    144146  { return upperColumn_;}
    145147  /// Optional true lower bounds on sets
    146   inline float * lowerSet() const
     148  inline double * lowerSet() const
    147149  { return lowerSet_;}
    148150  /// Optional true upper bounds on sets
    149   inline float * upperSet() const
     151  inline double * upperSet() const
    150152  { return upperSet_;}
    151153  /// size
     
    189191  int * row_;
    190192  /// elements
    191   float * element_;
     193  double * element_;
    192194  /// costs
    193   float * cost_;
     195  double * cost_;
    194196  /// full starts
    195197  int * fullStart_;
     
    199201  unsigned char * dynamicStatus_;
    200202  /// Optional lower bounds on columns
    201   float * lowerColumn_;
     203  double * lowerColumn_;
    202204  /// Optional upper bounds on columns
    203   float * upperColumn_;
     205  double * upperColumn_;
    204206  /// Optional true lower bounds on sets
    205   float * lowerSet_;
     207  double * lowerSet_;
    206208  /// Optional true upper bounds on sets
    207   float * upperSet_;
     209  double * upperSet_;
    208210  /// size
    209211  int numberGubColumns_;
  • trunk/Clp/src/ClpGubMatrix.hpp

    r1055 r1088  
    6363  /**@name Matrix times vector methods */
    6464  //@{
     65
     66  using ClpPackedMatrix::transposeTimes ;
    6567    /** Return <code>x * scalar * A + y</code> in <code>z</code>.
    6668        Can use y as temporary array (will be empty at end)
  • trunk/Clp/src/ClpMain.cpp

    r1084 r1088  
    9494    models->messageHandler()->setPrefix(false);
    9595    const char dirsep =  CoinFindDirSeparator();
    96     std::string directory = (dirsep == '/' ? "./" : ".\\");
     96    std::string directory;
     97    std::string dirSample;
     98    std::string dirNetlib;
     99    std::string dirMiplib;
     100    if (dirsep == '/') {
     101      directory = "./";
     102      dirSample = "../../Data/Sample/";
     103      dirNetlib = "../../Data/Netlib/";
     104      dirMiplib = "../../Data/miplib3/";
     105    } else {
     106      directory = ".\\";
     107      dirSample = "..\\..\\Data\\Sample\\";
     108      dirNetlib = "..\\..\\Data\\Netlib\\";
     109      dirMiplib = "..\\..\\Data\\miplib3\\";
     110    }
    97111    std::string defaultDirectory = directory;
    98112    std::string importFile ="";
     
    115129    parameters[whichParam(PRINTMASK,numberParameters,parameters)].setStringValue(printMask);
    116130    parameters[whichParam(DIRECTORY,numberParameters,parameters)].setStringValue(directory);
     131    parameters[whichParam(DIRSAMPLE,numberParameters,parameters)].setStringValue(dirSample);
     132    parameters[whichParam(DIRNETLIB,numberParameters,parameters)].setStringValue(dirNetlib);
     133    parameters[whichParam(DIRMIPLIB,numberParameters,parameters)].setStringValue(dirMiplib);
    117134    parameters[whichParam(DUALBOUND,numberParameters,parameters)].setDoubleValue(models->dualBound());
    118135    parameters[whichParam(DUALTOLERANCE,numberParameters,parameters)].setDoubleValue(models->dualTolerance());
     
    13611378            }
    13621379            break;
     1380          case DIRSAMPLE:
     1381            {
     1382              std::string name = CoinReadGetString(argc,argv);
     1383              if (name!="EOL") {
     1384                int length=name.length();
     1385                if (name[length-1]=='/'||name[length-1]=='\\')
     1386                  dirSample=name;
     1387                else
     1388                  dirSample = name+"/";
     1389                parameters[iParam].setStringValue(dirSample);
     1390              } else {
     1391                parameters[iParam].printString();
     1392              }
     1393            }
     1394            break;
     1395          case DIRNETLIB:
     1396            {
     1397              std::string name = CoinReadGetString(argc,argv);
     1398              if (name!="EOL") {
     1399                int length=name.length();
     1400                if (name[length-1]=='/'||name[length-1]=='\\')
     1401                  dirNetlib=name;
     1402                else
     1403                  dirNetlib = name+"/";
     1404                parameters[iParam].setStringValue(dirNetlib);
     1405              } else {
     1406                parameters[iParam].printString();
     1407              }
     1408            }
     1409            break;
     1410          case DIRMIPLIB:
     1411            {
     1412              std::string name = CoinReadGetString(argc,argv);
     1413              if (name!="EOL") {
     1414                int length=name.length();
     1415                if (name[length-1]=='/'||name[length-1]=='\\')
     1416                  dirMiplib=name;
     1417                else
     1418                  dirMiplib = name+"/";
     1419                parameters[iParam].setStringValue(dirMiplib);
     1420              } else {
     1421                parameters[iParam].printString();
     1422              }
     1423            }
     1424            break;
    13631425          case STDIN:
    13641426            CbcOrClpRead_mode=-1;
     
    13721434              // create fields for unitTest
    13731435              const char * fields[4];
    1374               int nFields=2;
     1436              int nFields=4;
    13751437              fields[0]="fake main from unitTest";
    1376               fields[1]="-netlib";
    1377               if (directory!=defaultDirectory) {
    1378                 fields[2]="-netlibDir";
    1379                 fields[3]=directory.c_str();
    1380                 nFields=4;
    1381               }
     1438              std::string mpsfield = "-mpsDir=";
     1439              mpsfield += dirSample.c_str();
     1440              fields[1]=mpsfield.c_str();
     1441              std::string netfield = "-netlibDir=";
     1442              netfield += dirNetlib.c_str();
     1443              fields[2]=netfield.c_str();
     1444              fields[3]="-netlib";
    13821445              int algorithm;
    13831446              if (type==NETLIB_DUAL) {
     
    14081471            {
    14091472              // create fields for unitTest
    1410               const char * fields[3];
    1411               int nFields=1;
     1473              const char * fields[2];
     1474              int nFields=2;
    14121475              fields[0]="fake main from unitTest";
    1413               if (directory!=defaultDirectory) {
    1414                 fields[1]="-mpsDir";
    1415                 fields[2]=directory.c_str();
    1416                 nFields=3;
    1417               }
     1476              std::string dirfield = "-mpsDir=";
     1477              dirfield += dirSample.c_str();
     1478              fields[1]=dirfield.c_str();
    14181479              int specialOptions = models[iModel].specialOptions();
    14191480              models[iModel].setSpecialOptions(0);
  • trunk/Clp/src/ClpSimplexPrimal.cpp

    r1057 r1088  
    12031203        lastCleaned=-1; // carry on
    12041204      }
    1205       bool unflagged = unflag();
     1205      bool unflagged = (unflag()!=0);
    12061206      if ( lastCleaned!=numberIterations_||unflagged) {
    12071207        handler_->message(CLP_PRIMAL_OPTIMAL,messages_)
  • trunk/Clp/src/ClpSolve.cpp

    r1076 r1088  
    13311331   
    13321332    // We will need arrays to choose variables.  These are too big but ..
    1333     float * weight = new float [numberRows+originalNumberColumns];
     1333    double * weight = new double [numberRows+originalNumberColumns];
    13341334    int * sort = new int [numberRows+originalNumberColumns];
    13351335    int numberSort=0;
     
    23042304  handler_->printing(presolve==ClpSolve::presolveOn)
    23052305    <<timePresolve;
    2306   handler_->printing(timeIdiot)
     2306  handler_->printing(timeIdiot!=0.0)
    23072307    <<timeIdiot;
    23082308  handler_->message()<<CoinMessageEol;
  • trunk/Clp/src/Clp_C_Interface.cpp

    r1034 r1088  
    10651065}
    10661066/* Get variable basis info */
    1067 COINLIBAPI const int COINLINKAGE
     1067COINLIBAPI int COINLINKAGE
    10681068Clp_getColumnStatus(Clp_Simplex * model,int sequence)
    10691069{
     
    10711071}
    10721072/* Get row basis info */
    1073 COINLIBAPI const int COINLINKAGE
     1073COINLIBAPI int COINLINKAGE
    10741074Clp_getRowStatus(Clp_Simplex * model,int sequence)
    10751075{
  • trunk/Clp/src/Clp_C_Interface.h

    r891 r1088  
    205205     3 at lower, 4 superbasic, (5 fixed) */
    206206  /* Get variable basis info */
    207   COINLIBAPI const int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model,int sequence);
     207  COINLIBAPI int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model,int sequence);
    208208  /* Get row basis info */
    209   COINLIBAPI const int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model,int sequence);
     209  COINLIBAPI int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model,int sequence);
    210210  /* Set variable basis info (and value if at bound) */
    211211  COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
  • trunk/Clp/src/unitTest.cpp

    r1056 r1088  
    481481        // Read data mps file,
    482482        CoinMpsIO mps;
    483         mps.readMps(fn.c_str(),"mps");
    484         solutionBase.loadProblem(*mps.getMatrixByCol(),mps.getColLower(),
     483        int nerrors=mps.readMps(fn.c_str(),"mps");
     484        if (nerrors) {
     485          std::cerr << "Error " << nerrors << " when reading model from "
     486                    << fn.c_str() << "! Aborting tests.\n";
     487          return 1;
     488        }
     489        solutionBase.loadProblem(*mps.getMatrixByCol(),mps.getColLower(),
    485490                                 mps.getColUpper(),
    486491                                 mps.getObjCoefficients(),
     
    9981003  {   
    9991004    CoinMpsIO m;
    1000     std::string fn = netlibDir+"finnis";
     1005    std::string fn = mpsDir+"finnis";
    10011006    int returnCode = m.readMps(fn.c_str(),"mps");
    10021007    if (returnCode) {
    10031008      // probable cause is that gz not there
    1004       fprintf(stderr,"Unable to open finnis.mps in COIN/Mps/Netlib!\n");
     1009      fprintf(stderr,"Unable to open finnis.mps in %s\n", mpsDir.c_str());
    10051010      fprintf(stderr,"Most probable cause is finnis.mps is gzipped i.e. finnis.mps.gz and libz has not been activated\n");
    10061011      fprintf(stderr,"Either gunzip files or edit Makefiles/Makefile.location to get libz\n");
     
    10281033  {   
    10291034    CoinMpsIO m;
    1030     std::string fn = netlibDir+"afiro";
     1035    std::string fn = mpsDir+"afiro";
    10311036    m.readMps(fn.c_str(),"mps");
    10321037    ClpSimplex solution;
     
    11151120  {   
    11161121    CoinMpsIO m;
    1117     std::string fn = netlibDir+"brandy";
     1122    std::string fn = mpsDir+"brandy";
    11181123    m.readMps(fn.c_str(),"mps");
    11191124    ClpSimplex solution;
     
    11871192  {   
    11881193    CoinMpsIO m;
    1189     std::string fn = netlibDir+"brandy";
     1194    std::string fn = mpsDir+"brandy";
    11901195    m.readMps(fn.c_str(),"mps");
    11911196    ClpSimplex solution;
     
    12761281  {   
    12771282    CoinMpsIO m;
    1278     std::string fn = netlibDir+"brandy";
     1283    std::string fn = mpsDir+"brandy";
    12791284    m.readMps(fn.c_str(),"mps");
    12801285    ClpSimplex solution;
  • trunk/Clp/test/Makefile.am

    r915 r1088  
    1515# We are using the CLP solver executable to do the unit test
    1616test: ../src/clp$(EXEEXT)
    17         cd ../../Data/Netlib; $(MAKE) uncompress
    18         ../src/clp$(EXEEXT) -unitTest -netlib -netlibp
     17        if test x"$(DIRNETLIB)" != x; then \
     18                NETLIBARG="-dirNetlib $(DIRNETLIB) -netlib"; \
     19        fi; \
     20        if test x"$(DIRSAMPLE)" != x; then \
     21                SAMPLEARG="-dirSample $(DIRSAMPLE)"; \
     22        fi; \
     23        ../src/clp$(EXEEXT) $$SAMPLEARG -unitTest $$NETLIBARG
    1924
    2025.PHONY: test
  • trunk/Clp/test/Makefile.in

    r915 r1088  
    371371# We are using the CLP solver executable to do the unit test
    372372test: ../src/clp$(EXEEXT)
    373         cd ../../Data/Netlib; $(MAKE) uncompress
    374         ../src/clp$(EXEEXT) -unitTest -netlib -netlibp
     373        if test x"$(DIRNETLIB)" != x; then \
     374                NETLIBARG="-dirNetlib $(DIRNETLIB) -netlib"; \
     375        fi; \
     376        if test x"$(DIRSAMPLE)" != x; then \
     377                SAMPLEARG="-dirSample $(DIRSAMPLE)"; \
     378        fi; \
     379        ../src/clp$(EXEEXT) $$SAMPLEARG -unitTest $$NETLIBARG
    375380
    376381.PHONY: test
Note: See TracChangeset for help on using the changeset viewer.