Ignore:
Timestamp:
Apr 17, 2011 11:08:40 AM (8 years ago)
Author:
forrest
Message:

out some printf statements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcSolverHeuristics.cpp

    r1573 r1641  
    127127            double time1 = CoinCpuTime();
    128128            originalClpSolver->initialSolve();
    129             printf("first solve took %g seconds\n", CoinCpuTime() - time1);
     129            COIN_DETAIL_PRINT(printf("first solve took %g seconds\n", CoinCpuTime() - time1));
    130130            double * columnLower = originalLpSolver->columnLower() ;
    131131            double * columnUpper = originalLpSolver->columnUpper() ;
     
    154154                }
    155155            }
    156             printf("%d artificials fixed, %d left as in solution\n", nFix, nArt);
     156            COIN_DETAIL_PRINT(printf("%d artificials fixed, %d left as in solution\n", nFix, nArt));
    157157            lpSolver = pinfo.presolvedModel(*originalLpSolver, 1.0e-8, true, 10);
    158158            if (!lpSolver || doAction == 2) {
     
    583583                }
    584584            }
     585#ifdef COIN_DETAIL
    585586            if (numberLayered) {
    586                 printf("%d (%d integer) at priority %d\n", numberLayered, numberInteger, 1 + (jLayer / 100));
     587                printf("%d (%d integer) at priority %d\n", numberLayered, numberInteger, 1 + (jLayer / 100));
    587588                char buffer[50];
    588589                for (int i = 1; i < nCheck; i++) {
     
    598599                }
    599600            }
     601#endif
    600602        }
    601603    }
     
    746748                    jLayer += 100;
    747749                }
    748                 printf("This fixes %d variables in lower priorities\n", nTotalFixed);
     750                COIN_DETAIL_PRINT(printf("This fixes %d variables in lower priorities\n", nTotalFixed));
    749751                break;
    750752            }
     
    795797            }
    796798            if (toZero || toOne)
    797                 printf("%d at 0 fixed and %d at one fixed\n", toZero, toOne);
    798             printf("%d variables free, %d fixed to 0, %d to 1 - smallest %g, largest %g\n",
    799                    numberFree, atZero, atOne, smallest, largest);
     799              COIN_DETAIL_PRINT(printf("%d at 0 fixed and %d at one fixed\n", toZero, toOne));
     800            COIN_DETAIL_PRINT(printf("%d variables free, %d fixed to 0, %d to 1 - smallest %g, largest %g\n",
     801                                     numberFree, atZero, atOne, smallest, largest));
    800802            if (numberGreater && !iPass)
    801                 printf("%d variables have value > 1.0\n", numberGreater);
     803              COIN_DETAIL_PRINT(printf("%d variables have value > 1.0\n", numberGreater));
    802804            //skipZero2=0; // leave 0 fixing
    803805            int jLayer = 0;
     
    830832                jLayer += 100;
    831833            }
    832             printf("This fixes %d variables in lower priorities\n", nTotalFixed);
     834            COIN_DETAIL_PRINT(printf("This fixes %d variables in lower priorities\n", nTotalFixed));
    833835            if (iLargest < 0 || numberFree <= leaveIntFree)
    834836                break;
     
    868870            crunchIt(lpSolver);
    869871            double moveObj = lpSolver->objectiveValue() - saveObj;
    870             printf("movement %s was %g costing %g\n",
    871                    (way == -1) ? "down" : "up", movement, moveObj);
     872            COIN_DETAIL_PRINT(printf("movement %s was %g costing %g\n",
     873                                     (way == -1) ? "down" : "up", movement, moveObj));
    872874            if (way == -1 && (moveObj >= maxCostUp || lpSolver->status())) {
    873875                // go up
     
    897899        }
    898900        lpSolver->dual();
    899         printf("Fixing took %g seconds\n", CoinCpuTime() - time1);
     901        COIN_DETAIL_PRINT(printf("Fixing took %g seconds\n", CoinCpuTime() - time1));
    900902        columnLower = lpSolver->columnLower();
    901903        columnUpper = lpSolver->columnUpper();
     
    10091011                }
    10101012            }
    1011             printf("%d fixed %d orig 0 %d 1\n", nFixed, nFixed0, nFixed1);
     1013            COIN_DETAIL_PRINT(printf("%d fixed %d orig 0 %d 1\n", nFixed, nFixed0, nFixed1));
    10121014            int jLayer = 0;
    10131015            nFixed = -1;
     
    10491051                }
    10501052            }
    1051             printf("This fixes %d variables in lower priorities - total %d (%d integer) - all target %d, int target %d\n",
    1052                    nTotalFixed, nFixed, nFixedI, static_cast<int>(fractionFixed*numberColumns), static_cast<int> (fractionIntFixed*numberInteger));
     1053            COIN_DETAIL_PRINT(printf("This fixes %d variables in lower priorities - total %d (%d integer) - all target %d, int target %d\n",
     1054                                     nTotalFixed, nFixed, nFixedI, static_cast<int>(fractionFixed*numberColumns), static_cast<int> (fractionIntFixed*numberInteger)));
    10531055            int nBad = 0;
    10541056            int nRelax = 0;
     
    10561058                if (lo[iColumn] < columnLower[iColumn] ||
    10571059                        up[iColumn] > columnUpper[iColumn]) {
    1058                     printf("bad %d old %g %g, new %g %g\n", iColumn, lo[iColumn], up[iColumn],
    1059                            columnLower[iColumn], columnUpper[iColumn]);
     1060                    COIN_DETAIL_PRINT(printf("bad %d old %g %g, new %g %g\n", iColumn, lo[iColumn], up[iColumn],
     1061                                             columnLower[iColumn], columnUpper[iColumn]));
    10601062                    nBad++;
    10611063                }
     
    10651067                }
    10661068            }
    1067             printf("%d relaxed\n", nRelax);
     1069            COIN_DETAIL_PRINT(printf("%d relaxed\n", nRelax));
    10681070            if (iRelax > 20 && nRelax == chunk)
    10691071                nRelax = 0;
     
    11281130            doAction++;
    11291131    }
    1130     printf("%d fixed by vub preprocessing\n", doAction);
     1132    COIN_DETAIL_PRINT(printf("%d fixed by vub preprocessing\n", doAction));
    11311133    if (originalColumns) {
    11321134        originalLpSolver->initialSolve();
Note: See TracChangeset for help on using the changeset viewer.