40 using namespace Gecode;
74 const int n =
x.size();
77 for (
int i=0;
i<
n-1;
i++)
104 const int n =
x.size();
105 os <<
"\tx[" <<
n <<
"] = {";
106 for (
int i = 0;
i <
n-1;
i++)
107 os <<
x[
i] <<
"(" <<
d[
i] <<
"),";
108 os <<
x[
n-1] <<
"}" << std::endl;
123 if (
opt.size() < 2) {
124 std::cerr <<
"size must be at least 2!" << std::endl;
127 Script::run<AllInterval,DFS,SizeOptions>(
opt);
int n
Number of negative literals for node type.
Node * x
Pointer to corresponding Boolean expression node.
Example: All-interval series
AllInterval(AllInterval &s)
Constructor for cloning e.
int main(int argc, char *argv[])
Main-function.
virtual void print(std::ostream &os) const
Print solution.
AllInterval(const SizeOptions &opt)
Actual model.
virtual Space * copy(void)
Copy during cloning.
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
Parametric base-class for scripts.
void iterations(unsigned int i)
Set default number of iterations.
void ipl(IntPropLevel i)
Set default integer propagation level.
Options for scripts with additional size parameter
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl)
Post propagator for for all .
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
@ IPL_BND
Bounds propagation.
IntValBranch INT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl)
Select variable with smallest domain size.
unsigned int size(I &i)
Size of all ranges of range iterator i.
Gecode::IntArgs i({1, 2, 3, 4})