Install
openclaw skills install @ruiduobao/geoskill-location-allocationopenclaw skills install @ruiduobao/geoskill-location-allocationClassic facility location models: p-median (minimizes the demand-weighted total distance; greedy + Teitz-Bart exchange), p-center (minimizes the maximum service distance), and max-coverage (maximizes the demand covered within a threshold distance; MCLP greedy).
pip install numpy rasterio scipy geopandas shapely
python geoskill-location-allocation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-location-allocation.py --bbox 121.0 31.0 122.0 32.0 --synthetic --output-dir ./out2 --quiet
python geoskill-location-allocation.py --input <your data file> --output-dir ./out3
python geoskill-location-allocation.py --bbox 116.39 39.90 116.40 39.91 --synthetic --output-dir ./out4 --quiet
| File | Format | Description |
|---|---|---|
allocation.geojson | GeoTIFF/GeoJSON/JSON | Primary output |
allocation_stats.json | GeoTIFF/GeoJSON/JSON | Primary output |
output-manifest.json | JSON | Run manifest |
--synthetic mode reads no external data.MIT
经典设施选址模型:p-median(最小化需求加权总距离,贪心 + Teitz-Bart 交换)、p-center(最小化最大服务距离)、max-coverage(阈值内最大化覆盖需求,MCLP 贪心)。
pip install numpy rasterio scipy geopandas shapely
python geoskill-location-allocation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-location-allocation.py --bbox 121.0 31.0 122.0 32.0 --synthetic --output-dir ./out2 --quiet
python geoskill-location-allocation.py --input <你的数据文件> --output-dir ./out3
python geoskill-location-allocation.py --bbox 116.39 39.90 116.40 39.91 --synthetic --output-dir ./out4 --quiet
| 文件 | 格式 | 说明 |
|---|---|---|
allocation.geojson | GeoTIFF/GeoJSON/JSON | 主产物 |
allocation_stats.json | GeoTIFF/GeoJSON/JSON | 主产物 |
output-manifest.json | JSON | 运行清单 |
--synthetic 模式不读取任何外部数据。MIT