A Simple Example
mangosteen.cs.ttu.edu$ csp.out -f 3 3 3 3 1 3 1
The parameters of the random instances
(n=3, d=3, e=3 , f=3 , t=1, # of instances=1, seed=3)
Instance 0:
The cn address is 0x960f0c8
nt=9 ft=3
——-all possible constraints——–
0 1
0 2
1 2
——–C/e constraints————–
1 2
0 1
0 2
——–2*C constraints———–
1 2
2 1
0 1
1 0
0 2
2 0
———F constraints————–
0 1
2 1
1 0
functional: 2 1
0 : 2
1 : 0
2 : 0
Transpose:1 2:
before cn
I am after cn
0 : 2 1
1 :
2 : 0
Bijection: 0 1
0 1:
<0,1> <2,0> <1,2>
Bijection Transpose:1 0:
<1,0> <0,2> <2,1>
nonfunctional: 0 2
before cn
I am after cn
0 : 1 0 2
1 : 1 0 2
2 : 1 0 2
before cn
I am after cn
nonfuntional Traspose:2 0
0 : 2 0 1
1 : 0 2 1
2 : 2 0 1
adjGF:
0 : 1
1 : 0
2 : 1
funcross_link_list:
0 : 1 2
1 : 0 2
2 : 0 1
————CSP:cn———
0,2:
(0,0)(0,1)(0,2)
(1,0)(1,1)(1,2)
(2,0)(2,1)(2,2)
——-
1,2:
(0,1)(0,2)
(2,0)
——-
2,0:
(0,0)(0,1)(0,2)
(1,0)(1,1)(1,2)
(2,0)(2,1)(2,2)
——-
————CSP:fCN———
0,1:
(0,1) (1,2) (2,0)
——-
1,0:
(0,2) (1,0) (2,1)
——-
2,1:
(0,2) (1,0) (2,0)
——-
n:3
adjGF:
0 : 1
1 : 0
2 : 1
adjTGF:
0 : 1
1 : 0 2
2 :
finished u=1
finished u=0
finished u=2
———-HERE DFS() done—————-
u=2 numComp=0
u=0 numComp=1
Components graph:
0 : 2
1 : 0 1
2 :
numComp=2
Node2Component:
Node:0 , Component:1
Node:1 , Component:1
Node:2 , Component:0
———-HERE DFST() done—————
adjSCC:
0 : 1
1 :
———-HERE findSCCGF() done———-
finished u: 1
finished u: 0
———-HERE DFSSCC() done————-
Component:0
order[0] = 2
Component:1
order[1] = 0
order[2] = 1
———-HERE finalOrder() done———
O.Qlength=3
head=2
adjGF[i]: 1
O print:
0->1->NULL
end: O print
L print:
1->NULL
end: L print
J : 1
————after array—————-
————after array set up—————-
————as previous link list—————-
i=2 j=1 k=0
functional[j*n+k] && (!wasIn[k])1—1
++++6+++++++++++++++++++++++++K 0
0->NULL
+++++7+++++++ k +++++++++++++++++0
————Origin cij:———
cij[0]2
cij[1]0
cij[2]0
————Origin cik:———
cjk[0]2
cjk[1]0
cjk[2]1
————Newcomposed CSP begin:———
v:0
c_{2,1}[0]2
cjk[v]2
cjk[cij[v]]1
c_ik[v]1
————Newcomposed CSP begin:———
v:1
c_{2,1}[1]0
cjk[v]0
cjk[cij[v]]2
c_ik[v]2
————Newcomposed CSP begin:———
v:2
c_{2,1}[2]0
cjk[v]1
cjk[cij[v]]2
c_ik[v]2
fCN[i*n+k][v] :: 1
fCN[i*n+k][v] :: 2
fCN[i*n+k][v] :: 2
c_{2,0}: [ 0 1]
c_{2,0}: [ 1 2]
c_{2,0}: [ 2 2]
++++++++++++++++++
here we go: cik=fCN[i*n+k]
reviseDomain(i,k);
adjGF:
0 :
1 :
2 : 1 0
funcross_link_list:
0 : 2
1 : 2
2 : 0 1
————CSP:cn———
0,2:
(0,1)
(1,2)
(2,2)
——-
1,2:
(0,1)(0,2)
(2,0)
——-
————CSP:fCN———
2,0:
(0,1) (1,2) (2,2)
——-
2,1:
(0,2) (1,0) (2,0)
——-
————as previous link list—————-
i=2 j=1 k=2
functional[j*n+k] && (!wasIn[k])0—1
L.QLength() : 1
Queue is empty.
++++++8+++++++++++++++++++++++
O.Qlength=2
head=0
adjGF[i]: 0
O print:
1->NULL
end: O print
L print:
Queue is empty.
end: L print
++++++8+++++++++++++++++++++++
O.Qlength=1
head=1
adjGF[i]: 0
O print:
Queue is empty.
end: O print
L print:
Queue is empty.
end: L print
++++++8+++++++++++++++++++++++
start: translation
end: translation
delete:fCN
————CSP:cn———
0,2:
(0,1)
(1,2)
(2,2)
——-
1,2:
(0,1)(0,2)
(2,0)
——-
2,0:
(1,0)
(2,1)(2,2)
——-
2,1:
(0,2)
(1,0)
(2,0)
——-
————CSP:fCN———
Checking Solution Against Constraint Graph
Solution Acceptable.
# of values removed before search:# of values removed:# of constraint checks:# of domain checks
2:6:39:0
[BT::statistics()] #backtracks=0 maxPhase=3
number of failed assignments:0
number of pruned values:0
:Time used:0.0s
average cchecks+dchecks+ochecks: average backtracks: average search depth
39+0+0:0:3
the consistent instances are (%d)
1
%d0
the inconsistent instances are (%d)
0
Total time:0.0s
mangosteen.cs.ttu.edu$ csp.out -f 3 3 3 3 1 3 1
