40 using namespace Gecode;
74 switch (
opt.propagation()) {
99 void print(std::ostream& os)
const {
101 for (
int i = 0;
i<
n;
i++) {
104 os << std::endl <<
"\t";
124 Script::run<MagicSequence,DFS,SizeOptions>(
opt);
int n
Number of negative literals for node type.
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
Parametric base-class for scripts.
static IntArgs create(int n, int start, int inc=1)
Allocate array with n elements such that for all .
void propagation(int v)
Set default propagation value.
void iterations(unsigned int i)
Set default number of iterations.
void solutions(unsigned int n)
Set default number of solutions to search for.
Options for scripts with additional size parameter
void update(Space &home, VarArray< Var > &a)
Update array to be a clone of array a.
int main(int argc, char *argv[])
Main-function.
@ PROP_COUNT
Use count constraints.
@ PROP_GCC
Use single global cardinality constraint.
virtual void print(std::ostream &os) const
Print sequence.
virtual Space * copy(void)
Copy during cloning.
MagicSequence(MagicSequence &e)
Constructor for cloning e.
MagicSequence(const SizeOptions &opt)
The actual model.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel)
Post propagator for .
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
IntValBranch INT_VAL_MAX(void)
Select largest value.
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
unsigned int size(I &i)
Size of all ranges of range iterator i.
Gecode::IntArgs i({1, 2, 3, 4})