Go to the documentation of this file.
34 #ifndef __GECODE_FLATZINC_BRANCH_HH__
35 #define __GECODE_FLATZINC_BRANCH_HH__
41 namespace Gecode {
namespace FlatZinc {
260 virtual void archive(
Archive& e)
const;
296 std::ostream& o)
const;
302 template<
class Merit>
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
Which integer or Boolean variable to select for branching.
ValSelCommitBase< Int::IntView, int > * xvsc
Integer value selection and commit object.
With largest accumulated failure count.
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
Select by maximal Action over size.
#define GECODE_VTABLE_EXPORT
IntBoolVarBranch INTBOOL_VAR_AFC_MAX(double d=1.0)
Variable selection for both integer and Boolean variables.
IntBoolBrancher(Space &home, IntBoolBrancher &b)
Constructor for cloning b.
IntBoolVarBranch INTBOOL_VAR_CHB_MAX(double d=1.0)
Select variable with largest CHB Q-score.
IntAFC iafc
Integer AFC information.
Passing integer variables.
Select s
Which variable to select.
MeritMaxCHBSize(Space &home, const IntBoolVarBranch &ibvb)
Constructor for initialization.
Recording actions for Boolean variables.
BoolAFC bafc
Boolean AFC information.
void branch(Home home, const IntVarArgs &x, const BoolVarArgs &y, IntBoolVarBranch vars, IntValBranch vals)
Branch function for integer and Boolean variables.
BoolValBranch i2b(const IntValBranch &ivb)
Map respective integer value selection to Boolean value selection.
static void post(Home home, ViewArray< Int::IntView > x, ViewArray< Int::BoolView > y, Merit &m, ValSelCommitBase< Int::IntView, int > *xvsc, ValSelCommitBase< Int::BoolView, int > *yvsc)
Post brancher.
int start
Unassigned views start here (might be in x or y)
IntBoolVarBranch(Select s, double d)
Initialize with selection strategy s and decay factor d.
BoolAction baction
Boolean Action information.
BoolAFC boolafc(void) const
Return Boolean AFC.
Which values to select for branching first.
MeritMaxActionSize(Space &home, const IntBoolVarBranch &ibvb)
Constructor for initialization.
Base-class for both propagators and branchers.
Recording AFC information for integer variables.
IntAction iaction
Integer Action information.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
Select
Which variable selection.
void dispose(void)
Dispose.
IntAction iaction
Integer Action information.
void dispose(void)
Dispose.
void dispose(void)
Dispose.
MeritMaxAFCSize(Space &home, const IntBoolVarBranch &ibvb)
Constructor for initialization.
double operator()(Int::IntView x, int i) const
Return merit.
IntAction intaction(void) const
Return integer action.
Boolean view for Boolean variables.
IntBoolVarBranch INTBOOL_VAR_AFC_SIZE_MAX(double d=1.0)
Select variable with largest accumulated failure count divided by domain size.
Recording CHB for integer variables.
Variable branching information.
MeritMaxAFC(Space &home, const IntBoolVarBranch &ibvb)
Constructor for initialization.
double operator()(Int::IntView x, int i) const
Return merit.
Gecode toplevel namespace
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int b)
Perform commit for choice c and alternative b.
With largest accumulated failure count divided by domain size.
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
ViewArray< Int::BoolView > y
Boolean views to branch on.
Recording AFC information for Boolean variables.
Select by maximal Action.
With highest CHB Q-score.
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
IntAction iaction
Integer action.
BoolAction boolaction(void) const
Return Boolean action.
Base-class for branchers.
Passing Boolean variables.
Home class for posting propagators
IntBoolVarBranch INTBOOL_VAR_ACTION_MAX(double d=1.0)
Select variable with highest action.
Select by maximal AFC over size.
Brancher for integer and Boolean views.
BoolAction baction
Boolean Action information.
IntBoolVarBranch INTBOOL_VAR_CHB_SIZE_MAX(double d=1.0)
Select variable with largest CHB Q-score divided by domain size.
double operator()(Int::IntView x, int i) const
Return merit.
ViewArray< Int::IntView > x
Integer views to branch on.
double operator()(Int::IntView x, int i) const
Return merit.
With largest CHB Q-score divided by domain size.
double operator()(Int::IntView x, int i) const
Return merit.
Merit merit
Selection by maximal merit.
virtual Actor * copy(Space &home)
Perform cloning.
IntBoolBrancherBase(Space &home, IntBoolBrancherBase &b)
Constructor for cloning b.
IntCHB intchb(void) const
Return integer CHB.
virtual const Choice * choice(Space &home)=0
Return choice.
void dispose(void)
Dispose.
IntBoolVarBranch INTBOOL_VAR_ACTION_SIZE_MAX(double d=1.0)
Select variable with largest action divided by domain size.
Base class for value selection and commit.
Recording actions for integer variables.
double operator()(Int::IntView x, int i) const
Return merit.
Select by maximal CHB over size.
Choice storing position and value
IntAFC iafc
Integer AFC information.
Select select(void) const
Return selection strategy.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int b) const
Create no-good literal for choice c and alternative b.
BoolAction baction
Boolean action.
MeritMaxCHB(Space &home, const IntBoolVarBranch &ibvb)
Constructor for initialization.
BoolCHB bchb
Boolean CHB information.
Recording CHB for Boolean variables.
MeritMaxAction(Space &home, const IntBoolVarBranch &ibvb)
Constructor for initialization.
With largest action divided by domain size.
void dispose(void)
Dispose.
Integer view for integer variables.
IntCHB ichb
Integer CHB information.
#define GECODE_FLATZINC_EXPORT
ValSelCommitBase< Int::BoolView, int > * yvsc
Boolean value selection and commit object.
virtual void print(const Space &home, const Choice &c, unsigned int b, std::ostream &o) const
Print branch for choice c and alternative b.
BoolCHB boolchb(void) const
Return Boolean AFC.
Gecode::FloatVal c(-8, 8)
No-good literal recorded during search.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
BoolAFC bafc
Boolean AFC information.
IntCHB ichb
Integer CHB information.
int n
Number of negative literals for node type.
Choice for performing commit
Base-class for brancher for integer and Boolean views.
IntAFC intafc(void) const
Return integer AFC.
void expand(Home home, const IntVarArgs &x, const BoolVarArgs &y)
Expand AFC, action, and CHB.
Gecode::IntArgs i({1, 2, 3, 4})
virtual const Choice * choice(Space &home)
Return choice.
bool pos(const View &x)
Test whether x is postive.
int p
Number of positive literals for node type.
void dispose(void)
Dispose.
virtual bool status(const Space &home) const
Check status of brancher, return true if alternatives left.
BoolCHB bchb
Boolean CHB information.
Which values to select for branching first.