33 #ifndef CBC_SYMMETRY_HPP
34 #define CBC_SYMMETRY_HPP
37 #include "nausparse.h"
52 #define NTY_BAD_DEPTH 10
58 #define COUENNE_HACKED_EPS 1.e-07
59 #define COUENNE_HACKED_EPS_SYMM 1e-8
60 #define COUENNE_HACKED_EXPRGROUP 8
79 void node(
int,
double,
double,
double,
int,
int);
88 inline void bounds(
register double a,
register double b){
lb = a;
ub = b;}
115 inline bool operator() (
register const char *a,
register const char *b)
const
116 {
return strcmp (a, b) < 0;}
156 int largestOrbit(
const double * lower,
const double * upper)
const;
157 void ChangeBounds (
const double * lower,
const double * upper,
158 int numberColumns,
bool justFixedAtOne)
const;
159 inline bool compare (
register Node &a,
register Node &b)
const;
189 CbcNauty (
int n,
const size_t * v,
const int * d,
const int * e);
218 std::vector<std::vector<int> > *
getOrbits()
const;
224 {
return stats_->errstatus;}
269 std::multimap<int,int>::iterator
it;
271 std::pair<std::multimap<int,int>::iterator,
272 std::multimap<int,int>::iterator>
ret;
295 int numberExtra,
const int * extraToZero);
315 double * lower,
double * upper,
316 int branchState)
const ;
328 virtual void print();
Abstract branching object base class Now just difference with OsiBranchingObject. ...
bool operator()(register const Node &a, register const Node &b)
void ChangeBounds(const double *lower, const double *upper, int numberColumns, bool justFixedAtOne) const
std::pair< std::multimap< int, int >::iterator, std::multimap< int, int >::iterator > ret
int * fixToZero_
Fix to zero.
std::multimap< int, int >::iterator it
void node(int, double, double, double, int, int)
int column_
Column to go to 1.
void setupSymmetry(const OsiSolverInterface &solver)
empty if no NTY, symmetry data structure setup otherwise
virtual void previousBranch()
Reset every information so that the branching object appears to point to the previous child...
virtual ~CbcOrbitalBranchingObject()
void Print_Orbits() const
virtual void print() const
Print something about branch - only if log level high.
void getVstat(double *v, int nv)
CbcOrbitalBranchingObject()
double getGroupSize() const
int orbitalFixing(OsiSolverInterface *solver)
Fixes variables using orbits (returns number fixed)
bool compare(register Node &a, register Node &b) const
int numberExtra_
Number extra.
int numberOther_
Number (without column) going to zero on down branch.
CbcSymmetry()
Default constructor.
bool operator()(register const Node &a, register const Node &b)
CbcNauty()
Default constructor.
void color_node(int ix, int color)
std::vector< std::vector< int > > * getOrbits() const
Returns the orbits in a "convenient" form.
std::vector< int > * Find_Orbit(int) const
Class to deal with symmetry.
int largestOrbit(const double *lower, const double *upper) const
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
virtual int compareOriginalObject(const CbcBranchingObject *brObj) const
Compare the original object of this with the original object of brObj.
virtual void print()
Print something about branch - only if log level high.
CbcOrbitalBranchingObject & operator=(const CbcOrbitalBranchingObject &rhs)
~CbcSymmetry()
Destructor.
int numberUsefulOrbits() const
#define COUENNE_HACKED_EPS_SYMM
virtual CbcBranchingObject * clone() const
Clone.
Abstract Base Class for describing an interface to a solver.
void addElement(int ix, int jx)
CbcNauty & operator=(const CbcNauty &rhs)
Assignment operator.
virtual void previousBranch()
Reset every information so that the branching object appears to point to the previous child...
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
Compare the this with brObj.
int way() const
Get the state of the branching object.
void setWriteAutoms(const std::string &afilename)
Methods to classify orbits.
virtual double branch()
Does next branch and updates state.
int numberUsefulObjects() const
Branching object for Orbital branching.
int getNumGenerators() const
void deleteElement(int ix, int jx)
std::vector< Node > node_info_
std::multimap< int, int > constr_rhs
void Compute_Symmetry() const
void color_vertex(register int k)
void insertRHS(int rhs, int cons)
Abstract base class for `objects'.
void bounds(register double a, register double b)
int statsOrbits(CbcModel *model, int type) const
virtual void fix(OsiSolverInterface *solver, double *lower, double *upper, int branchState) const
Update bounds in solver as in 'branch' and update given bounds.
bool operator()(register const char *a, register const char *b) const
CbcModel * model() const
Return model.
Simple Branch and bound class.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object...
CbcSymmetry & operator=(const CbcSymmetry &rhs)
Assignment operator.