abstreet/precompute.sh
Dustin Carlino 22db36c0f4 use a sparser, more obvious representation for walking_with_transit.
cuts prep time down to reasonable levels for everything.
2019-06-17 16:08:31 -07:00

35 lines
727 B
Bash
Executable File

#!/bin/bash
set -e
release_mode=""
for arg in "$@"; do
if [ "$arg" == "--release" ]; then
release_mode="--release";
else
# Just recompute a single map.
cd precompute;
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$arg.bin;
cd ..;
exit;
fi
done
mkdir -p data/maps/
# Re-export all synthetic maps from scratch. Do this before the other loop,
# since the raw_map might be stale.
cd precompute;
for path in `ls ../data/synthetic_maps/*`; do
RUST_BACKTRACE=1 cargo run $release_mode $path;
done
cd ..;
for map_path in `ls data/raw_maps/`; do
map=`basename $map_path .bin`;
echo "Precomputing $map";
cd precompute;
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$map.bin;
cd ..;
done