2021-07-30 00:19:46 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# Generate scenarios for ActDev maps, using scenario JSON files from
|
|
|
|
# https://github.com/cyipt/actdev/tree/main/data-small.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CITY=$1
|
|
|
|
if [ "$CITY" == "" ]; then
|
|
|
|
echo Missing args;
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
SITE=`echo $CITY | sed -r 's/_/-/g'`
|
|
|
|
|
|
|
|
# Import the scenarios
|
|
|
|
rm -fv *.json
|
|
|
|
wget https://raw.githubusercontent.com/cyipt/actdev/main/data-small/$SITE/scenario_base.json
|
|
|
|
wget https://raw.githubusercontent.com/cyipt/actdev/main/data-small/$SITE/scenario_go_active.json
|
|
|
|
|
2021-09-15 05:56:16 +03:00
|
|
|
cargo run --release --bin cli -- import-traffic --map=data/system/gb/$CITY/maps/center.bin --input=scenario_base.json --skip_problems
|
|
|
|
cargo run --release --bin cli -- import-traffic --map=data/system/gb/$CITY/maps/center.bin --input=scenario_go_active.json --skip_problems
|
2021-07-30 00:19:46 +03:00
|
|
|
rm -fv *.json
|
2021-09-15 05:56:16 +03:00
|
|
|
cargo run --release --bin cli -- augment-scenario --input=data/system/gb/$CITY/scenarios/center/base.bin --add_return_trips --add_lunch_trips
|
|
|
|
cargo run --release --bin cli -- augment-scenario --input=data/system/gb/$CITY/scenarios/center/go_active.bin --add_return_trips --add_lunch_trips
|
2021-07-30 00:19:46 +03:00
|
|
|
# Generate the background traffic from OD data, and mix it in with the two actdev scenarios
|
|
|
|
./import.sh --scenario --city=gb/$CITY
|