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