include psrc scenarios in releases

This commit is contained in:
Dustin Carlino 2019-08-04 15:14:25 -07:00
parent 44cedeefab
commit d6f5c60713
4 changed files with 15 additions and 0 deletions

View File

@ -6,6 +6,8 @@ edition = "2018"
[dependencies]
abstutil = { path = "../abstutil" }
geom = { path = "../geom" }
map_model = { path = "../map_model" }
popdat = { path = "../popdat" }
structopt = "0.2.15"
synthetic = { path = "../synthetic" }

View File

@ -1,5 +1,7 @@
use abstutil::Timer;
use geom::Duration;
use map_model::Map;
use popdat::trips_to_scenario;
use structopt::StructOpt;
#[derive(StructOpt)]
@ -8,6 +10,9 @@ struct Flags {
/// Map
#[structopt(name = "load")]
load: String,
#[structopt(name = "disable_psrc_scenarios")]
disable_psrc_scenarios: bool,
}
fn main() {
@ -26,4 +31,8 @@ fn main() {
timer.start("save map");
map.save();
timer.stop("save map");
if !flags.disable_psrc_scenarios {
trips_to_scenario(&map, Duration::ZERO, Duration::END_OF_DAY, &mut timer).save();
}
}

View File

@ -16,6 +16,8 @@ cp color_scheme.json docs/INSTRUCTIONS.md release/play_abstreet.sh $OUT
mkdir -p $OUT/data/maps
for map in 23rd ballard caphill downtown montlake; do
cp -v data/maps/$map.bin $OUT/data/maps/
mkdir -p $OUT/data/scenarios/$map
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
done
mkdir -p $OUT/data/shapes

View File

@ -12,6 +12,8 @@ cp color_scheme.json docs/INSTRUCTIONS.md release/play_abstreet.bat $OUT
mkdir -p $OUT/data/maps
for map in 23rd ballard caphill downtown montlake; do
cp -v data/maps/$map.bin $OUT/data/maps/
mkdir -p $OUT/data/scenarios/$map
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
done
mkdir -p $OUT/data/shapes