跑完100_100_6的实验

This commit is contained in:
weixin_46229132 2025-04-05 10:36:03 +08:00
parent 87ee65087f
commit c6c7cb47f1
8 changed files with 123 additions and 161 deletions

View File

@ -30,8 +30,8 @@ if __name__ == "__main__": # 重要:在 Windows 上必须加这一行
# --------------------------- # ---------------------------
# 需要修改的超参数 # 需要修改的超参数
# --------------------------- # ---------------------------
R = 10 R = 7
C = 10 C = 7
params_file = 'params_100_100_6' params_file = 'params_100_100_6'
batch_size = 60 # 控制一次最多并行多少个任务 batch_size = 60 # 控制一次最多并行多少个任务

View File

@ -225,8 +225,8 @@ if __name__ == "__main__":
# --------------------------- # ---------------------------
# 需要修改的超参数 # 需要修改的超参数
# --------------------------- # ---------------------------
solution_path = r"solutions\trav_ga_params_50_50_3_parallel.json" solution_path = r"solutions\trav_ga_params_100_100_6_parallel.json"
params_file = r"params_50_50_3" params_file = r"params_100_100_6"
max_iterations=10000 max_iterations=10000
initial_temp=100 initial_temp=100
cooling_rate=0.95 cooling_rate=0.95

View File

@ -13,4 +13,4 @@ bs_time_factor : 5 # 机巢上每张照片计算时间
flight_energy_factor : 0.05 # 单位:分钟/张 flight_energy_factor : 0.05 # 单位:分钟/张
comp_energy_factor : 0.05 # TODO 计算能耗需要重新估计 comp_energy_factor : 0.05 # TODO 计算能耗需要重新估计
trans_energy_factor : 0.0025 trans_energy_factor : 0.0025
battery_energy_capacity : 20 # 无人机只进行飞行续航为30分钟 battery_energy_capacity : 30 # 无人机只进行飞行续航为30分钟

View File

@ -1,74 +0,0 @@
{
"best_time": 19557.574055662244,
"row_cuts": [
0,
0.2,
0.5,
0.7,
1
],
"col_cuts": [
0,
0.1,
0.19,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8,
0.9,
1
],
"best_path": [
0,
17,
10,
9,
8,
7,
6,
5,
0,
28,
29,
30,
19,
20,
18,
16,
43,
27,
40,
39,
38,
37,
36,
26,
45,
14,
13,
12,
11,
22,
21,
23,
24,
41,
25,
44,
34,
35,
33,
32,
31,
42,
15,
4,
3,
2,
1,
0
],
"timestamp": "2025-04-04 10:47:47"
}

View File

@ -0,0 +1,63 @@
{
"row_boundaries": [
0.0,
0.24000000000000005,
0.41000000000000003,
0.63,
0.8,
1.0
],
"col_boundaries": [
0.0,
0.18,
0.39,
0.51,
0.69,
0.77,
1.0
],
"car_paths": [
[
29,
28,
27,
26,
20,
14
],
[
12,
6,
0,
1
],
[
13,
7,
2,
3,
9
],
[
22,
21,
23,
17,
16,
15
],
[
8,
11,
5,
4,
10
],
[
19,
24,
25,
18
]
]
}

View File

@ -10,12 +10,10 @@
], ],
"col_boundaries": [ "col_boundaries": [
0, 0,
0.1504, 0.22560000000000002,
0.3008,
0.45120000000000005, 0.45120000000000005,
0.6016, 0.6768000000000001,
0.752, 0.9024000000000001,
0.9024,
1 1
], ],
"car_paths": [ "car_paths": [
@ -24,54 +22,42 @@
1, 1,
2, 2,
3, 3,
4, 4
5,
6
], ],
[ [
5,
6,
7, 7,
8, 8,
9, 9
],
[
10, 10,
11, 11,
12, 12,
13 13,
14
], ],
[ [
14,
15, 15,
16, 16,
17, 17,
18, 18,
19, 19
20
], ],
[ [
20,
21, 21,
22, 22,
23, 23,
24, 24
],
[
25, 25,
26, 26,
27 27,
],
[
28, 28,
29, 29
30,
31,
32,
33,
34
],
[
35,
36,
37,
38,
39,
40,
41
] ]
] ]
} }

View File

@ -2,75 +2,62 @@
"row_boundaries": [ "row_boundaries": [
0.0, 0.0,
0.2, 0.2,
0.5, 0.4,
0.7, 0.6,
0.8,
1.0 1.0
], ],
"col_boundaries": [ "col_boundaries": [
0.0, 0.0,
0.1,
0.2, 0.2,
0.3,
0.4, 0.4,
0.5, 0.5,
0.6,
0.7, 0.7,
0.8, 0.8,
0.9,
1.0 1.0
], ],
"car_paths": [ "car_paths": [
[ [
16,
9,
8,
7,
6,
5,
4
],
[
27,
28,
29, 29,
18, 28,
19, 27,
17, 26,
15 20,
14
], ],
[ [
26, 12,
39, 6,
38, 0,
37, 1
36,
35,
25
], ],
[ [
13, 13,
12, 7,
11,
10,
21,
20,
22,
23
],
[
24,
33,
34,
32,
31,
30
],
[
14,
3,
2, 2,
1, 3,
0 9
],
[
22,
21,
23,
17,
16,
15
],
[
8,
11,
5,
4,
10
],
[
19,
24,
25,
18
] ]
] ]
} }

View File

@ -200,7 +200,7 @@ if __name__ == "__main__":
# 需要修改的超参数 # 需要修改的超参数
# --------------------------- # ---------------------------
params_file = 'params_100_100_6' params_file = 'params_100_100_6'
solution_file = r'solutions\trav_ga_params_100_100_6_parallel.json' solution_file = r'solutions\greedy_params_100_100_6.json'
with open(params_file + '.yml', 'r', encoding='utf-8') as file: with open(params_file + '.yml', 'r', encoding='utf-8') as file:
params = yaml.safe_load(file) params = yaml.safe_load(file)