Ignore:
Timestamp:
Mar 8, 2010 2:06:18 PM (11 years ago)
Author:
pbelotti
Message:

introducing semi-auxiliaries, i.e., variables defined with an inequality constraint. Instead of w := f(x), they can be defined as w >= f(x) or w <= f(x). Saves on number of auxiliary variables and constraints in the linearization. NOTE: Not totally stable yet, optima can be wrong.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/standardize/standardize.cpp

    r306 r307  
    66 * Purpose: standardize all expressions in a problem
    77 *
    8  * (C) Carnegie-Mellon University, 2006-09.
     8 * (C) Carnegie-Mellon University, 2006-10.
    99 * This file is licensed under the Common Public License (CPL)
    1010 */
     
    325325       i != variables_.end (); ++i)
    326326
    327     if ((*i) -> Type () == AUX) {
     327    if (((*i) -> Type () == AUX) && ((*i) -> sign () == expression::EQ)) {
    328328
    329329      int type = (*i) -> Image () -> Type ();
     
    398398    if ((Var (i) -> Multiplicity () > 0) &&
    399399        (Var (i) -> Type () == AUX) &&
    400         (Var (i) -> Image () -> isInteger ()))
     400        (Var (i) -> Image () -> isInteger ()) &&
     401        (Var (i) -> sign () == expression::EQ))
    401402      Var (i) -> setInteger (true);
    402403
Note: See TracChangeset for help on using the changeset viewer.