Couenne  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CouenneExprMultiLin.hpp
Go to the documentation of this file.
1 /* $Id: CouenneExprMultiLin.hpp 615 2011-06-08 20:36:24Z pbelotti $
2  *
3  * Name: CouenneExprMultilin.hpp
4  * Author: Pietro Belotti
5  * Purpose: Multilinear terms
6  *
7  * This file is licensed under the Eclipse Public License (EPL)
8  */
9 
10 #ifndef COUENNE_EXPRMULTILIN_H
11 #define COUENNE_EXPRMULTILIN_H
12 
13 #include <vector>
14 
15 #include "CouenneExprOp.hpp"
16 
17 namespace Couenne {
18 
20 
21  class exprMultiLin: public exprMul {
22 
23  public:
24 
26  exprMultiLin (expression **, int);
27 
30 
32  CouNumber gradientNorm (const double *x);
33 
35  expression *differentiate (int index);
36 
38  expression *simplify ();
39 
41  virtual int Linearity ();
42 
44  virtual void getBounds (expression *&, expression *&);
45 
47  virtual void getBounds (CouNumber &lb, CouNumber &ub);
48 
51  virtual exprAux *standardize (CouenneProblem *p, bool addAux = true);
52 
54  void generateCuts (expression *w, //const OsiSolverInterface &si,
55  OsiCuts &cs, const CouenneCutGenerator *cg,
56  t_chg_bounds * = NULL, int = -1,
59 
61  virtual enum expr_type code ()
62  {return COU_EXPRMUL;}
63 
66 
69  virtual CouNumber selectBranch (const CouenneObject *obj,
70  const OsiBranchingInformation *info,
71  expression * &var,
72  double * &brpts,
73  double * &brDist, // distance of current LP
74  // point to new convexifications
75  int &way);
76 
78  virtual void closestFeasible (expression *varind,
79  expression *vardep,
80  CouNumber &left,
81  CouNumber &right) const;
82  protected:
83 
85  int impliedBoundMul (CouNumber wl,
86  CouNumber wu,
87  std::vector <CouNumber> &xl,
88  std::vector <CouNumber> &xu,
89  std::vector <std::pair <int, CouNumber> > &nl,
90  std::vector <std::pair <int, CouNumber> > &nu);
91 
93  CouNumber balancedMul (const OsiBranchingInformation *info, int index, int wind);
94 
97  virtual bool isCuttable (CouenneProblem *problem, int index) const
98  {return false;} // concave on both sides, as for products
99  };
100 }
101 
102 #endif
Cut Generator for linear convexifications.
bool impliedBound(int, CouNumber *, CouNumber *, t_chg_bounds *, enum Couenne::expression::auxSign=Couenne::expression::AUX_EQ)
implied bound processing
virtual exprAux * standardize(CouenneProblem *p, bool addAux=true)
reduce expression in standard form, creating additional aux variables (and constraints) ...
OsiObject for auxiliary variables $w=f(x)$.
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
void generateCuts(expression *w, OsiCuts &cs, const CouenneCutGenerator *cg, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY)
generate equality between *this and *w
CouNumber gradientNorm(const double *x)
return l-2 norm of gradient at given point
virtual int Linearity()
get a measure of &quot;how linear&quot; the expression is:
CouNumber balancedMul(const OsiBranchingInformation *info, int index, int wind)
balanced strategy for branching point selection in products
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
auxSign
&quot;sign&quot; of the constraint defining an auxiliary.
Class for MINLP problems with symbolic information.
virtual bool isCuttable(CouenneProblem *problem, int index) const
can this expression be further linearized or are we on its concave (&quot;bad&quot;) side
double CouNumber
main number type in Couenne
virtual void closestFeasible(expression *varind, expression *vardep, CouNumber &left, CouNumber &right) const
compute and for Violation Transfer algorithm
#define COUENNE_INFINITY
Auxiliary variable.
expression * differentiate(int index)
differentiation
expr_type
code returned by the method expression::code()
int impliedBoundMul(CouNumber wl, CouNumber wu, std::vector< CouNumber > &xl, std::vector< CouNumber > &xu, std::vector< std::pair< int, CouNumber > > &nl, std::vector< std::pair< int, CouNumber > > &nu)
inferring bounds on factors of a product
Expression base class.
exprMultiLin(expression **, int)
Constructor.
another class for multiplications,
virtual enum expr_type code()
code for comparison
expression * simplify()
simplification
virtual CouNumber selectBranch(const CouenneObject *obj, const OsiBranchingInformation *info, expression *&var, double *&brpts, double *&brDist, int &way)
set up branching object by evaluating many branching points for each expression&#39;s arguments ...
class for multiplications,