Skip to content

Commit

Permalink
removed deprecated hard-coded braking parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
calbaker committed Jan 21, 2025
1 parent 8b7d396 commit 52d64c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 2 additions & 0 deletions rust/altrios-core/src/train/friction_brakes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ use crate::imports::*;
}
)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, HistoryMethods, SerdeAPI)]
// brake propagation rate is ~800 ft/s (about speed of sound)
// ramp up duration is ~30 s
pub struct FricBrake {
/// max static force achievable
pub force_max: si::Force,
Expand Down
11 changes: 1 addition & 10 deletions rust/altrios-core/src/train/train_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,6 @@ impl TrainSimBuilder {
))
};

// brake propagation rate is 800 ft/s (about speed of sound)
// ramp up duration is ~30 s
// TODO: make this not hard coded!
let ramp_up_time = 0.0 * uc::S;
let ramp_up_coeff = 0.6 * uc::R;

let fric_brake = FricBrake::new(
max_fric_braking,
ramp_up_time,
Expand Down Expand Up @@ -1457,10 +1451,7 @@ impl SpeedLimitTrainSimVec {
}

pub fn get_cars_moved(&self, annualize: bool) -> f64 {
self.0
.iter()
.map(|sim| sim.get_cars_moved(annualize))
.sum()
self.0.iter().map(|sim| sim.get_cars_moved(annualize)).sum()
}

pub fn get_res_kilometers(&mut self, annualize: bool) -> f64 {
Expand Down

0 comments on commit 52d64c3

Please sign in to comment.