Skip to content

Commit

Permalink
Remove the panic handler for generating movements. After regenerating
Browse files Browse the repository at this point in the history
all data, verified no problems! #1061
  • Loading branch information
dabreegster committed Feb 13, 2023
1 parent a3bdd62 commit ba13ac1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
14 changes: 1 addition & 13 deletions map_model/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,19 +880,7 @@ impl Map {
let movements = timer.parallelize(
"generate movements",
self.intersections.iter().map(|i| i.id).collect(),
|i| {
// TODO Hack around geometry problems generating these, usually at intersections
// without valid geometry. Stuff downstream probably breaks.
match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
Movement::for_i(i, self)
})) {
Ok(result) => result,
Err(err) => {
error!("Movement::for_i broke on {i}: {err:?}");
BTreeMap::new()
}
}
},
|i| Movement::for_i(i, self),
);
for (i, movements) in self.intersections.iter_mut().zip(movements.into_iter()) {
i.movements = movements;
Expand Down
6 changes: 3 additions & 3 deletions tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ use synthpop::{IndividTrip, PersonSpec, Scenario, TripEndpoint, TripMode, TripPu

fn main() -> Result<()> {
abstutil::logger::setup();
if true {
geometry_test()?;
}
test_blockfinding()?;
test_lane_changing(&import_map(abstio::path(
"../tests/input/lane_selection.osm",
Expand All @@ -31,9 +34,6 @@ fn main() -> Result<()> {
if false {
smoke_test()?;
}
if true {
geometry_test()?;
}
Ok(())
}

Expand Down

0 comments on commit ba13ac1

Please sign in to comment.