61 static const int s = 711;
63 static const int p = 711 * 100 * 100 * 100;
71 rel(*
this,
a+
b+c+d ==
s, opt.ipl());
74 rel(*
this, (
a*
b)*(c*d) ==
p, opt.ipl());
96 os <<
"\t" <<
abcd << std::endl;
107 opt.
parse(argc,argv);
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Parametric base-class for scripts.
static void run(const Options &opt, Script *s=NULL)
void update(Space &home, VarArray< Var > &a)
Update array to be a clone of array a.
int main(int argc, char *argv[])
Main-function.
static const int p
Decimal product of prices.
IntVarArray abcd
The price of each item.
static const int s
Sum and product of prices.
virtual Space * copy(void)
Copy during cloning.
virtual void print(std::ostream &os) const
Print solution.
Grocery(const Options &opt)
The actual model.
Grocery(Grocery &s)
Constructor for cloning s.
void parse(int argc, char *argv[])
Parse commandline arguments.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
@ IRT_LQ
Less or equal ( )
Gecode toplevel namespace
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
IntValBranch INT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.