33 #ifndef CBC_SYMMETRY_HPP 34 #define CBC_SYMMETRY_HPP 37 #include "nausparse.h" 52 #define NTY_BAD_DEPTH 10 56 #define COUENNE_HACKED_EPS 1.e-07 57 #define COUENNE_HACKED_EPS_SYMM 1e-8 58 #define COUENNE_HACKED_EXPRGROUP 8 77 void node(
int,
double,
double,
double,
int,
int);
78 inline void color_vertex(
register int k) { color = k; }
79 inline int get_index()
const {
return index; }
80 inline double get_coeff()
const {
return coeff; }
81 inline double get_lb()
const {
return lb; }
82 inline double get_ub()
const {
return ub; }
83 inline int get_color()
const {
return color; }
84 inline int get_code()
const {
return code; }
85 inline int get_sign()
const {
return sign; }
86 inline void bounds(
register double a,
register double b)
94 inline bool operator()(
register const Node &a,
register const Node &b)
102 inline bool operator()(
register const Node &a,
register const Node &b)
104 return (a.get_index() < b.get_index());
108 struct less_than_str {
109 inline bool operator()(
register const char *a,
register const char *b)
const 111 return strcmp(a, b) < 0;
147 return numberUsefulOrbits_ ? whichOrbit_ : NULL;
151 return numberUsefulOrbits_;
155 return numberUsefulObjects_;
157 int largestOrbit(
const double *lower,
const double *upper)
const;
158 void ChangeBounds(
const double *lower,
const double *upper,
159 int numberColumns,
bool justFixedAtOne)
const;
160 inline bool compare(
register Node &a,
register Node &b)
const;
170 mutable std::vector< Node > node_info_;
173 int numberUsefulOrbits_;
174 int numberUsefulObjects_;
193 CbcNauty(
int n,
const size_t *v,
const int *d,
const int *e);
205 void addElement(
int ix,
int jx);
206 void clearPartitions();
208 void deleteElement(
int ix,
int jx);
210 void insertRHS(
int rhs,
int cons) { constr_rhs.insert(std::pair< int, int >(rhs, cons)); }
212 double getGroupSize()
const;
216 int getN()
const {
return n_; }
218 int getNumGenerators()
const;
219 int getNumOrbits()
const;
222 std::vector< std::vector< int > > *getOrbits()
const;
224 void getVstat(
double *v,
int nv);
227 return GSparse_ != NULL;
232 return stats_->errstatus;
239 inline optionblk *options()
const 254 void setWriteAutoms(
const std::string &afilename);
255 void unsetWriteAutoms();
260 sparsegraph *GSparse_;
269 TracesOptions *options_;
286 std::multimap< int, int > constr_rhs;
287 std::multimap< int, int >::iterator it;
289 std::pair< std::multimap< int, int >::iterator,
290 std::multimap< int, int >::iterator >
311 int numberExtra,
const int *extraToZero);
327 virtual double branch();
330 virtual void fix(OsiSolverInterface *solver,
331 double *lower,
double *upper,
332 int branchState)
const;
345 virtual void print();
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
void color_node(int ix, int color)
std::vector< int > * Find_Orbit(int) const
#define COUENNE_HACKED_EPS_SYMM
void setupSymmetry(CbcModel *model)
empty if no NTY, symmetry data structure setup otherwise
void ChangeBounds(const double *lower, const double *upper, int numberColumns, bool justFixedAtOne) const
Branching object for Orbital branching.
bool compare(register Node &a, register Node &b) const
~CbcSymmetry()
Destructor.
int statsOrbits(CbcModel *model, int type) const
Class to deal with symmetry.
void Compute_Symmetry() const
Abstract branching object base class Now just difference with OsiBranchingObject. ...
void Print_Orbits() const
virtual void previousBranch()
Reset every information so that the branching object appears to point to the previous child...
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object...
virtual void print() const
Print something about branch - only if log level high.
void insertRHS(int rhs, int cons)
int numberUsefulObjects() const
int largestOrbit(const double *lower, const double *upper) const
virtual void previousBranch()
Reset every information so that the branching object appears to point to the previous child...
CbcSymmetry & operator=(const CbcSymmetry &rhs)
Assignment operator.
int orbitalFixing(OsiSolverInterface *solver)
Fixes variables using orbits (returns number fixed)
Simple Branch and bound class.
CbcSymmetry()
Default constructor.
int numberUsefulOrbits() const