Changeset 232


Ignore:
Timestamp:
Jan 17, 2006 2:13:22 PM (14 years ago)
Author:
forrest
Message:

messages

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcHeuristic.cpp

    r208 r232  
    8686      solver2->resolve();
    8787      CbcModel model(*solver2);
    88       if (logLevel==1)
     88      if (logLevel<=1)
    8989        model.setLogLevel(0);
    9090      else
  • trunk/CbcHeuristicFPump.cpp

    r201 r232  
    178178      solver->setDblParam(OsiObjOffset,saveOffset);
    179179      double newSolutionValue = direction*solver->OsiSolverInterface::getObjValue();
    180       printf(" - solution found\n");
     180      if (solver->messageHandler()->logLevel())
     181        printf(" - solution found\n");
    181182      newLineNeeded=false;
    182183      if (newSolutionValue<solutionValue) {
     
    227228      if (matched || numberPasses%100 == 0) {
    228229         // perturbation
    229          printf("Perturbation applied");
     230        if (solver->messageHandler()->logLevel())
     231          printf("Perturbation applied");
    230232         newLineNeeded=true;
    231233         for (i=0;i<numberIntegers;i++) {
     
    274276      solver->setDblParam(OsiObjOffset,-offset);
    275277      solver->resolve();
    276       printf("\npass %3d: obj. %10.5lf --> ", numberPasses,solver->getObjValue());
     278      if (solver->messageHandler()->logLevel())
     279        printf("\npass %3d: obj. %10.5lf --> ", numberPasses,solver->getObjValue());
    277280      newLineNeeded=true;
    278281
    279282    }
    280283  } // END WHILE
    281   if (newLineNeeded)
     284  if (newLineNeeded&&solver->messageHandler()->logLevel())
    282285    printf(" - no solution found\n");
    283286  delete solver;
     
    363366
    364367  if (nnv > nn) nnv = nn;
    365   if (iter != 0) printf("up = %5d , down = %5d", flip_up, flip_down); fflush(stdout);
     368  if (iter != 0&&solver->messageHandler()->logLevel())
     369    printf("up = %5d , down = %5d", flip_up, flip_down); fflush(stdout);
    366370  *flip = flip_up + flip_down;
    367371  delete [] tmp;
    368372
    369373  if (*flip == 0 && iter != 0) {
    370      printf(" -- rand = %4d (%4d) ", nnv, nn);
     374    if(solver->messageHandler()->logLevel())
     375      printf(" -- rand = %4d (%4d) ", nnv, nn);
    371376     for (i = 0; i < nnv; i++) solution[list[i]] = 1. - solution[list[i]];
    372377     *flip = nnv;
    373   } else printf(" ");
     378  } else if (solver->messageHandler()->logLevel()) {
     379    printf(" ");
     380  }
    374381  delete [] list; delete [] val;
    375382  iter++;
Note: See TracChangeset for help on using the changeset viewer.