no message

This commit is contained in:
Cricial 2025-12-13 12:56:14 +08:00
parent 0e52fcb34b
commit 03ac80715f
2 changed files with 3 additions and 7 deletions

View File

@ -17,13 +17,11 @@ from orm import connection, engine
def fitness(individual, controller_db_obj): def fitness(individual, controller_db_obj):
""" """
遗传算法适应度函数用于评估个体模型参数的优劣 遗传算法适应度函数用于评估个体模型参数的优劣
参数 参数
individual : list individual : list
个体参数列表 个体参数列表
[n_max_trial, prf_size, prf_conn, cap_limit_prob_type, cap_limit_level, [n_max_trial, prf_size, prf_conn, cap_limit_prob_type, cap_limit_level,
diff_new_conn, netw_prf_n, s_r, S_r, x, k, production_increase_ratio] diff_new_conn, netw_prf_n, s_r, S_r, x, k, production_increase_ratio]
目标 目标
使 ABM 模型生成的脆弱产业集合与目标产业集合尽可能相似 使 ABM 模型生成的脆弱产业集合与目标产业集合尽可能相似
- fitness = -error - fitness = -error

View File

@ -15,12 +15,10 @@
├── controller_db.py # 数据库控制器(需补充) ├── controller_db.py # 数据库控制器(需补充)
├── my_model.py # ABM模型实现需补充 ├── my_model.py # ABM模型实现需补充
├── orm.py # 数据库ORM配置需补充 ├── orm.py # 数据库ORM配置需补充
├── GA_Agent_0925/ # 遗传算法相关模块 │── creating.py # 工具箱创建
│ ├── creating.py # 工具箱创建 │── orm.py # 数据库配置
│ ├── orm.py # 数据库配置 │── SQL_analysis_risk_ga.sql # 分析SQL脚本
│ └── SQL_analysis_risk_ga.sql # 分析SQL脚本
├── results/ # 结果输出目录(自动创建) ├── results/ # 结果输出目录(自动创建)
└── requirements.txt # 依赖包列表(需补充)
``` ```
## 功能特性 ## 功能特性