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
15#include "CouenneJournalist.hpp"
16
17namespace Couenne {
18
19class CouenneProblem;
20class CouenneSOSObject;
21class 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
29protected:
30
33
38
41
43 bool doFBBT_;
44
47
48public:
49
50 // Default Constructor
52
53 // Useful constructor
55 exprVar *ref,
56 OsiSolverInterface *solver,
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_),
77 jnlst_ (src.jnlst_),
78 doFBBT_ (src.doFBBT_),
80
81
83 virtual OsiBranchingObject * clone() const
84 {return new CouenneSOSBranchingObject (*this);}
85
87 virtual double branch (OsiSolverInterface * solver);
88};
89
90
94
95class CouenneSOSObject: public OsiSOS {
96
97protected:
98
101
106
109
112
115
116public:
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_),
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
Class for MINLP problems with symbolic information.
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
CouenneProblem * problem_
pointer to Couenne problem
CouenneSOSBranchingObject(CouenneProblem *p, exprVar *ref, OsiSolverInterface *solver, const OsiSOS *originalObject, int way, double separator, JnlstPtr jnlst, bool doFBBT, bool doConvCuts)
bool doConvCuts_
shall we add convexification cuts at branching?
exprVar * reference_
The (auxiliary) variable this branching object refers to.
JnlstPtr jnlst_
SmartPointer to the Journalist.
virtual double branch(OsiSolverInterface *solver)
Does next branch and updates state.
virtual OsiBranchingObject * clone() const
Clone.
CouenneSOSBranchingObject(const CouenneSOSBranchingObject &src)
virtual OsiObject * clone() const
Cloning method.
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
JnlstPtr jnlst_
SmartPointer to the Journalist.
CouenneSOSObject(const CouenneSOSObject &src)
Copy constructor.
bool doConvCuts_
shall we add convexification cuts at branching?
exprVar * reference_
The (auxiliary) variable this branching object refers to.
OsiBranchingObject * createBranch(OsiSolverInterface *si, const OsiBranchingInformation *info, int way) const
create branching objects
CouenneProblem * problem_
pointer to Couenne problem
CouenneSOSObject(OsiSolverInterface *solver, int nelem, int *indices, double *weights, int type, CouenneProblem *problem, exprVar *ref, JnlstPtr jnlst, bool doFBBT, bool doConvCuts)
variable-type operator
const OsiObject * originalObject() const
const double * weights() const
general include file for different compilers