Ignore:
Timestamp:
Apr 6, 2011 9:28:52 AM (9 years ago)
Author:
forrest
Message:

a bit of debug and try and save memory in OsiClp?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpPresolve.cpp

    r1703 r1721  
    442442#ifdef COIN_PRESOLVE_BUG
    443443static int counter=1000000;
     444static int startEmptyRows=0;
     445static int startEmptyColumns=0;
    444446static bool break2(CoinPresolveMatrix *prob)
    445447{
     448  int droppedRows = prob->countEmptyRows() - startEmptyRows ;
     449  int droppedColumns =  prob->countEmptyCols() - startEmptyColumns;
     450  startEmptyRows=prob->countEmptyRows();
     451  startEmptyColumns=prob->countEmptyCols();
     452  printf("Dropped %d rows and %d columns - current empty %d, %d\n",droppedRows,
     453         droppedColumns,startEmptyRows,startEmptyColumns);
    446454  counter--;
    447455  if (!counter) {
     
    464472     CoinMessages messages = CoinMessage(prob->messages().language());
    465473     paction_ = 0;
    466 
     474#ifndef PRESOLVE_DETAIL
     475     if (prob->tuning_) {
     476#endif
     477       int numberEmptyRows=0;
     478       for ( int i=0;i<prob->nrows_;i++) {
     479         if (!prob->hinrow_[i]) {
     480           PRESOLVE_DETAIL_PRINT(printf("pre_empty row %d\n",i));
     481           //printf("pre_empty row %d\n",i);
     482           numberEmptyRows++;
     483         }
     484       }
     485       int numberEmptyCols=0;
     486       for ( int i=0;i<prob->ncols_;i++) {
     487         if (!prob->hincol_[i]) {
     488           PRESOLVE_DETAIL_PRINT(printf("pre_empty col %d\n",i));
     489           //printf("pre_empty col %d\n",i);
     490           numberEmptyCols++;
     491         }
     492       }
     493       printf("CoinPresolve initial state %d empty rows and %d empty columns\n",
     494              numberEmptyRows,numberEmptyCols);
     495#ifndef PRESOLVE_DETAIL
     496     }
     497#endif
    467498     prob->status_ = 0; // say feasible
    468499     paction_ = make_fixed(prob, paction_);
Note: See TracChangeset for help on using the changeset viewer.