Changeset 132


Ignore:
Timestamp:
May 9, 2009 5:30:30 PM (13 years ago)
Author:
pbelotti
Message:

merged changes from trunk/131 on bound tightening. Not yet solved optimum cutting in reformulated stockcycle

Location:
stable/0.1/Couenne/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • stable/0.1/Couenne/src/bound_tightening/boundTightening.cpp

    r25 r132  
    5353
    5454    if ((ntightened < 0) || (nbwtightened < 0)) {
    55       Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING, "infeasible BT\n");
     55      Jnlst()->Printf(J_ITERSUMMARY, J_BOUNDTIGHTENING, "infeasible BT\n");
    5656      return false;
    5757    }
     
    7979
    8080      // final test
    81       if ((Lb (i) > Ub (i) + COUENNE_EPS) ||
     81      if ((Lb (i) > Ub (i) + COUENNE_EPS * (1 + CoinMin (fabs (Lb (i)), fabs (Ub (i))))) ||
    8282          (Ub (i) < - MAX_BOUND) ||
    8383          (Lb (i) >   MAX_BOUND)) {
    8484
    85         Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING, "final test: infeasible BT\n");
     85        Jnlst()->Printf(J_ITERSUMMARY, J_BOUNDTIGHTENING, "final test: infeasible BT\n");
    8686        return false;
    8787      }
  • stable/0.1/Couenne/src/bound_tightening/fake_tightening.cpp

    r111 r132  
    137137      feasible  = btCore (f_chg),             // true if feasible with fake bound
    138138      betterbds = Lb (objind) > getCutOff (); // true if over cutoff
    139      
    140139
    141140#ifdef DEBUG
     
    243242  }
    244243
    245 
    246244  Jnlst()->Printf(Ipopt::J_VECTOR, J_BOUNDTIGHTENING, "\n");
    247245  if (tightened)
  • stable/0.1/Couenne/src/bound_tightening/impliedBounds.cpp

    r1 r132  
    3737        (variables_ [i] -> Multiplicity () > 0)) {
    3838
    39       if (Lb (i) > Ub (i) + COUENNE_EPS) {
    40         Jnlst()->Printf(Ipopt::J_DETAILED, J_BOUNDTIGHTENING,
    41                         "  implied bounds: w_%d has infeasible bounds [%g,%g]\n",
    42                         i, Lb (i), Ub (i));
     39      if (Lb (i) > Ub (i) + COUENNE_EPS * (1 + CoinMin (fabs (Lb (i)), fabs (Ub (i))))) {
     40        Jnlst () -> Printf (Ipopt::J_DETAILED, J_BOUNDTIGHTENING,
     41                            "  implied bounds: w_%d has infeasible bounds [%g,%g]\n",
     42                            i, Lb (i), Ub (i));
    4343        return -1;
    4444      }
     
    8080                          i, l0, u0, Lb (i), Ub (i));
    8181
    82           variables_ [i]             -> print (std::cout);
     82          variables_ [i] -> print (std::cout);
    8383
    8484          if (Jnlst()->ProduceOutput(Ipopt::J_MATRIX, J_BOUNDTIGHTENING)) {
  • stable/0.1/Couenne/src/bound_tightening/obbt.cpp

    r1 r132  
    172172    while (!notImproved &&
    173173           (nIter++ < MAX_OBBT_ITER) &&
    174            ((nImprov = obbtInner (csi, cs, chg_bds, babInfo)) > 0)) {
    175 
    176       if (CoinCpuTime () > maxCpuTime_)
    177         break;
     174           ((nImprov = obbtInner (csi, cs, chg_bds, babInfo)) > 0) &&
     175           (CoinCpuTime () < maxCpuTime_)) {
    178176
    179177      int nchanged, *changed = NULL;
  • stable/0.1/Couenne/src/bound_tightening/tightenBounds.cpp

    r1 r132  
    5252    // early test to avoid a loop
    5353
    54     if ((Lb (i) > Ub (i) + COUENNE_EPS) ||
     54    if ((Lb (i) > Ub (i) + COUENNE_EPS * (1 + CoinMin (fabs (Lb (i)), fabs (Ub (i))))) ||
    5555        (Ub (i) < - MAX_BOUND) ||
    5656        (Lb (i) >   MAX_BOUND)) {
    5757
    58       if (Jnlst()->ProduceOutput(J_DETAILED, J_BOUNDTIGHTENING)) {
    59 
    60         Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING,
     58      if (Jnlst()->ProduceOutput(J_ITERSUMMARY, J_BOUNDTIGHTENING)) {
     59
     60        Jnlst()->Printf(J_ITERSUMMARY, J_BOUNDTIGHTENING,
    6161                        "pre-check: w_%d has infeasible bounds [%.10e,%.10e]. ", i, Lb (i), Ub (i));
    6262
    63         if (Jnlst()->ProduceOutput(J_VECTOR, J_BOUNDTIGHTENING)) {
     63        if (Jnlst()->ProduceOutput(J_DETAILED, J_BOUNDTIGHTENING)) {
    6464          Var (i) -> Lb () -> print (std::cout);
    65           Jnlst()->Printf(J_VECTOR, J_BOUNDTIGHTENING," --- ");
     65          Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING," --- ");
    6666          Var (i) -> Ub () -> print (std::cout);
    6767        }
    68 
    69         Jnlst()->Printf(J_DETAILED, J_BOUNDTIGHTENING,"\n");
    7068      }
    7169
     
    7371    }
    7472
    75     if (Var (i) -> Type         () == AUX) {
     73    if (Var (i) -> Type () == AUX) {
    7674        // TODO: also test if any indep variable of this expression
    7775        // have changed. If not, skip
     
    8886      }
    8987
    90       if (ll > uu + COUENNE_EPS) {
     88      if (ll - uu > COUENNE_EPS * (1 + CoinMin (fabs (ll), fabs (uu)))) {
    9189
    9290        if (Jnlst()->ProduceOutput(J_DETAILED, J_BOUNDTIGHTENING)) {
     
    144142        Lb (i) = ll;
    145143
    146         if (ll > Ub (i) + COUENNE_EPS) {
     144        if (ll > Ub (i) + COUENNE_EPS * (1. + CoinMin (fabs (ll), fabs (Ub (i))))) {
    147145          Jnlst () -> Printf (J_DETAILED, J_BOUNDTIGHTENING,
    148146                              "just-check: w_%d has infeasible bounds [%g,%g]. ", i, Lb (i), Ub (i));
  • stable/0.1/Couenne/src/main/BonCouenneInterface.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/problem/CouenneProblem.hpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/problem/CouenneSolverInterface.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/problem/getIntegerCandidate.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/readnl/invmap.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/readnl/nl2e.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • stable/0.1/Couenne/src/readnl/readnl.cpp

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.