Couenne 0.5.8
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
17namespace Couenne {
18
20
21 class exprMultiLin: public exprMul {
22
23 public:
24
27
30
32 CouNumber gradientNorm (const double *x);
33
36
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
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
#define COUENNE_INFINITY
Cut Generator for linear convexifications.
OsiObject for auxiliary variables $w=f(x)$.
Class for MINLP problems with symbolic information.
Auxiliary variable.
class for multiplications,
another class for multiplications,
virtual void closestFeasible(expression *varind, expression *vardep, CouNumber &left, CouNumber &right) const
compute and for Violation Transfer algorithm
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
exprMultiLin(expression *, expression *)
Constructor with two arguments.
expression * simplify()
simplification
virtual exprAux * standardize(CouenneProblem *p, bool addAux=true)
reduce expression in standard form, creating additional aux variables (and constraints)
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's arguments
virtual enum expr_type code()
code for comparison
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
CouNumber gradientNorm(const double *x)
return l-2 norm of gradient at given point
CouNumber balancedMul(const OsiBranchingInformation *info, int index, int wind)
balanced strategy for branching point selection in products
exprMultiLin(expression **, int)
Constructor.
virtual int Linearity()
get a measure of "how linear" the expression is:
bool impliedBound(int, CouNumber *, CouNumber *, t_chg_bounds *, enum Couenne::expression::auxSign=Couenne::expression::AUX_EQ)
implied bound processing
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
virtual bool isCuttable(CouenneProblem *problem, int index) const
can this expression be further linearized or are we on its concave ("bad") side
virtual void getBounds(CouNumber &lb, CouNumber &ub)
Get value of lower and upper bound of an expression (if any)
expression * differentiate(int index)
differentiation
Expression base class.
auxSign
"sign" of the constraint defining an auxiliary.
status of lower/upper bound of a variable, to be checked/modified in bound tightening
general include file for different compilers
double CouNumber
main number type in Couenne
expr_type
code returned by the method expression::code()