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