Changeset 579


Ignore:
Timestamp:
May 22, 2011 3:22:21 AM (9 years ago)
Author:
pbelotti
Message:

fixing iterator termination condition in symmetry code. Adding small absolute value to cutoff in order to really cut off (thanks to F. Margot for pointing this out). Minor fix in TwoImpl? output

Location:
trunk/Couenne/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/problem/CouenneSymmetry.cpp

    r533 r579  
    318318      //printf ("Graph vertex %d is given color %d\n", (*i).get_index(), color);
    319319      nauty_info -> color_node((*i).get_index(), color);
    320       for (std::vector <Node>:: iterator j = i+1; j <= node_info. end (); ++j)
     320      for (std::vector <Node>:: iterator j = i+1; j != node_info. end (); ++j)
    321321        if( compare( (*i) , (*j) ) ==1){
    322322          (*j).color_vertex(color);
  • trunk/Couenne/src/problem/problem.cpp

    r490 r579  
    4343const CouNumber SafeCutoff = 1e-4;
    4444
     45// absolute difference
     46const CouNumber SafeDelta = 1e-2;
     47
    4548/// initialize auxiliary variables from original variables in the
    4649/// nonlinear problem
     
    349352  cutoff = (Var (indobj) -> isInteger ()) ?
    350353    floor (cutoff + COUENNE_EPS) :
    351     (cutoff + SafeCutoff * (1. + fabs(cutoff)));  // tolerance needed to retain feasibility
     354    (cutoff + CoinMin (SafeDelta, SafeCutoff * (1. + fabs (cutoff))));  // tolerance needed to retain feasibility
    352355
    353356  if (cutoff < Ub (indobj))
  • trunk/Couenne/src/two_implied_bt/TwoImpliedGenCuts.cpp

    r577 r579  
    716716
    717717        if (problem_ -> bestSol () &&
    718             problem_ -> bestSol () [i] > oldUB [i] &&
    719             problem_ -> bestSol () [i] < cub   [i]) {
     718            problem_ -> bestSol () [i] < oldUB [i] &&
     719            problem_ -> bestSol () [i] > cub   [i]) {
    720720
    721721          jnlst_ -> Printf (J_ERROR, J_COUENNE,
     
    747747    delete [] valLB;
    748748    delete [] valUB;
    749   }
     749
     750    ntightened = ntightenedL + ntightenedU;
     751  }
    750752
    751753  else
Note: See TracChangeset for help on using the changeset viewer.