Changeset 538 for stable/1.1/Cbc/src


Ignore:
Timestamp:
Feb 16, 2007 3:51:27 PM (13 years ago)
Author:
forrest
Message:

out messages

Location:
stable/1.1/Cbc/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • stable/1.1/Cbc/src/CbcBranchActual.cpp

    r310 r538  
    233233  }
    234234  if (n2<numberMembers_) {
    235     printf("** SOS number of members reduced from %d to %d!\n",numberMembers_,n2);
     235    //printf("** SOS number of members reduced from %d to %d!\n",numberMembers_,n2);
    236236    numberMembers_=n2;
    237237  }
     
    539539  }
    540540  if (n2<numberMembers_) {
    541     printf("** SOS number of members reduced from %d to %d!\n",numberMembers_,n2);
     541    //printf("** SOS number of members reduced from %d to %d!\n",numberMembers_,n2);
    542542    numberMembers_=n2;
    543543  }
  • stable/1.1/Cbc/src/CbcModel.cpp

    r397 r538  
    941941      if (!feasible) anyAction = -2 ; }
    942942      if (anyAction == -2||newNode->objectiveValue() >= cutoff)
    943       { delete newNode ;
     943      {
     944        if (anyAction != -2) {
     945          // zap parent nodeInfo
     946          newNode->nodeInfo()->nullParent();
     947        }
     948        delete newNode ;
    944949        newNode = NULL ;
    945950        feasible = false ; } } }
     
    10311036      printf("Node %x on tree\n",newNode) ;
    10321037#     endif
     1038      newNode=NULL;
    10331039    } else {
    10341040      // continuous is integer
     
    14871493        if ( anyAction >=0 ) {
    14881494          assert (newNode);
    1489           if (newNode->objectiveValue() >= getCutoff())
     1495          if (newNode->objectiveValue() >= getCutoff()) {
    14901496            anyAction = -2; // say bad after all
     1497#ifdef COIN_DEVELOP
     1498            printf("zapping2 CbcNodeInfo %x\n",newNode->nodeInfo()->parent());
     1499#endif
     1500            // zap parent nodeInfo
     1501            newNode->nodeInfo()->nullParent();
     1502          }
    14911503        }
    14921504/*
     
    15981610            printf("Node %x pushed on tree c\n",newNode) ;
    15991611#           endif
     1612            newNode=NULL;
    16001613          }
    16011614          else
  • stable/1.1/Cbc/src/CbcNode.hpp

    r303 r538  
    150150  CbcNodeInfo * parent() const
    151151  {return parent_;};
     152  /// Set parent null
     153  inline void nullParent()
     154  { parent_=NULL;};
    152155
    153156  void addCuts(OsiCuts & cuts,int numberToBranch, int * whichGenerator);
  • stable/1.1/Cbc/src/CbcStrategy.cpp

    r401 r538  
    353353        OsiClpSolverInterface * clpSolver = dynamic_cast< OsiClpSolverInterface*> (solver);
    354354        ClpSimplex * lpSolver = clpSolver->getModelPtr();
     355        lpSolver->passInMessageHandler(solver->messageHandler());
    355356        if (lpSolver->tightenPrimalBounds()==0) {
    356357          lpSolver->dual();
  • stable/1.1/Cbc/src/Cbc_ampl.cpp

    r391 r538  
    2424****************************************************************/
    2525
    26 #include "getstub.h"
     26#include "CbcConfig.h"
     27#ifdef HAVE_UNISTD_H
     28# include "unistd.h"
     29#endif
     30
     31extern "C" {
     32# include "getstub.h"
     33}
     34
    2735#include "Cbc_ampl.h"
    28 #include "unistd.h"
    2936#include <string>
    3037#include <cassert>
     38#include "CoinSort.hpp"
    3139/* so decodePhrase and clpCheck can access */
    3240static ampl_info * saveInfo=NULL;
     
    7280}
    7381static void
    74 sos_kludge(int nsos, int *sosbeg, double *sosref)
     82sos_kludge(int nsos, int *sosbeg, double *sosref,int * sosind)
    7583{
    7684  // Adjust sosref if necessary to make monotonic increasing
    7785  int i, j, k;
     86  // first sort
     87  for (i=0;i<nsos;i++) {
     88    k = sosbeg[i];
     89    int end=sosbeg[i+1];
     90    CoinSort_2(sosref+k,sosref+end,sosind+k);
     91  }
    7892  double t, t1;
    7993  for(i = j = 0; i++ < nsos; ) {
     
    316330      info->sosIndices = (int *) malloc(nsosnz*sizeof(int));
    317331      info->sosReference = (double *) malloc(nsosnz*sizeof(double));
    318       sos_kludge(nsos, sosbeg, sosref);
     332      sos_kludge(nsos, sosbeg, sosref,sosind);
    319333      for (int i=0;i<nsos;i++) {
    320334        int ichar = sostype[i];
     
    402416  } else {
    403417    /* all slack basis */
     418    // leave status for output */
     419#if 0
    404420    free(info->rowStatus);
    405421    info->rowStatus=NULL;
    406422    free(info->columnStatus);
    407423    info->columnStatus=NULL;
     424#endif
    408425  }
    409426  /* add -solve - unless something there already
Note: See TracChangeset for help on using the changeset viewer.