mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-25 11:44:25 +03:00
silence spammy logs
This commit is contained in:
parent
c9a0ea213b
commit
fc2abb1524
@ -111,11 +111,15 @@ fn make_turns(
|
||||
) -> Vec<Turn> {
|
||||
// TODO: Figure out why this happens in the huge map
|
||||
if incoming.is_empty() {
|
||||
println!("WARNING: {} has no incoming lanes of some type", parent);
|
||||
if false {
|
||||
println!("WARNING: {} has no incoming lanes of some type", parent);
|
||||
}
|
||||
return Vec::new();
|
||||
}
|
||||
if outgoing.is_empty() {
|
||||
println!("WARNING: {} has no outgoing lanes of some type", parent);
|
||||
if false {
|
||||
println!("WARNING: {} has no outgoing lanes of some type", parent);
|
||||
}
|
||||
return Vec::new();
|
||||
}
|
||||
|
||||
|
@ -666,12 +666,14 @@ impl DrivingSimState {
|
||||
{
|
||||
let other_dist = self.cars[&other].dist_along;
|
||||
if other_dist >= dist_along {
|
||||
println!(
|
||||
"{} can't spawn, because they'd wind up too close ({}) behind {}",
|
||||
car,
|
||||
other_dist - dist_along,
|
||||
other
|
||||
);
|
||||
if false {
|
||||
println!(
|
||||
"{} can't spawn, because they'd wind up too close ({}) behind {}",
|
||||
car,
|
||||
other_dist - dist_along,
|
||||
other
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -684,7 +686,9 @@ impl DrivingSimState {
|
||||
0.0 * si::MPS,
|
||||
);
|
||||
if accel_for_other_to_stop <= other_vehicle.max_deaccel {
|
||||
println!("{} can't spawn {} in front of {}, because {} would have to do {} to not hit {}", car, dist_along - other_dist, other, other, accel_for_other_to_stop, car);
|
||||
if false {
|
||||
println!("{} can't spawn {} in front of {}, because {} would have to do {} to not hit {}", car, dist_along - other_dist, other, other, accel_for_other_to_stop, car);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -141,18 +141,20 @@ impl Spawner {
|
||||
spawned_agents += 1;
|
||||
}
|
||||
};
|
||||
} else {
|
||||
} else if false {
|
||||
println!(
|
||||
"Couldn't find path from {} to {} for {:?}",
|
||||
req.0, req.1, cmd
|
||||
);
|
||||
}
|
||||
}
|
||||
println!(
|
||||
"Spawned {} agents of requested {}",
|
||||
spawned_agents,
|
||||
requested_paths.len()
|
||||
);
|
||||
if false {
|
||||
println!(
|
||||
"Spawned {} agents of requested {}",
|
||||
spawned_agents,
|
||||
requested_paths.len()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// This happens immediately; it isn't scheduled.
|
||||
@ -477,7 +479,9 @@ fn pick_ped_goal<R: Rng + ?Sized>(rng: &mut R, map: &Map, start: LaneID) -> Buil
|
||||
fn calculate_paths(requested_paths: &Vec<(LaneID, LaneID)>, map: &Map) -> Vec<Option<Vec<LaneID>>> {
|
||||
use rayon::prelude::*;
|
||||
|
||||
println!("Calculating {} paths", requested_paths.len());
|
||||
if false {
|
||||
println!("Calculating {} paths", requested_paths.len())
|
||||
};
|
||||
// TODO better timer macro
|
||||
let timer = Instant::now();
|
||||
let paths: Vec<Option<Vec<LaneID>>> = requested_paths
|
||||
@ -487,7 +491,9 @@ fn calculate_paths(requested_paths: &Vec<(LaneID, LaneID)>, map: &Map) -> Vec<Op
|
||||
|
||||
let elapsed = timer.elapsed();
|
||||
let dt = elapsed.as_secs() as f64 + f64::from(elapsed.subsec_nanos()) * 1e-9;
|
||||
println!("Calculating {} paths took {}s", paths.len(), dt,);
|
||||
if false {
|
||||
println!("Calculating {} paths took {}s", paths.len(), dt)
|
||||
};
|
||||
paths
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user