Couenne  0.5.8
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 
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
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 
148  const OsiBranchingInformation* info, int way) const;
149 
151  //exprVar *Reference () const
152  //{return reference_;}
153 };
154 
155 }
156 
157 #endif
OsiObject
Couenne::CouenneSOSBranchingObject
Definition: CouenneSOSObject.hpp:27
OsiBranchingObject.hpp
Couenne::CouenneSOSObject::problem_
CouenneProblem * problem_
pointer to Couenne problem
Definition: CouenneSOSObject.hpp:100
Couenne::CouenneSOSBranchingObject::doFBBT_
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
Definition: CouenneSOSObject.hpp:43
Couenne::CouenneSOSObject::reference_
exprVar * reference_
The (auxiliary) variable this branching object refers to.
Definition: CouenneSOSObject.hpp:105
OsiTwoWayBranchingObject::way
int way() const
Couenne
general include file for different compilers
Definition: CouenneAggrProbing.hpp:24
Couenne::CouenneSOSObject::doConvCuts_
bool doConvCuts_
shall we add convexification cuts at branching?
Definition: CouenneSOSObject.hpp:114
Couenne::CouenneSOSBranchingObject::reference_
exprVar * reference_
The (auxiliary) variable this branching object refers to.
Definition: CouenneSOSObject.hpp:37
Couenne::CouenneSOSBranchingObject::CouenneSOSBranchingObject
CouenneSOSBranchingObject(CouenneProblem *p, exprVar *ref, OsiSolverInterface *solver, const OsiSOS *originalObject, int way, double separator, JnlstPtr jnlst, bool doFBBT, bool doConvCuts)
Definition: CouenneSOSObject.hpp:54
Couenne::CouenneSOSObject
Definition: CouenneSOSObject.hpp:95
Couenne::CouenneSOSBranchingObject::problem_
CouenneProblem * problem_
pointer to Couenne problem
Definition: CouenneSOSObject.hpp:32
Ipopt::SmartPtr< Ipopt::Journalist >
Couenne::CouenneSOSBranchingObject::CouenneSOSBranchingObject
CouenneSOSBranchingObject()
Definition: CouenneSOSObject.hpp:51
Couenne::CouenneSOSBranchingObject::CouenneSOSBranchingObject
CouenneSOSBranchingObject(const CouenneSOSBranchingObject &src)
Definition: CouenneSOSObject.hpp:73
Couenne::exprVar
variable-type operator
Definition: CouenneExprVar.hpp:45
OsiSolverInterface
Couenne::CouenneSOSObject::jnlst_
JnlstPtr jnlst_
SmartPointer to the Journalist.
Definition: CouenneSOSObject.hpp:108
OsiSOS
Couenne::CouenneSOSObject::clone
virtual OsiObject * clone() const
Cloning method.
Definition: CouenneSOSObject.hpp:143
Couenne::CouenneSOSObject::createBranch
OsiBranchingObject * createBranch(OsiSolverInterface *si, const OsiBranchingInformation *info, int way) const
create branching objects
OsiSOS::weights
const double * weights() const
OsiBranchingInformation
Couenne::CouenneSOSBranchingObject::doConvCuts_
bool doConvCuts_
shall we add convexification cuts at branching?
Definition: CouenneSOSObject.hpp:46
Couenne::CouenneSOSBranchingObject::jnlst_
JnlstPtr jnlst_
SmartPointer to the Journalist.
Definition: CouenneSOSObject.hpp:40
OsiBranchingObject::originalObject
const OsiObject * originalObject() const
OsiBranchingObject
OsiSOSBranchingObject
OsiSOSBranchingObject::branch
virtual double branch()
Couenne::CouenneProblem
Class for MINLP problems with symbolic information.
Definition: CouenneProblem.hpp:169
Couenne::CouenneSOSObject::CouenneSOSObject
CouenneSOSObject(const CouenneSOSObject &src)
Copy constructor.
Definition: CouenneSOSObject.hpp:134
Couenne::CouenneSOSBranchingObject::clone
virtual OsiBranchingObject * clone() const
Clone.
Definition: CouenneSOSObject.hpp:83
Couenne::CouenneSOSObject::doFBBT_
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
Definition: CouenneSOSObject.hpp:111
Couenne::CouenneSOSObject::CouenneSOSObject
CouenneSOSObject(OsiSolverInterface *solver, int nelem, int *indices, double *weights, int type, CouenneProblem *problem, exprVar *ref, JnlstPtr jnlst, bool doFBBT, bool doConvCuts)
Definition: CouenneSOSObject.hpp:118
CouenneJournalist.hpp