37 namespace Gecode {
namespace FlatZinc {
49 if (start <
x.size()) {
50 for (
int i=start;
i <
x.size();
i++)
57 for (
int i=start-
x.size();
i <
y.size();
i++)
72 return me_failed(xvsc->commit(home,b,
x[p],p,n)) ?
76 return me_failed(yvsc->commit(home,b,
y[p],p,n)) ?
83 unsigned int b)
const {
88 return xvsc->ngl(home,b,
x[p],n);
91 return yvsc->ngl(home,b,
y[p],n);
98 std::ostream& o)
const {
103 xvsc->print(home,b,
x[p],p,n,o);
106 yvsc->print(home,b,
y[p],p,n,o);
122 if (home.
failed())
return;
virtual bool status(const Space &home) const
Check status of brancher, return true if alternatives left.
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.
With largest accumulated failure count.
Which values to select for branching first.
PosIntChoice(const Brancher &b, unsigned int a, int p, int n)
Initialize choice for brancher b, number of alternatives a, position p, and value n...
Multi _c(Gecode::IntArgs(3, 1, 2, 3))
With highest CHB Q-score.
Select by maximal Action over size.
Choice storing position and value
Base class for value selection and commit.
void expand(Home home, const IntVarArgs &x, const BoolVarArgs &y)
Expand AFC, action, and CHB.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
With largest CHB Q-score divided by domain size.
int n
Number of negative literals for node type.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int b)
Perform commit for choice c and alternative b.
Execution has resulted in failure.
With largest accumulated failure count divided by domain size.
Which integer or Boolean variable to select for branching.
bool failed(void) const
Check whether corresponding space is failed.
Select select(void) const
Return selection strategy.
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.
virtual const Choice * choice(Space &home)=0
Return choice.
ValSelCommitBase< IntView, int > * valselcommit(Space &home, const IntValBranch &ivb)
Return value and commit for integer views.
Passing integer variables.
Select by maximal AFC over size.
Passing Boolean variables.
virtual void archive(Archive &e) const
Archive into e.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int b) const
Create no-good literal for choice c and alternative b.
Select by maximal CHB over size.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
Post propagator for SetVar SetOpType SetVar y
With largest action divided by domain size.
virtual void archive(Archive &e) const
Archive into e.
Choice for performing commit
int val(void) const
Return value to assign to.
Select by maximal Action.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual void print(const Space &home, const Choice &c, unsigned int b, std::ostream &o) const
Print branch for choice c and alternative b.
Post propagator for SetVar x
Gecode toplevel namespace
Home class for posting propagators
#define GECODE_NEVER
Assert that this command is never executed.
int pos(void) const
Return position of view to assign.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
No-good literal recorded during search.