Changeset 830


Ignore:
Timestamp:
Feb 10, 2012 1:02:11 PM (8 years ago)
Author:
pbelotti
Message:

merging change 828 from trunk (avoid probing with ridiculous bounds)

Location:
stable/0.4/Couenne/src/bound_tightening
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/0.4/Couenne/src/bound_tightening

  • stable/0.4/Couenne/src/bound_tightening/fake_tightening.cpp

    r802 r830  
    3737    if (ub >  LARGE_BOUND) { // ]-inf,+inf[
    3838
    39       return (!direction ? -sqrt (-lb) : sqrt (ub));
     39      return (!direction ? -LARGE_BOUND / AGGR_DIV : LARGE_BOUND / AGGR_DIV);
     40
     41      //return (!direction ? -sqrt (-lb) : sqrt (ub));
    4042
    4143      //if (fabs (x) < COUENNE_EPS) return (direction ? AGGR_MUL : - AGGR_MUL);
     
    4547
    4648      if (!direction)
    47         return -sqrt (-lb); // try to tighten interval from a very large value
     49        return -LARGE_BOUND / AGGR_DIV; //-sqrt (-lb); // try to tighten interval from a very large value
    4850
    4951      if      (x < -COUENNE_EPS) return (CoinMin (0., (x+ub)/2));
     
    6062
    6163      if (direction)
    62         return sqrt (ub);
     64        return LARGE_BOUND / AGGR_DIV; //sqrt (ub);
    6365
    6466      if      (x < -COUENNE_EPS) return ((x - (x-lb) / AGGR_DIV));
     
    112114  // (with relative expense) but not the derivative.
    113115
    114   jnlst_ -> Printf (Ipopt::J_ERROR, J_BOUNDTIGHTENING,
    115                     "  x_%d.  x = %10g, lb = %g, cutoff = %g-----------------\n",
    116                     index,xcur,objind >= 0 ? Lb (objind) : 0., getCutOff());
     116  jnlst_ -> Printf (Ipopt::J_ERROR, J_BOUNDTIGHTENING, "  x_%d.  x = %10g, lb = %g, cutoff = %g-----------------\n", index,xcur,objind >= 0 ? Lb (objind) : 0., getCutOff());
    117117
    118118  /*if (index == objind)
     
    174174
    175175    bool
    176       feasible  = btCore (f_chg),                           // true if feasible with fake bound
     176      feasible  = btCore (f_chg),                                            // true if feasible with fake bound
    177177      betterbds = objind >= 0 && (Lb (objind) > getCutOff () + COUENNE_EPS); // true if over cutoff
    178178
    179     jnlst_ -> Printf (Ipopt::J_ERROR, J_BOUNDTIGHTENING,
    180                       " [%10g,%10g] lb = %g {fea=%d,btr=%d} ",
    181                       Lb (index), Ub (index), objind >= 0 ? Lb (objind) : 0., feasible,betterbds);
     179    jnlst_ -> Printf (Ipopt::J_ERROR, J_BOUNDTIGHTENING, " [%10g,%10g] lb = %g {fea=%d,btr=%d} ", Lb (index), Ub (index), objind >= 0 ? Lb (objind) : 0., feasible,betterbds);
    182180
    183181    if (feasible && !betterbds) {
     
    325323
    326324  Jnlst()->Printf(Ipopt::J_MOREVECTOR, J_BOUNDTIGHTENING, "\n");
    327   if (tightened)
    328     Jnlst()->Printf(Ipopt::J_MOREVECTOR, J_BOUNDTIGHTENING,
    329                     "  [x%2d] pruned %s [%g, %g] -- lb = %g cutoff = %g\n",
    330                     index,direction?"right":"left",
    331                     olb[index],oub[index], objind >= 0 ? Lb (objind) : 0., getCutOff ());
     325  if (tightened) Jnlst()->Printf(Ipopt::J_MOREVECTOR, J_BOUNDTIGHTENING, "  [x%2d] pruned %s [%g, %g] -- lb = %g cutoff = %g\n", index,direction?"right":"left", olb[index],oub[index], objind >= 0 ? Lb (objind) : 0., getCutOff ());
    332326
    333327  return tightened ? 1 : 0;
Note: See TracChangeset for help on using the changeset viewer.