Install
openclaw skills install @ruiduobao/geoskill-education-resource-allocationPopulation distribution, accessibility and capacity constraints to optimize school layout and equity
openclaw skills install @ruiduobao/geoskill-education-resource-allocationFor education facility layout optimization: student demand per district is estimated from the population raster, students are assigned to the nearest available school under capacity constraints, accessibility equity is evaluated, and new schools are sited with a greedy p-median algorithm.
Assignment sends students to existing schools in descending order of demand, nearest available capacity first, and reports coverage and unmet demand; equity is measured by the Gini coefficient or the coefficient of variation of district accessibility distances (∈[0,1], higher is more equitable); siting iteratively selects the k candidate sites that most reduce the population-weighted total accessibility distance.
pip install 'numpy' 'scipy' 'geopandas' 'shapely'
python geoskill-education-resource-allocation.py --bbox 116.0 39.0 117.0 40.0 [other options]
python geoskill-education-resource-allocation.py --bbox 116 39 117 40 --synthetic --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --method allocate --capacity 300 --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --method site-select --k-new 3 --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --equity-metric cv --output-dir ./out
| File | Format | Description |
|---|---|---|
allocation.json | JSON | Allocation results (coverage/equity/loading per school; method=allocate/both) |
site_selection.json | JSON | Siting results (selected sites/cost reduction; method=site-select/both) |
education_report.json | JSON | Summary report |
output-manifest.json | JSON | Run manifest |
GeoTIFF population raster (single band), or use --synthetic to generate physically consistent simulated data (fully offline).
--synthetic mode requires no network at all.MIT
面向教育设施布局优化:由人口栅格估计各区学生需求,在容量约束下就近分配学生,评价可达性公平性,并用贪心 p-median 选址新建学校。
分配按“需求降序、就近有空位”把学生分到现有学校,统计覆盖率与未满足需求;公平性用基尼系数或变异系数度量各区可达距离(∈[0,1],越大越公平);选址从候选点中依次选出使人口加权总可达距离下降最大的 k 个校址。
pip install 'numpy' 'scipy' 'geopandas' 'shapely'
python geoskill-education-resource-allocation.py --bbox 116.0 39.0 117.0 40.0 [其他参数]
python geoskill-education-resource-allocation.py --bbox 116 39 117 40 --synthetic --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --method allocate --capacity 300 --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --method site-select --k-new 3 --output-dir ./out
python geoskill-education-resource-allocation.py --input population.tif --equity-metric cv --output-dir ./out
| 文件 | 格式 | 说明 |
|---|---|---|
allocation.json | JSON | 分配结果(覆盖率/公平性/各校载量,method=allocate/both) |
site_selection.json | JSON | 选址结果(选中校址/成本下降,method=site-select/both) |
education_report.json | JSON | 汇总报告 |
output-manifest.json | JSON | 运行清单 |
GeoTIFF 人口栅格(单波段)。 或使用 --synthetic 生成物理一致的模拟数据(完全离线)。
--synthetic 模式完全无网络。MIT