Ignore:
Location:
stable/2.9/Cbc/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • stable/2.9/Cbc/src/CbcModel.cpp

    r2212 r2194  
    16441644    dblParam_[CbcLargestChange] = 0.0;
    16451645    intParam_[CbcNumberBranches] = 0;
    1646     double lastBestPossibleObjective=-COIN_DBL_MAX;
    16471646    // when to check for restart
    16481647    int nextCheckRestart=50;
     
    24532452      that produced a given cut.
    24542453    */
    2455 #define INITIAL_MAXIMUM_WHICH 1000
    2456     maximumWhich_ = INITIAL_MAXIMUM_WHICH ;
     2454    maximumWhich_ = 1000 ;
    24572455    delete [] whichGenerator_;
    24582456    whichGenerator_ = new int[maximumWhich_] ;
     
    36173615      // mark all cuts as globally valid
    36183616      int numberCuts=cuts.sizeRowCuts();
    3619       resizeWhichGenerator(0,numberCuts);
    36203617      for (int i=0;i<numberCuts;i++) {
    36213618        cuts.rowCutPtr(i)->setGloballyValid();
     
    46574654#endif
    46584655            if (!intParam_[CbcPrinting]) {
    4659                 // Parallel may not have any nodes
    4660                 if (!nNodes)
    4661                   bestPossibleObjective_ = lastBestPossibleObjective;
    4662                 else
    4663                   lastBestPossibleObjective = bestPossibleObjective_;
    46644656                messageHandler()->message(CBC_STATUS, messages())
    4665                   << numberNodes_ << CoinMax(nNodes,1) << bestObjective_ << bestPossibleObjective_
     4657                << numberNodes_ << nNodes << bestObjective_ << bestPossibleObjective_
    46664658                << getCurrentSeconds()
    46674659                << CoinMessageEol ;
     
    55175509        preferredWay_(0),
    55185510        currentPassNumber_(0),
    5519         maximumWhich_(INITIAL_MAXIMUM_WHICH),
     5511        maximumWhich_(1000),
    55205512        maximumRows_(0),
    55215513        randomSeed_(-1),
     
    56875679        preferredWay_(0),
    56885680        currentPassNumber_(0),
    5689         maximumWhich_(INITIAL_MAXIMUM_WHICH),
     5681        maximumWhich_(1000),
    56905682        maximumRows_(0),
    56915683        randomSeed_(-1),
     
    71507142        }
    71517143    }
    7152     resizeWhichGenerator(currentNumberCuts_,currentNumberCuts);
    71537144    currentNumberCuts_ = currentNumberCuts;
    71547145    if (currentNumberCuts > maximumNumberCuts_) {
     
    73417332                           numberRowsAtContinuous_ + numberToAdd);
    73427333#         endif
    7343                     assert (i<maximumWhich_);
    73447334                    whichGenerator_[numberToAdd] = whichGenerator_[i];
    73457335                    addCuts[numberToAdd++] = addedCuts_[i];
     
    76557645{
    76567646    if (numberAfter > maximumWhich_) {
    7657 #define MAXIMUM_WHICH_INCREMENT 100
    7658 #define MAXIMUM_WHICH_MULTIPLIER 2
    7659       //printf("maximumWhich from %d to %d (%d needed)\n",maximumWhich_,
    7660       //     CoinMax(maximumWhich_ * MAXIMUM_WHICH_MULTIPLIER + MAXIMUM_WHICH_INCREMENT, numberAfter),
    7661       //     numberAfter);
    7662         maximumWhich_ = CoinMax(maximumWhich_ * MAXIMUM_WHICH_MULTIPLIER + MAXIMUM_WHICH_INCREMENT, numberAfter) ;
    7663         //maximumWhich_ = numberAfter ;
     7647        maximumWhich_ = CoinMax(maximumWhich_ * 2 + 100, numberAfter) ;
    76647648        int * temp = new int[2*maximumWhich_] ;
    76657649        memcpy(temp, whichGenerator_, numberNow*sizeof(int)) ;
     
    1793517919                delete [] newSolution;
    1793617920                // Space for type of cuts
    17937                 maximumWhich_ = INITIAL_MAXIMUM_WHICH;
     17921                maximumWhich_ = 1000;
    1793817922                delete [] whichGenerator_ ;
    1793917923                whichGenerator_ = new int[maximumWhich_];
     
    1850818492      that produced a given cut.
    1850918493    */
    18510     maximumWhich_ = INITIAL_MAXIMUM_WHICH ;
     18494    maximumWhich_ = 1000 ;
    1851118495    delete [] whichGenerator_ ;
    1851218496    whichGenerator_ = new int[maximumWhich_] ;
  • stable/2.9/Cbc/src/CbcModel.hpp

    r2212 r2194  
    23202320        maximumNumberIterations_ = value;
    23212321    }
     2322#ifdef COIN_HAS_NTY
    23222323    /// Symmetry information
    23232324    inline CbcSymmetry * symmetryInfo() const
    23242325    { return symmetryInfo_;} 
     2326#endif
    23252327    /// Set depth for fast nodes
    23262328    inline void setFastNodeDepth(int value) {
     
    27682770    CbcEventHandler *eventHandler_ ;
    27692771# endif
    2770    /// Symmetry information
    2771     CbcSymmetry * symmetryInfo_;
     2772#ifdef COIN_HAS_NTY
     2773  /// Symmetry information
     2774  CbcSymmetry * symmetryInfo_;
     2775#endif
    27722776    /// Total number of objects
    27732777    int numberObjects_;
  • stable/2.9/Cbc/src/CbcSolver.cpp

    r2212 r2194  
    70747074                                if (babModel_->isProvenOptimal()) {
    70757075                                    integerStatus = 0;
    7076                                 } else if (!babModel_->bestSolution()) {
     7076                                } else {
    70777077                                    // infeasible
    70787078                                    integerStatus = 6;
     
    72387238                                    }
    72397239
    7240                                     if (!saveSolver->isProvenOptimal()) {
    7241                                       generalMessageHandler->message(CLP_GENERAL, generalMessages)
    7242                                         << "Accuracy problem on post-processing - maybe try without pre-processing"
    7243                                         << CoinMessageEol;
    7244                                     }
    7245                                     //assert (saveSolver->isProvenOptimal());
     7240                                    assert (saveSolver->isProvenOptimal());
    72467241#ifndef CBC_OTHER_SOLVER
    72477242                                    // and original solver
  • stable/2.9/Cbc/src/CbcSymmetry.cpp

    r2212 r2194  
    1010 */
    1111//#define PRINT_MORE 1
    12 
    13 #include "CbcConfig.h"
     12#include <stdio.h>
    1413
    1514#ifdef COIN_HAS_NTY
    1615
    17 extern "C" {
    18 #include "nauty.h"
    19 #include "nausparse.h"
    20 #ifdef NTY_TRACES
    21 #include "traces.h"
    22 #endif
    23 }
    24 
    25 #include <stdio.h>
    2616#include <cassert>
    2717#include <vector>
     
    3323#include "CbcBranchingObject.hpp"
    3424#include "CoinTime.hpp"
    35 #define NAUTY_MAX_LEVEL 0
     25#define NAUTY_MAX_LEVEL 2000
    3626#if NAUTY_MAX_LEVEL
    3727extern int nauty_maxalllevel;
     
    5242static double nautyOtherBranches_ = 0.0;
    5343
    54 void CbcSymmetry::Node::node(int i, double c , double l, double u, int cod, int s){
     44void Node::node(int i, double c , double l, double u, int cod, int s){
    5545  index = i;
    5646  coeff = c;
  • stable/2.9/Cbc/src/CbcSymmetry.hpp

    r2212 r2194  
    5454class CbcNauty;
    5555
    56 
    57 
    58 #define COUENNE_HACKED_EPS      1.e-07
    59 #define COUENNE_HACKED_EPS_SYMM 1e-8
    60 #define COUENNE_HACKED_EXPRGROUP 8
    61 
    62 
    63 /** Class to deal with symmetry
    64  *
    65  *  Hacked from Couenne
    66  *  Thanks, but it had been nice to make sure that there are no symbol collisions when building Couenne with this Cbc.
    67  */
    68 
    69 class CbcSymmetry {
    7056  class Node{
    7157    int index;
     
    8975  };
    9076
     77#define COUENNE_HACKED_EPS      1.e-07
     78#define COUENNE_HACKED_EPS_SYMM 1e-8
     79#define COUENNE_HACKED_EXPRGROUP 8
     80
    9181  struct myclass0 {
    9282    inline bool operator() (register const Node &a, register const Node &b) {
     
    116106  {return strcmp (a, b) < 0;}
    117107};
     108
     109/** Class to deal with symmetry
     110 *
     111 *  Hacked from Couenne
     112 */
     113
     114class CbcSymmetry {
    118115
    119116 public:
  • stable/2.9/Cbc/src/Makefile.am

    r2212 r2194  
    119119bin_PROGRAMS =
    120120AM_CPPFLAGS = $(COINDEPEND_CFLAGS) $(CLP_CFLAGS) $(CPX_CFLAGS) $(ASL_CFLAGS)
    121 
    122 if COIN_HAS_NTY
    123 AM_CPPFLAGS += -I$(NTYINCDIR)
    124 endif
    125121
    126122########################################################################
  • stable/2.9/Cbc/src/Makefile.in

    r2212 r2194  
    4646host_triplet = @host@
    4747bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
    48 @COIN_HAS_NTY_TRUE@am__append_1 = -I$(NTYINCDIR)
    4948
    5049########################################################################
     
    5453# Name of the executable compiled in this directory.  We want it to be
    5554# installed in the 'bin' directory
    56 @COIN_HAS_CLP_TRUE@am__append_2 = cbc
     55@COIN_HAS_CLP_TRUE@am__append_1 = cbc
    5756
    5857########################################################################
     
    6261# Name of the executable compiled in this directory.  We want it to be
    6362# installed in the 'bin' directory
    64 @CBC_BUILD_CBC_GENERIC_TRUE@am__append_3 = cbc-generic
     63@CBC_BUILD_CBC_GENERIC_TRUE@am__append_2 = cbc-generic
    6564
    6665# List all additionally required solver and Osi libraries
    6766# the linker flags for all available LP solvers should already be included in $CBCGENERIC_LIBS,
    6867# so just add compiler flags here (all we can think of)
    69 @CBC_BUILD_CBC_GENERIC_TRUE@am__append_4 = $(DYLP_CFLAGS) $(GLPK_CFLAGS) $(MSK_CFLAGS) $(SPX_CFLAGS) $(VOL_CFLAGS) $(XPR_CFLAGS)
     68@CBC_BUILD_CBC_GENERIC_TRUE@am__append_3 = $(DYLP_CFLAGS) $(GLPK_CFLAGS) $(MSK_CFLAGS) $(SPX_CFLAGS) $(VOL_CFLAGS) $(XPR_CFLAGS)
    7069subdir = src
    7170DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
     
    266265COIN_HAS_NETLIB_FALSE = @COIN_HAS_NETLIB_FALSE@
    267266COIN_HAS_NETLIB_TRUE = @COIN_HAS_NETLIB_TRUE@
    268 COIN_HAS_NTY_FALSE = @COIN_HAS_NTY_FALSE@
    269 COIN_HAS_NTY_TRUE = @COIN_HAS_NTY_TRUE@
    270267COIN_HAS_OSITESTS_FALSE = @COIN_HAS_OSITESTS_FALSE@
    271268COIN_HAS_OSITESTS_TRUE = @COIN_HAS_OSITESTS_TRUE@
     
    374371NETLIB_LIBS = @NETLIB_LIBS@
    375372NETLIB_LIBS_INSTALLED = @NETLIB_LIBS_INSTALLED@
    376 NTYINCDIR = @NTYINCDIR@
    377 NTYLIB = @NTYLIB@
    378373OBJEXT = @OBJEXT@
    379374OPT_CFLAGS = @OPT_CFLAGS@
     
    623618# List additional defines
    624619AM_CPPFLAGS = $(COINDEPEND_CFLAGS) $(CLP_CFLAGS) $(CPX_CFLAGS) \
    625         $(ASL_CFLAGS) $(am__append_1) $(am__append_4) \
    626         -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
     620        $(ASL_CFLAGS) $(am__append_3) -DCOIN_NO_CLP_MESSAGE \
     621        -DUSE_CBCCONFIG
    627622
    628623# List all source files for this executable, including headers
  • stable/2.9/Cbc/src/OsiCbc/Makefile.in

    r2212 r2194  
    191191COIN_HAS_NETLIB_FALSE = @COIN_HAS_NETLIB_FALSE@
    192192COIN_HAS_NETLIB_TRUE = @COIN_HAS_NETLIB_TRUE@
    193 COIN_HAS_NTY_FALSE = @COIN_HAS_NTY_FALSE@
    194 COIN_HAS_NTY_TRUE = @COIN_HAS_NTY_TRUE@
    195193COIN_HAS_OSITESTS_FALSE = @COIN_HAS_OSITESTS_FALSE@
    196194COIN_HAS_OSITESTS_TRUE = @COIN_HAS_OSITESTS_TRUE@
     
    299297NETLIB_LIBS = @NETLIB_LIBS@
    300298NETLIB_LIBS_INSTALLED = @NETLIB_LIBS_INSTALLED@
    301 NTYINCDIR = @NTYINCDIR@
    302 NTYLIB = @NTYLIB@
    303299OBJEXT = @OBJEXT@
    304300OPT_CFLAGS = @OPT_CFLAGS@
  • stable/2.9/Cbc/src/config.h.in

    r2212 r2194  
    5858/* Define to 1 if the Netlib package is available */
    5959#undef COIN_HAS_NETLIB
    60 
    61 /* Define to 1 if the Nauty package is available */
    62 #undef COIN_HAS_NTY
    6360
    6461/* Define to 1 if the OsiTests package is available */
  • stable/2.9/Cbc/src/config_cbc_default.h

    r2212 r2194  
    66
    77/* Version number of project */
    8 #define CBC_VERSION "2.9.6"
     8#define CBC_VERSION "2.9.5"
    99
    1010/* Major Version number of project */
     
    1515
    1616/* Release Version number of project */
    17 #define CBC_VERSION_RELEASE 6
     17#define CBC_VERSION_RELEASE 5
Note: See TracChangeset for help on using the changeset viewer.