添加了读取指定配置文件的功能
添加了官方的测试用例
This commit is contained in:
3
all_test/test_cases/1/dict.dic
Normal file
3
all_test/test_cases/1/dict.dic
Normal file
@@ -0,0 +1,3 @@
|
||||
TOTAL_STATION = 10
|
||||
STRATEGY = FCFS
|
||||
DISTANCE = 3
|
4
all_test/test_cases/2/dict.dic
Normal file
4
all_test/test_cases/2/dict.dic
Normal file
@@ -0,0 +1,4 @@
|
||||
# first come first serve
|
||||
STRATEGY = FCFS
|
||||
TOTAL_STATION = 10
|
||||
DISTANCE = 2
|
30
all_test/test_cases/2/input.txt
Normal file
30
all_test/test_cases/2/input.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
clock
|
||||
clockwise 2
|
||||
clock
|
||||
clockwise 4
|
||||
clock
|
||||
clock
|
||||
clockwise 6
|
||||
clock
|
||||
target 8
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 10
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
end
|
176
all_test/test_cases/2/output.txt
Normal file
176
all_test/test_cases/2/output.txt
Normal file
@@ -0,0 +1,176 @@
|
||||
TIME:0
|
||||
BUS:
|
||||
position:0
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:1
|
||||
BUS:
|
||||
position:0
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:2
|
||||
BUS:
|
||||
position:1
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0100000000
|
||||
counterclockwise:0000000000
|
||||
TIME:3
|
||||
BUS:
|
||||
position:2
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0101000000
|
||||
counterclockwise:0000000000
|
||||
TIME:4
|
||||
BUS:
|
||||
position:2
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0001000000
|
||||
counterclockwise:0000000000
|
||||
TIME:5
|
||||
BUS:
|
||||
position:3
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0001010000
|
||||
counterclockwise:0000000000
|
||||
TIME:6
|
||||
BUS:
|
||||
position:4
|
||||
target:0000000100
|
||||
STATION:
|
||||
clockwise:0001010000
|
||||
counterclockwise:0000000000
|
||||
TIME:7
|
||||
BUS:
|
||||
position:5
|
||||
target:0000000100
|
||||
STATION:
|
||||
clockwise:0001010000
|
||||
counterclockwise:0000000000
|
||||
TIME:8
|
||||
BUS:
|
||||
position:6
|
||||
target:0000000100
|
||||
STATION:
|
||||
clockwise:0001010000
|
||||
counterclockwise:0000000000
|
||||
TIME:9
|
||||
BUS:
|
||||
position:6
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000010000
|
||||
counterclockwise:0000000000
|
||||
TIME:10
|
||||
BUS:
|
||||
position:7
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000010000
|
||||
counterclockwise:0000000000
|
||||
TIME:11
|
||||
BUS:
|
||||
position:8
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000010000
|
||||
counterclockwise:0000000000
|
||||
TIME:12
|
||||
BUS:
|
||||
position:9
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000010000
|
||||
counterclockwise:0000000000
|
||||
TIME:13
|
||||
BUS:
|
||||
position:10
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000010000
|
||||
counterclockwise:0000000000
|
||||
TIME:14
|
||||
BUS:
|
||||
position:10
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:15
|
||||
BUS:
|
||||
position:11
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:16
|
||||
BUS:
|
||||
position:12
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:17
|
||||
BUS:
|
||||
position:13
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:18
|
||||
BUS:
|
||||
position:14
|
||||
target:0000000101
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:19
|
||||
BUS:
|
||||
position:14
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:20
|
||||
BUS:
|
||||
position:15
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:21
|
||||
BUS:
|
||||
position:16
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:22
|
||||
BUS:
|
||||
position:17
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:23
|
||||
BUS:
|
||||
position:18
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:24
|
||||
BUS:
|
||||
position:18
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
end
|
4
all_test/test_cases/3/dict.dic
Normal file
4
all_test/test_cases/3/dict.dic
Normal file
@@ -0,0 +1,4 @@
|
||||
# first come first serve
|
||||
STRATEGY = FCFS
|
||||
TOTAL_STATION = 10
|
||||
DISTANCE = 2
|
30
all_test/test_cases/3/input.txt
Normal file
30
all_test/test_cases/3/input.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
clock
|
||||
clockwise 2
|
||||
clock
|
||||
target 10
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clockwise 3
|
||||
clock
|
||||
clock
|
||||
target 9
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
end
|
183
all_test/test_cases/3/output.txt
Normal file
183
all_test/test_cases/3/output.txt
Normal file
@@ -0,0 +1,183 @@
|
||||
TIME:0
|
||||
BUS:
|
||||
position:0
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:1
|
||||
BUS:
|
||||
position:0
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:2
|
||||
BUS:
|
||||
position:1
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0100000000
|
||||
counterclockwise:0000000000
|
||||
TIME:3
|
||||
BUS:
|
||||
position:2
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0100000000
|
||||
counterclockwise:0000000000
|
||||
TIME:4
|
||||
BUS:
|
||||
position:2
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:5
|
||||
BUS:
|
||||
position:1
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:6
|
||||
BUS:
|
||||
position:0
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:7
|
||||
BUS:
|
||||
position:19
|
||||
target:0000000001
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:8
|
||||
BUS:
|
||||
position:18
|
||||
target:0000000011
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:9
|
||||
BUS:
|
||||
position:18
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:10
|
||||
BUS:
|
||||
position:19
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:11
|
||||
BUS:
|
||||
position:0
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:12
|
||||
BUS:
|
||||
position:1
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:13
|
||||
BUS:
|
||||
position:2
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:14
|
||||
BUS:
|
||||
position:3
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:15
|
||||
BUS:
|
||||
position:4
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0010000000
|
||||
counterclockwise:0000000000
|
||||
TIME:16
|
||||
BUS:
|
||||
position:4
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:17
|
||||
BUS:
|
||||
position:3
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:18
|
||||
BUS:
|
||||
position:2
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:19
|
||||
BUS:
|
||||
position:1
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:20
|
||||
BUS:
|
||||
position:0
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:21
|
||||
BUS:
|
||||
position:19
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:22
|
||||
BUS:
|
||||
position:18
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:23
|
||||
BUS:
|
||||
position:17
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:24
|
||||
BUS:
|
||||
position:16
|
||||
target:0000000010
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
TIME:25
|
||||
BUS:
|
||||
position:16
|
||||
target:0000000000
|
||||
STATION:
|
||||
clockwise:0000000000
|
||||
counterclockwise:0000000000
|
||||
end
|
4
all_test/test_cases/4/dict.dic
Normal file
4
all_test/test_cases/4/dict.dic
Normal file
@@ -0,0 +1,4 @@
|
||||
DISTANCE = 4
|
||||
STRATEGY = SCAN
|
||||
TOTAL_STATION = 6
|
||||
# scan serve
|
34
all_test/test_cases/4/input.txt
Normal file
34
all_test/test_cases/4/input.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
clock
|
||||
clockwise 2
|
||||
clock
|
||||
clock
|
||||
counterclockwise 6
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 1
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
counterclockwise 5
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
end
|
211
all_test/test_cases/4/output.txt
Normal file
211
all_test/test_cases/4/output.txt
Normal file
@@ -0,0 +1,211 @@
|
||||
TIME:0
|
||||
BUS:
|
||||
position:0
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:1
|
||||
BUS:
|
||||
position:0
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:2
|
||||
BUS:
|
||||
position:1
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:000000
|
||||
TIME:3
|
||||
BUS:
|
||||
position:2
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:000000
|
||||
TIME:4
|
||||
BUS:
|
||||
position:3
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:000001
|
||||
TIME:5
|
||||
BUS:
|
||||
position:4
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:000001
|
||||
TIME:6
|
||||
BUS:
|
||||
position:4
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:7
|
||||
BUS:
|
||||
position:3
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:8
|
||||
BUS:
|
||||
position:2
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:9
|
||||
BUS:
|
||||
position:1
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:10
|
||||
BUS:
|
||||
position:0
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:11
|
||||
BUS:
|
||||
position:23
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:12
|
||||
BUS:
|
||||
position:22
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:13
|
||||
BUS:
|
||||
position:21
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:14
|
||||
BUS:
|
||||
position:20
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000001
|
||||
TIME:15
|
||||
BUS:
|
||||
position:20
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:16
|
||||
BUS:
|
||||
position:21
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:17
|
||||
BUS:
|
||||
position:22
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:18
|
||||
BUS:
|
||||
position:23
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:19
|
||||
BUS:
|
||||
position:0
|
||||
target:100000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:20
|
||||
BUS:
|
||||
position:0
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:21
|
||||
BUS:
|
||||
position:23
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:22
|
||||
BUS:
|
||||
position:22
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:23
|
||||
BUS:
|
||||
position:21
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:24
|
||||
BUS:
|
||||
position:20
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:25
|
||||
BUS:
|
||||
position:19
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:26
|
||||
BUS:
|
||||
position:18
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:27
|
||||
BUS:
|
||||
position:17
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:28
|
||||
BUS:
|
||||
position:16
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000010
|
||||
TIME:29
|
||||
BUS:
|
||||
position:16
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
end
|
4
all_test/test_cases/5/dict.dic
Normal file
4
all_test/test_cases/5/dict.dic
Normal file
@@ -0,0 +1,4 @@
|
||||
DISTANCE = 4
|
||||
STRATEGY = SCAN
|
||||
TOTAL_STATION = 6
|
||||
# scan serve
|
26
all_test/test_cases/5/input.txt
Normal file
26
all_test/test_cases/5/input.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
clock
|
||||
clockwise 2
|
||||
counterclockwise 3
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 4
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clockwise 5
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
end
|
155
all_test/test_cases/5/output.txt
Normal file
155
all_test/test_cases/5/output.txt
Normal file
@@ -0,0 +1,155 @@
|
||||
TIME:0
|
||||
BUS:
|
||||
position:0
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:1
|
||||
BUS:
|
||||
position:0
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:2
|
||||
BUS:
|
||||
position:1
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:001000
|
||||
TIME:3
|
||||
BUS:
|
||||
position:2
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:001000
|
||||
TIME:4
|
||||
BUS:
|
||||
position:3
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:001000
|
||||
TIME:5
|
||||
BUS:
|
||||
position:4
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:010000
|
||||
counterclockwise:001000
|
||||
TIME:6
|
||||
BUS:
|
||||
position:4
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:001000
|
||||
TIME:7
|
||||
BUS:
|
||||
position:5
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:001000
|
||||
TIME:8
|
||||
BUS:
|
||||
position:6
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:001000
|
||||
TIME:9
|
||||
BUS:
|
||||
position:7
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:001000
|
||||
TIME:10
|
||||
BUS:
|
||||
position:8
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:001000
|
||||
TIME:11
|
||||
BUS:
|
||||
position:8
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:12
|
||||
BUS:
|
||||
position:9
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:13
|
||||
BUS:
|
||||
position:10
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
TIME:14
|
||||
BUS:
|
||||
position:11
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000010
|
||||
counterclockwise:000000
|
||||
TIME:15
|
||||
BUS:
|
||||
position:12
|
||||
target:000100
|
||||
STATION:
|
||||
clockwise:000010
|
||||
counterclockwise:000000
|
||||
TIME:16
|
||||
BUS:
|
||||
position:12
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000010
|
||||
counterclockwise:000000
|
||||
TIME:17
|
||||
BUS:
|
||||
position:13
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000010
|
||||
counterclockwise:000000
|
||||
TIME:18
|
||||
BUS:
|
||||
position:14
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000010
|
||||
counterclockwise:000000
|
||||
TIME:19
|
||||
BUS:
|
||||
position:15
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000010
|
||||
counterclockwise:000000
|
||||
TIME:20
|
||||
BUS:
|
||||
position:16
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000010
|
||||
counterclockwise:000000
|
||||
TIME:21
|
||||
BUS:
|
||||
position:16
|
||||
target:000000
|
||||
STATION:
|
||||
clockwise:000000
|
||||
counterclockwise:000000
|
||||
end
|
4
all_test/test_cases/6/dict.dic
Normal file
4
all_test/test_cases/6/dict.dic
Normal file
@@ -0,0 +1,4 @@
|
||||
TOTAL_STATION = 5
|
||||
DISTANCE = 3
|
||||
# shortest seek time first
|
||||
STRATEGY = SSTF
|
47
all_test/test_cases/6/input.txt
Normal file
47
all_test/test_cases/6/input.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
clock
|
||||
clockwise 4
|
||||
clockwise 2
|
||||
counterclockwise 4
|
||||
clock
|
||||
clockwise 2
|
||||
clock
|
||||
clock
|
||||
counterclockwise 1
|
||||
clock
|
||||
clock
|
||||
clockwise 3
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 5
|
||||
clock
|
||||
target 3
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 4
|
||||
target 1
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
end
|
260
all_test/test_cases/6/output.txt
Normal file
260
all_test/test_cases/6/output.txt
Normal file
@@ -0,0 +1,260 @@
|
||||
TIME:0
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:1
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:2
|
||||
BUS:
|
||||
position:1
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:01010
|
||||
counterclockwise:00010
|
||||
TIME:3
|
||||
BUS:
|
||||
position:2
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:01010
|
||||
counterclockwise:00010
|
||||
TIME:4
|
||||
BUS:
|
||||
position:3
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:01010
|
||||
counterclockwise:00010
|
||||
TIME:5
|
||||
BUS:
|
||||
position:3
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00010
|
||||
counterclockwise:10010
|
||||
TIME:6
|
||||
BUS:
|
||||
position:2
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00010
|
||||
counterclockwise:10010
|
||||
TIME:7
|
||||
BUS:
|
||||
position:1
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:10010
|
||||
TIME:8
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:10010
|
||||
TIME:9
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:00010
|
||||
TIME:10
|
||||
BUS:
|
||||
position:1
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:00010
|
||||
TIME:11
|
||||
BUS:
|
||||
position:2
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:00010
|
||||
TIME:12
|
||||
BUS:
|
||||
position:3
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:00010
|
||||
TIME:13
|
||||
BUS:
|
||||
position:4
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:00010
|
||||
TIME:14
|
||||
BUS:
|
||||
position:5
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:00010
|
||||
TIME:15
|
||||
BUS:
|
||||
position:6
|
||||
target:00101
|
||||
STATION:
|
||||
clockwise:00110
|
||||
counterclockwise:00010
|
||||
TIME:16
|
||||
BUS:
|
||||
position:6
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00010
|
||||
counterclockwise:00010
|
||||
TIME:17
|
||||
BUS:
|
||||
position:7
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00010
|
||||
counterclockwise:00010
|
||||
TIME:18
|
||||
BUS:
|
||||
position:8
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00010
|
||||
counterclockwise:00010
|
||||
TIME:19
|
||||
BUS:
|
||||
position:9
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00010
|
||||
counterclockwise:00010
|
||||
TIME:20
|
||||
BUS:
|
||||
position:9
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:21
|
||||
BUS:
|
||||
position:10
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:22
|
||||
BUS:
|
||||
position:11
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:23
|
||||
BUS:
|
||||
position:12
|
||||
target:10011
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:24
|
||||
BUS:
|
||||
position:12
|
||||
target:10010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:25
|
||||
BUS:
|
||||
position:13
|
||||
target:10010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:26
|
||||
BUS:
|
||||
position:14
|
||||
target:10010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:27
|
||||
BUS:
|
||||
position:0
|
||||
target:10010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:28
|
||||
BUS:
|
||||
position:0
|
||||
target:00010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:29
|
||||
BUS:
|
||||
position:14
|
||||
target:00010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:30
|
||||
BUS:
|
||||
position:13
|
||||
target:00010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:31
|
||||
BUS:
|
||||
position:12
|
||||
target:00010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:32
|
||||
BUS:
|
||||
position:11
|
||||
target:00010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:33
|
||||
BUS:
|
||||
position:10
|
||||
target:00010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:34
|
||||
BUS:
|
||||
position:9
|
||||
target:00010
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:35
|
||||
BUS:
|
||||
position:9
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:36
|
||||
BUS:
|
||||
position:9
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
end
|
4
all_test/test_cases/7/dict.dic
Normal file
4
all_test/test_cases/7/dict.dic
Normal file
@@ -0,0 +1,4 @@
|
||||
TOTAL_STATION = 5
|
||||
DISTANCE = 3
|
||||
# shortest seek time first
|
||||
STRATEGY = SSTF
|
42
all_test/test_cases/7/input.txt
Normal file
42
all_test/test_cases/7/input.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
clock
|
||||
clockwise 2
|
||||
counterclockwise 4
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
counterclockwise 3
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 5
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
counterclockwise 4
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 1
|
||||
clockwise 3
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
target 2
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
clock
|
||||
end
|
239
all_test/test_cases/7/output.txt
Normal file
239
all_test/test_cases/7/output.txt
Normal file
@@ -0,0 +1,239 @@
|
||||
TIME:0
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:1
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:2
|
||||
BUS:
|
||||
position:1
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:01000
|
||||
counterclockwise:00010
|
||||
TIME:3
|
||||
BUS:
|
||||
position:2
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:01000
|
||||
counterclockwise:00010
|
||||
TIME:4
|
||||
BUS:
|
||||
position:3
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:01000
|
||||
counterclockwise:00010
|
||||
TIME:5
|
||||
BUS:
|
||||
position:3
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00010
|
||||
TIME:6
|
||||
BUS:
|
||||
position:4
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00010
|
||||
TIME:7
|
||||
BUS:
|
||||
position:5
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:8
|
||||
BUS:
|
||||
position:6
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:9
|
||||
BUS:
|
||||
position:7
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:10
|
||||
BUS:
|
||||
position:8
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:11
|
||||
BUS:
|
||||
position:9
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:12
|
||||
BUS:
|
||||
position:9
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00100
|
||||
TIME:13
|
||||
BUS:
|
||||
position:10
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00100
|
||||
TIME:14
|
||||
BUS:
|
||||
position:11
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00100
|
||||
TIME:15
|
||||
BUS:
|
||||
position:12
|
||||
target:00001
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00100
|
||||
TIME:16
|
||||
BUS:
|
||||
position:12
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00100
|
||||
TIME:17
|
||||
BUS:
|
||||
position:11
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:18
|
||||
BUS:
|
||||
position:10
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:19
|
||||
BUS:
|
||||
position:9
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00110
|
||||
TIME:20
|
||||
BUS:
|
||||
position:9
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00100
|
||||
TIME:21
|
||||
BUS:
|
||||
position:8
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00100
|
||||
TIME:22
|
||||
BUS:
|
||||
position:7
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00100
|
||||
counterclockwise:00100
|
||||
TIME:23
|
||||
BUS:
|
||||
position:6
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00100
|
||||
counterclockwise:00100
|
||||
TIME:24
|
||||
BUS:
|
||||
position:6
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:25
|
||||
BUS:
|
||||
position:5
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:26
|
||||
BUS:
|
||||
position:4
|
||||
target:11000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:27
|
||||
BUS:
|
||||
position:3
|
||||
target:11000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:28
|
||||
BUS:
|
||||
position:3
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:29
|
||||
BUS:
|
||||
position:2
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:30
|
||||
BUS:
|
||||
position:1
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:31
|
||||
BUS:
|
||||
position:0
|
||||
target:10000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:32
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
TIME:33
|
||||
BUS:
|
||||
position:0
|
||||
target:00000
|
||||
STATION:
|
||||
clockwise:00000
|
||||
counterclockwise:00000
|
||||
end
|
Reference in New Issue
Block a user