38 namespace Test {
namespace Int {
56 :
Test(
"Channel::Full::"+
str(xoff0)+
"::"+
str(yoff0)+
"::"+
str(ipl),
58 xoff(xoff0), yoff(yoff0) {
63 for (
int i=0;
i<4;
i++)
72 for (
int i=4;
i--; ) {
74 IntVar xo(home, xoff, 3+xoff);
81 IntVar yo(home, yoff, 3+yoff);
97 :
Test(
"Channel::Half::"+
str(ipl),6,0,5,false,ipl) {
102 for (
int i=0;
i<6;
i++)
103 for (
int j=
i+1; j<6; j++)
112 for (
int i=0;
i<6;
i++)
113 for (
int j=0; j<6; j++) {
127 :
Test(
"Channel::Shared::"+
str(ipl),6,0,5,false,ipl) {
132 for (
int i=0;
i<6;
i++)
149 :
Test(
"Channel::Bool::Single",2,-1,2) {
154 return ((x[0]==0) || (x[0]==1)) && (x[0]==x[1]);
172 :
Test(
"Channel::Bool::Multi::"+s,7,min,max), o(o0) {
178 if ((x[
i] != 0) && (x[
i] != 1))
183 for (
int i=0;
i<k;
i++)
186 for (
int i=k+1;
i<
n;
i++)
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Simple test for channel (testing single set of variables)
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
int size(void) const
Return size of array (number of elements)
const FloatNum max
Largest allowed float value.
int size(void) const
Return number of variables.
void channel(Home home, const SetVarArgs &x, const SetVarArgs &y)
ChannelFull cfv11(1, 1, Gecode::IPL_VAL)
ChannelFull(int xoff0, int yoff0, Gecode::IntPropLevel ipl)
Construct and register test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ChannelFull cfv35(3, 5, Gecode::IPL_VAL)
Test channel between integer variable and array of Boolean variables
Gecode::IntSet dom
Domain of variables.
Simple test for channel (testing all variables)
ChannelFull cfv(0, 0, Gecode::IPL_VAL)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ConTestLevel contest
Whether to test for certain consistency.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ChannelFull cfd(0, 0, Gecode::IPL_DOM)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
ChannelShared csd(Gecode::IPL_DOM)
ChannelShared csv(Gecode::IPL_VAL)
ChannelLinkMulti clmb("B", 1, 6, 1)
Test channel with shared variables
ChannelLinkMulti clmc("C",-1, 4,-1)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Gecode::IntPropLevel ipl
Propagation level.
Passing integer variables.
Passing Boolean variables.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ChannelFull cfd35(3, 5, Gecode::IPL_DOM)
Boolean integer variables.
ChannelHalf(Gecode::IntPropLevel ipl)
Construct and register test.
IntPropLevel
Propagation levels for integer propagators.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
ChannelHalf chd(Gecode::IPL_DOM)
Post propagator for SetVar SetOpType SetVar y
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Node * x
Pointer to corresponding Boolean expression node.
ChannelLinkMulti clma("A", 0, 5, 0)
Base class for assignments
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Domain propagation Options: basic versus advanced propagation.
ChannelHalf chv(Gecode::IPL_VAL)
ChannelShared(Gecode::IntPropLevel ipl)
Construct and register test.
Gecode toplevel namespace
ChannelFull cfd11(1, 1, Gecode::IPL_DOM)
ChannelLinkSingle(void)
Construct and register test.
Test channel between integer and Boolean variable
ChannelLinkMulti(const std::string &s, int min, int max, int o0)
Construct and register test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.