Couenne  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CouenneSOSObject.hpp
Go to the documentation of this file.
1 /* $Id: CouenneSOSObject.hpp 490 2011-01-14 16:07:12Z pbelotti $
2  *
3  * Name: CouenneSOSObject.hpp
4  * Authors: Pietro Belotti, Lehigh University
5  * Purpose: SOS Object
6  *
7  * (C) Carnegie-Mellon University, 2008-09.
8  * This file is licensed under the Eclipse Public License (EPL)
9  */
10 
11 #ifndef COUENNESOSOBJECT_HPP
12 #define COUENNESOSOBJECT_HPP
13 
14 #include "OsiBranchingObject.hpp"
15 #include "CouenneJournalist.hpp"
16 
17 namespace Couenne {
18 
19 class CouenneProblem;
20 class CouenneSOSObject;
21 class exprVar;
22 
23 
24 // TODO: SOS of the form sum x_i \le k with k small. Instead of
25 // branching on a single variable do a SOS-like branching
26 
27 class CouenneSOSBranchingObject: public OsiSOSBranchingObject {
28 
29 protected:
30 
33 
38 
41 
43  bool doFBBT_;
44 
47 
48 public:
49 
50  // Default Constructor
52 
53  // Useful constructor
55  exprVar *ref,
56  OsiSolverInterface *solver,
57  const OsiSOS *originalObject,
58  int way,
59  double separator,
60  JnlstPtr jnlst,
61  bool doFBBT,
62  bool doConvCuts):
63 
64  OsiSOSBranchingObject (solver, originalObject, way, separator),
65  problem_ (p),
66  reference_ (ref),
67  jnlst_ (jnlst),
68  doFBBT_ (doFBBT),
69  doConvCuts_ (doConvCuts) {}
70 
71 
72  // Copy constructor
74  OsiSOSBranchingObject (src),
75  problem_ (src.problem_),
76  reference_ (src.reference_),
77  jnlst_ (src.jnlst_),
78  doFBBT_ (src.doFBBT_),
79  doConvCuts_ (src.doConvCuts_) {}
80 
81 
83  virtual OsiBranchingObject * clone() const
84  {return new CouenneSOSBranchingObject (*this);}
85 
87  virtual double branch (OsiSolverInterface * solver);
88 };
89 
90 
94 
95 class CouenneSOSObject: public OsiSOS {
96 
97 protected:
98 
101 
106 
109 
111  bool doFBBT_;
112 
115 
116 public:
117 
118  CouenneSOSObject (OsiSolverInterface *solver, int nelem, int *indices, double *weights, int type,
119  CouenneProblem *problem,
120  exprVar *ref,
121  JnlstPtr jnlst,
122  bool doFBBT,
123  bool doConvCuts):
124 
125  OsiSOS (solver, nelem, indices, weights, type),
126  problem_ (problem),
127  reference_ (ref),
128  jnlst_ (jnlst),
129  doFBBT_ (doFBBT),
130  doConvCuts_ (doConvCuts) {}
131 
132 
135  OsiSOS (src),
136  problem_ (src.problem_),
137  reference_ (src.reference_),
138  jnlst_ (src.jnlst_),
139  doFBBT_ (src.doFBBT_),
140  doConvCuts_ (src.doConvCuts_) {}
141 
143  virtual OsiObject * clone () const
144  {return new CouenneSOSObject (*this);}
145 
147  OsiBranchingObject *createBranch (OsiSolverInterface* si,
148  const OsiBranchingInformation* info, int way) const;
149 
151  //exprVar *Reference () const
152  //{return reference_;}
153 };
154 
155 }
156 
157 #endif
CouenneProblem * problem_
pointer to Couenne problem
exprVar * reference_
The (auxiliary) variable this branching object refers to.
CouenneSOSBranchingObject(CouenneProblem *p, exprVar *ref, OsiSolverInterface *solver, const OsiSOS *originalObject, int way, double separator, JnlstPtr jnlst, bool doFBBT, bool doConvCuts)
CouenneSOSObject(const CouenneSOSObject &src)
Copy constructor.
exprVar * reference_
The (auxiliary) variable this branching object refers to.
CouenneProblem * problem_
pointer to Couenne problem
bool doConvCuts_
shall we add convexification cuts at branching?
JnlstPtr jnlst_
SmartPointer to the Journalist.
Class for MINLP problems with symbolic information.
virtual OsiBranchingObject * clone() const
Clone.
JnlstPtr jnlst_
SmartPointer to the Journalist.
virtual double branch(OsiSolverInterface *solver)
Does next branch and updates state.
variable-type operator
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
virtual OsiObject * clone() const
Cloning method.
CouenneSOSObject(OsiSolverInterface *solver, int nelem, int *indices, double *weights, int type, CouenneProblem *problem, exprVar *ref, JnlstPtr jnlst, bool doFBBT, bool doConvCuts)
CouenneSOSBranchingObject(const CouenneSOSBranchingObject &src)
bool doConvCuts_
shall we add convexification cuts at branching?
OsiBranchingObject * createBranch(OsiSolverInterface *si, const OsiBranchingInformation *info, int way) const
create branching objects
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?