mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
Rebuild actdev scenarios again, remembering to include return and lunch trips. cyipt/actdev#132
This commit is contained in:
parent
5970883cff
commit
6594597c3f
File diff suppressed because it is too large
Load Diff
@ -18,4 +18,7 @@ wget https://raw.githubusercontent.com/cyipt/actdev/main/data-small/$SITE/scenar
|
||||
cargo run --release --bin import_traffic -- --map=data/system/gb/$CITY/maps/center.bin --input=scenario_base.json --skip_problems
|
||||
cargo run --release --bin import_traffic -- --map=data/system/gb/$CITY/maps/center.bin --input=scenario_go_active.json --skip_problems
|
||||
rm -fv *.json
|
||||
cargo run --release --bin augment_scenario -- --input=data/system/gb/$CITY/scenarios/center/base.bin --add_return_trips --add_lunch_trips
|
||||
cargo run --release --bin augment_scenario -- --input=data/system/gb/$CITY/scenarios/center/go_active.bin --add_return_trips --add_lunch_trips
|
||||
# Generate the background traffic from OD data, and mix it in with the two actdev scenarios
|
||||
./import.sh --scenario --city=gb/$CITY
|
||||
|
@ -92,7 +92,7 @@ fn add_lunch_trips(scenario: &mut Scenario, map: &Map, rng: &mut XorShiftRng, ti
|
||||
timer.next();
|
||||
let num_trips = person.trips.len();
|
||||
// Only handle people with their final trip going back home.
|
||||
if num_trips == 1 || person.trips[num_trips - 1].destination != person.origin {
|
||||
if num_trips <= 1 || person.trips[num_trips - 1].destination != person.origin {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user