Changeset 538 for stable/1.1
- Timestamp:
- Feb 16, 2007 3:51:27 PM (14 years ago)
- Location:
- stable/1.1/Cbc/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/1.1/Cbc/src/CbcBranchActual.cpp
r310 r538 233 233 } 234 234 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); 236 236 numberMembers_=n2; 237 237 } … … 539 539 } 540 540 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); 542 542 numberMembers_=n2; 543 543 } -
stable/1.1/Cbc/src/CbcModel.cpp
r397 r538 941 941 if (!feasible) anyAction = -2 ; } 942 942 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 ; 944 949 newNode = NULL ; 945 950 feasible = false ; } } } … … 1031 1036 printf("Node %x on tree\n",newNode) ; 1032 1037 # endif 1038 newNode=NULL; 1033 1039 } else { 1034 1040 // continuous is integer … … 1487 1493 if ( anyAction >=0 ) { 1488 1494 assert (newNode); 1489 if (newNode->objectiveValue() >= getCutoff()) 1495 if (newNode->objectiveValue() >= getCutoff()) { 1490 1496 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 } 1491 1503 } 1492 1504 /* … … 1598 1610 printf("Node %x pushed on tree c\n",newNode) ; 1599 1611 # endif 1612 newNode=NULL; 1600 1613 } 1601 1614 else -
stable/1.1/Cbc/src/CbcNode.hpp
r303 r538 150 150 CbcNodeInfo * parent() const 151 151 {return parent_;}; 152 /// Set parent null 153 inline void nullParent() 154 { parent_=NULL;}; 152 155 153 156 void addCuts(OsiCuts & cuts,int numberToBranch, int * whichGenerator); -
stable/1.1/Cbc/src/CbcStrategy.cpp
r401 r538 353 353 OsiClpSolverInterface * clpSolver = dynamic_cast< OsiClpSolverInterface*> (solver); 354 354 ClpSimplex * lpSolver = clpSolver->getModelPtr(); 355 lpSolver->passInMessageHandler(solver->messageHandler()); 355 356 if (lpSolver->tightenPrimalBounds()==0) { 356 357 lpSolver->dual(); -
stable/1.1/Cbc/src/Cbc_ampl.cpp
r391 r538 24 24 ****************************************************************/ 25 25 26 #include "getstub.h" 26 #include "CbcConfig.h" 27 #ifdef HAVE_UNISTD_H 28 # include "unistd.h" 29 #endif 30 31 extern "C" { 32 # include "getstub.h" 33 } 34 27 35 #include "Cbc_ampl.h" 28 #include "unistd.h"29 36 #include <string> 30 37 #include <cassert> 38 #include "CoinSort.hpp" 31 39 /* so decodePhrase and clpCheck can access */ 32 40 static ampl_info * saveInfo=NULL; … … 72 80 } 73 81 static void 74 sos_kludge(int nsos, int *sosbeg, double *sosref )82 sos_kludge(int nsos, int *sosbeg, double *sosref,int * sosind) 75 83 { 76 84 // Adjust sosref if necessary to make monotonic increasing 77 85 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 } 78 92 double t, t1; 79 93 for(i = j = 0; i++ < nsos; ) { … … 316 330 info->sosIndices = (int *) malloc(nsosnz*sizeof(int)); 317 331 info->sosReference = (double *) malloc(nsosnz*sizeof(double)); 318 sos_kludge(nsos, sosbeg, sosref );332 sos_kludge(nsos, sosbeg, sosref,sosind); 319 333 for (int i=0;i<nsos;i++) { 320 334 int ichar = sostype[i]; … … 402 416 } else { 403 417 /* all slack basis */ 418 // leave status for output */ 419 #if 0 404 420 free(info->rowStatus); 405 421 info->rowStatus=NULL; 406 422 free(info->columnStatus); 407 423 info->columnStatus=NULL; 424 #endif 408 425 } 409 426 /* add -solve - unless something there already
Note: See TracChangeset
for help on using the changeset viewer.