Changeset 884


Ignore:
Timestamp:
Aug 3, 2012 9:40:41 AM (7 years ago)
Author:
pbelotti
Message:

addendum to previous commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/interfaces/CouenneTNLP.cpp

    r719 r884  
    222222    exprVar *e = problem_ -> Var (i);
    223223
    224     CouNumber
    225       lb = e -> lb (),
    226       ub = e -> ub ();
    227 
    228     // prevent ipopt from exiting on inconsistent bounds
    229     if (lb <= ub) {*x_l++ = lb; *x_u++ = ub;}
    230     else          {*x_l++ = ub; *x_u++ = lb;}
     224    if (e -> Multiplicity () <= 0)
     225      *x_l++ = *x_u++ = 0.;
     226    else {
     227
     228      CouNumber
     229        lb = e -> lb (),
     230        ub = e -> ub ();
     231
     232      // prevent ipopt from exiting on inconsistent bounds
     233      if (lb <= ub) {*x_l++ = lb; *x_u++ = ub;}
     234      else          {*x_l++ = ub; *x_u++ = lb;}
     235    }
    231236
    232237    if ((e -> Type () != AUX) ||
     
    278283      Ipopt::TNLP::NON_LINEAR :
    279284      Ipopt::TNLP::LINEAR;
    280  }
     285  }
    281286
    282287  // auxiliaries
Note: See TracChangeset for help on using the changeset viewer.