Ignore:
Timestamp:
May 29, 2011 7:25:38 AM (9 years ago)
Author:
fmargot
Message:

Couenne/src/main/BonCouenne.cpp: add ifdef FM_RES for storing results of
several runs; Best value found and required tolearance now printed at the
end of the run.

Couenne/src/branch/CouenneChooseStrong.hpp: add minDepthPrint_ to the class;
add method gutsOfSetupList() to the class.

Couenne/src/branch/CouenneChooseStrong.cpp: add minDepthPrint_ to the class;
complete rewrite of CouenneChooseStrong::chooseVariable(), treating carefully
OsiSimpleInteger? objects to avoid inconsistant branching; new version is used
only if FM_MOD is defined, otherwise the older version is used (for comparison
purposes); add method gutsOfSetupList() to give the option of selecting objects
according to priority and usefulness more precisely than
Bonmin::BonChooseVariable::setupList(); add ifdef FM_SORT_STRONG
to activate sorting when FM_MOD is set. Add debugging ifdefs TRACE_STRONG
and TRACE_STRONG2.

Couenne/src/branch/doStrongBranching.cpp: Modif. doStrongBranching() to
make sure that OsiSimpleInteger? objects for which the branching point is
outside the current solver bounds do not enlarge the feasible set when branched
on; make sure that bounds from solver and from problem are intersected.
Add debugging ifdefs TRACE_STRONG and TRACE_STRONG2.

Couenne/src/problem/CouenneProblem.hpp/cpp: add lastPrioSort_ and corresp.
set/get methods.

Couenne/src/problem/CouenneProblemConstructors.hpp: add lastPrioSort_.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/main/BonCouenne.cpp

    r577 r586  
    6666  }
    6767}
     68
     69//#define FM_FRES
    6870
    6971int main (int argc, char *argv[]) {
     
    277279      switch (retcomp) {
    278280      case -1: printf("No solution found\n"); break;
    279       case 0: printf("Best solution found by Cbc\n"); break;
    280       case 1: printf("Best solution found by Couenne\n"); break;
     281      case 0: printf("Best solution found by Cbc  Value: %10.4f  Tolerance: %10g\n", modCbcSolVal, modCbcSolMaxViol); break;
     282      case 1: printf("Best solution found by Couenne  Value: %10.4f  Tolerance: %10g\n", modCouenneSolVal, modCouenneSolMaxViol); break;
    281283      default: break; // never happens
    282284      }
     
    296298#endif /* FM_TRACE_OPTSOL */
    297299
     300#ifdef FM_FRES
     301    if(cp != NULL) {
     302      FILE *f_res = fopen("fres.xxx", "a");
     303      char *pbName, shortName[256]; 
     304     
     305      pbName = strdup(cp -> problemName ().c_str ());
     306      char *f_name_pos = strrchr(pbName, '/');
     307      if(f_name_pos != NULL) {
     308        strcpy(shortName, &(f_name_pos[1]));
     309      }
     310      else {
     311        strcpy(shortName, pbName);
     312      }
     313     
     314      fprintf(f_res, "%20s %10.4f", shortName, cbcLb);
     315      if(foundSol) {
     316        fprintf(f_res, " %10.4f", printObj);
     317      }
     318      else {
     319        fprintf(f_res, "         *");
     320      }
     321      fprintf(f_res, " %10d %10.4f\n", bb.numNodes (),
     322              CoinCpuTime () - time_start);
     323      fclose(f_res);
     324    }
     325#endif
    298326
    299327    // retrieve test value to check
Note: See TracChangeset for help on using the changeset viewer.