# CouenneExprBinProd.hpp

Go to the documentation of this file.

    00001 /* $Id: CouenneExprBinProd.hpp 615 2011-06-08 20:36:24Z pbelotti $
    00002  *
    00003  * Name:    CouenneExprMultilin.hpp
    00004  * Author:  Pietro Belotti
    00005  * Purpose: Product of binary variables
    00006  *
    00007  * This file is licensed under the Eclipse Public License (EPL)
    00008  */
    00009
    00010 #ifndef COUENNE_EXPRBINPROD_H
    00011 #define COUENNE_EXPRBINPROD_H
    00012
    00013 #include <vector>
    00014
    00015 #include "CouenneExprOp.hpp"
    00016
    00017 namespace Couenne {
    00018
    00020
    00021   class exprBinProd: public exprMul {
    00022
    00023   public:
    00024
    00026     exprBinProd (expression **, int);
    00027
    00029     exprBinProd (expression *, expression *);
    00030
    00032     CouNumber gradientNorm (const double *x);
    00033
    00035     expression *differentiate (int index);
    00036
    00038     expression *simplify ();
    00039
    00041     virtual int Linearity ();
    00042
    00044     virtual void getBounds (expression *&, expression *&);
    00045
    00047     virtual void getBounds (CouNumber &lb, CouNumber &ub);
    00048
    00051     virtual exprAux *standardize (CouenneProblem *p, bool addAux = true);
    00052
    00054     void generateCuts (expression *w, //const OsiSolverInterface &si,
    00055                        OsiCuts &cs, const CouenneCutGenerator *cg,
    00056                        t_chg_bounds * = NULL, int = -1,
    00057                        CouNumber = -COUENNE_INFINITY,
    00058                        CouNumber =  COUENNE_INFINITY);
    00059
    00061     virtual enum expr_type code ()
    00062     {return COU_EXPRMUL;}
    00063
    00065     bool impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *, enum Couenne::expression::auxSign = Couenne::expression::AUX_EQ);
    00066
    00069     virtual CouNumber selectBranch (const CouenneObject *obj,
    00070                                     const OsiBranchingInformation *info,
    00071                                     expression * &var,
    00072                                     double * &brpts,
    00073                                     double * &brDist, // distance of current LP
    00074                                     // point to new convexifications
    00075                                     int &way);
    00076
    00078     virtual void closestFeasible (expression *varind,
    00079                                   expression *vardep,
    00080                                   CouNumber &left,
    00081                                   CouNumber &right) const;
    00082   protected:
    00083
    00085     CouNumber balancedMul (const OsiBranchingInformation *info, int index, int wind);
    00086
    00089     virtual bool isCuttable (CouenneProblem *problem, int index) const
    00090     {return false;} // concave on both sides, as for products
    00091   };
    00092 }
    00093
    00094 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines