@@ -30,19 +30,19 @@ def cz_placement_cases():
3030 occupied = frozenset (),
3131 layout = (
3232 LocationAddress (0 , 0 ),
33- LocationAddress (0 , 2 ),
33+ LocationAddress (0 , 1 ),
3434 LocationAddress (1 , 0 ),
35- LocationAddress (1 , 2 ),
35+ LocationAddress (1 , 1 ),
3636 ),
3737 move_count = (0 , 0 , 0 , 0 ),
3838 )
3939 state_after = ConcreteState (
4040 occupied = frozenset (),
4141 layout = (
42- LocationAddress (1 , 1 ),
43- LocationAddress (1 , 3 ),
42+ LocationAddress (1 , 5 ),
43+ LocationAddress (1 , 6 ),
4444 LocationAddress (1 , 0 ),
45- LocationAddress (1 , 2 ),
45+ LocationAddress (1 , 1 ),
4646 ),
4747 move_count = (1 , 1 , 0 , 0 ),
4848 )
@@ -58,19 +58,19 @@ def cz_placement_cases():
5858 occupied = frozenset (),
5959 layout = (
6060 LocationAddress (0 , 0 ),
61- LocationAddress (0 , 2 ),
61+ LocationAddress (0 , 1 ),
6262 LocationAddress (1 , 0 ),
63- LocationAddress (1 , 2 ),
63+ LocationAddress (1 , 1 ),
6464 ),
6565 move_count = (1 , 1 , 0 , 0 ),
6666 )
6767 state_after = ConcreteState (
6868 occupied = frozenset (),
6969 layout = (
7070 LocationAddress (0 , 0 ),
71- LocationAddress (0 , 2 ),
7271 LocationAddress (0 , 1 ),
73- LocationAddress (0 , 3 ),
72+ LocationAddress (0 , 5 ),
73+ LocationAddress (0 , 6 ),
7474 ),
7575 move_count = (1 , 1 , 1 , 1 ),
7676 )
@@ -85,19 +85,19 @@ def cz_placement_cases():
8585 occupied = frozenset (),
8686 layout = (
8787 LocationAddress (0 , 0 ),
88+ LocationAddress (0 , 1 ),
8889 LocationAddress (0 , 2 ),
89- LocationAddress (0 , 4 ),
90- LocationAddress (0 , 6 ),
90+ LocationAddress (0 , 3 ),
9191 ),
9292 move_count = (1 , 1 , 0 , 0 ),
9393 )
9494 state_after = ConcreteState (
9595 occupied = frozenset (),
9696 layout = (
9797 LocationAddress (0 , 0 ),
98- LocationAddress (0 , 2 ),
9998 LocationAddress (0 , 1 ),
100- LocationAddress (0 , 3 ),
99+ LocationAddress (0 , 5 ),
100+ LocationAddress (0 , 6 ),
101101 ),
102102 move_count = (1 , 1 , 1 , 1 ),
103103 )
@@ -112,19 +112,19 @@ def cz_placement_cases():
112112 occupied = frozenset (),
113113 layout = (
114114 LocationAddress (0 , 0 ),
115+ LocationAddress (0 , 1 ),
115116 LocationAddress (0 , 2 ),
116- LocationAddress (0 , 4 ),
117- LocationAddress (0 , 6 ),
117+ LocationAddress (0 , 3 ),
118118 ),
119119 move_count = (0 , 0 , 1 , 1 ),
120120 )
121121 state_after = ConcreteState (
122122 occupied = frozenset (),
123123 layout = (
124- LocationAddress (0 , 5 ),
125124 LocationAddress (0 , 7 ),
126- LocationAddress (0 , 4 ),
127- LocationAddress (0 , 6 ),
125+ LocationAddress (0 , 8 ),
126+ LocationAddress (0 , 2 ),
127+ LocationAddress (0 , 3 ),
128128 ),
129129 move_count = (1 , 1 , 1 , 1 ),
130130 )
@@ -185,7 +185,7 @@ def test_fixed_invalid_initial_layout_1():
185185 LocationAddress (0 , 0 ),
186186 LocationAddress (0 , 1 ),
187187 LocationAddress (0 , 2 ),
188- LocationAddress (0 , 3 ),
188+ LocationAddress (0 , 5 ),
189189 )
190190 with pytest .raises (ValueError ):
191191 placement_strategy .validate_initial_layout (layout )
@@ -215,15 +215,15 @@ def test_initial_layout():
215215 print (layout )
216216 assert layout == (
217217 LocationAddress (word_id = 0 , site_id = 0 ),
218+ LocationAddress (word_id = 0 , site_id = 1 ),
218219 LocationAddress (word_id = 0 , site_id = 2 ),
220+ LocationAddress (word_id = 0 , site_id = 3 ),
219221 LocationAddress (word_id = 0 , site_id = 4 ),
220- LocationAddress (word_id = 0 , site_id = 6 ),
221- LocationAddress (word_id = 0 , site_id = 8 ),
222222 LocationAddress (word_id = 1 , site_id = 0 ),
223+ LocationAddress (word_id = 1 , site_id = 1 ),
223224 LocationAddress (word_id = 1 , site_id = 2 ),
225+ LocationAddress (word_id = 1 , site_id = 3 ),
224226 LocationAddress (word_id = 1 , site_id = 4 ),
225- LocationAddress (word_id = 1 , site_id = 6 ),
226- LocationAddress (word_id = 1 , site_id = 8 ),
227227 )
228228
229229
@@ -234,7 +234,7 @@ def test_move_scheduler_cz():
234234 tuple (
235235 LocationAddress (word_id , site_id )
236236 for word_id in range (2 )
237- for site_id in range (0 , 10 , 2 )
237+ for site_id in range (5 )
238238 ),
239239 tuple (0 for _ in range (10 )),
240240 )
@@ -257,19 +257,19 @@ def test_move_scheduler_cz():
257257 direction = Direction .FORWARD , word_id = 0 , site_id = 0 , bus_id = 0
258258 ),
259259 SiteLaneAddress (
260- direction = Direction .FORWARD , word_id = 0 , site_id = 2 , bus_id = 0
260+ direction = Direction .FORWARD , word_id = 0 , site_id = 1 , bus_id = 0
261261 ),
262262 ),
263- (SiteLaneAddress (direction = Direction .FORWARD , word_id = 0 , site_id = 8 , bus_id = 7 ),),
263+ (SiteLaneAddress (direction = Direction .FORWARD , word_id = 0 , site_id = 4 , bus_id = 7 ),),
264264 (
265265 WordLaneAddress (
266- direction = Direction .FORWARD , word_id = 0 , site_id = 1 , bus_id = 0
266+ direction = Direction .FORWARD , word_id = 0 , site_id = 5 , bus_id = 0
267267 ),
268268 WordLaneAddress (
269- direction = Direction .FORWARD , word_id = 0 , site_id = 3 , bus_id = 0
269+ direction = Direction .FORWARD , word_id = 0 , site_id = 6 , bus_id = 0
270270 ),
271271 WordLaneAddress (
272- direction = Direction .FORWARD , word_id = 0 , site_id = 5 , bus_id = 0
272+ direction = Direction .FORWARD , word_id = 0 , site_id = 7 , bus_id = 0
273273 ),
274274 ),
275275 ]
0 commit comments