Changeset 325


Ignore:
Timestamp:
Apr 26, 2010 11:04:24 PM (10 years ago)
Author:
pbelotti
Message:

fixed reformulation bug

Location:
trunk/Couenne/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/expression/exprAux.cpp

    r312 r325  
    171171expression *exprAux::simplify () {
    172172
    173   if ((image_ -> Type () == AUX) ||
    174       (image_ -> Type () == VAR)) {
     173  if (((image_ -> Type () == AUX) ||
     174       (image_ -> Type () == VAR)) &&
     175      sign_ == expression::EQ) {
    175176
    176177    --multiplicity_;
  • trunk/Couenne/src/standardize/auxiliarize.cpp

    r312 r325  
    9999
    100100    if (((*i) -> Type () == AUX) &&                  // replace in all aux's image
    101         //((*i) -> Multiplicity () > 0) &&             // this variable is actually used
     101        ((*i) -> Multiplicity () > 0) &&             // this variable is actually used
    102102        ((*i) -> Index () != (*orig) -> Index ())) { // skip same variable
    103103
    104104#ifdef DEBUG
    105       printf ("replacing aux "); (*i) -> print ();
    106       printf (" := "); (*i) -> Image () -> print ();
     105      printf ("replacing aux "); fflush (stdout); (*i) -> print ();
     106      printf (" := "); fflush (stdout); (*i) -> Image () -> print ();
    107107      printf ("\n");
    108108#endif
  • trunk/Couenne/src/standardize/splitAux.cpp

    r312 r325  
    137137
    138138        // prefer non-integer. If integer, only take it if none chosen yet
    139         if ((!(lcoe [i].first -> isInteger ()) || (which==1)) && 
    140             (j > maxindex) &&
     139        if ((j > maxindex) &&
    141140            !(wentAux [j]) &&
    142             (fabs (lcoe [i]. second) > COUENNE_EPS)) {
     141            (fabs (lcoe [i]. second) > COUENNE_EPS) &&
     142            (!(lcoe [i].first -> isInteger ()) || (which==1))) {
    143143
    144144          // fake cut in linind and check dependence. Only mark if
  • trunk/Couenne/src/standardize/standardize.cpp

    r312 r325  
    149149
    150150#ifdef DEBUG
     151    printf ("############# problem status now:\n");
     152    print ();
    151153    printf ("############# Constraint ");
    152154    (*i) -> print ();
Note: See TracChangeset for help on using the changeset viewer.