Changeset 881


Ignore:
Timestamp:
Aug 2, 2012 5:27:19 AM (7 years ago)
Author:
pbelotti
Message:

fix for constraint turning out -x=0

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

Legend:

Unmodified
Added
Removed
  • stable/0.4/Couenne/src/standardize/constrStandardize.cpp

    r846 r881  
    8787    //printf ("REST [%d] [%g,%g]: ", wind, p -> Lb (wind), p -> Ub (wind)); rest -> print (); printf ("\n");
    8888
    89     if (wind >= 0) { // this IS the definition of an auxiliary variable w = f(x)
     89    if (wind >= 0) { // this IS the definition of an auxiliary variable, w [ <= | >= | = ] f(x)
    9090
    9191      // simplify expression (you never know)
    9292
    9393      expression *restSimple = Simplified (rest);
    94 
    95       // -> simplify ();
    9694
    9795      // if (restSimple) {
     
    110108        if (aSign != expression::AUX_GEQ) p -> Var (wind) -> ub () = constRHS;
    111109
    112         delete rest;
     110        //delete rest;
    113111        return NULL;
    114112      }
  • stable/0.4/Couenne/src/standardize/splitAux.cpp

    r846 r881  
    478478  if (jnlst_ -> ProduceOutput (Ipopt::J_ALL, J_REFORMULATE)) {
    479479    printf   ("  Standardize rest (2nd level). Rest: "); fflush (stdout); rest -> print ();
    480     printf ("\n                                Body: "); fflush (stdout); body -> print (); printf ("]\n");
     480    printf ("\n                                Body: "); fflush (stdout); body -> print ();
    481481  }
    482482
     
    501501
    502502  if (jnlst_ -> ProduceOutput (Ipopt::J_ALL, J_REFORMULATE))
    503     {printf (" ==> "); rest -> print (); printf ("\n");}
     503    {printf (" ==> (%d)", auxInd); rest -> print (); printf ("\n");}
    504504
    505505  return auxInd;
Note: See TracChangeset for help on using the changeset viewer.