Skip to content

Commit

Permalink
name change and other minor but important updates
Browse files Browse the repository at this point in the history
  • Loading branch information
calbaker committed Jul 17, 2024
1 parent cfcc02d commit 9ee5e14
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 225 deletions.
4 changes: 4 additions & 0 deletions python/altrios/demos/set_speed_train_sim_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

SAVE_INTERVAL = 1

alt.utils.set_log_level("DEBUG")

# https://docs.rs/altrios-core/latest/altrios_core/train/struct.TrainConfig.html
train_config = alt.TrainConfig(
n_cars_by_type={
Expand Down Expand Up @@ -84,6 +86,8 @@
save_interval=SAVE_INTERVAL,
)

alt.utils.set_log_level("WARNING")

train_sim.set_save_interval(SAVE_INTERVAL)
t0 = time.perf_counter()
train_sim.walk()
Expand Down
2 changes: 1 addition & 1 deletion python/altrios/demos/speed_limit_train_sim_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sns.set_theme()

# uncomment this line to see example of logging functionality
alt.utils.set_log_level("INFO")
# alt.utils.set_log_level("INFO")

SHOW_PLOTS = alt.utils.show_plots()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ car_type: Intermodal_Empty
length: 18.0
axle_count: 4
brake_count: 1
mass_static: 28500.0
mass_static_base: 28500.0
mass_freight: 0.0
speed_max: 20.0
braking_ratio: 0.25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ car_type: Intermodal_Loaded
length: 18.0
axle_count: 4
brake_count: 1
mass_static: 28500.0
mass_static_base: 28500.0
mass_freight: 101500.0
speed_max: 20.0
braking_ratio: 0.11
Expand Down
2 changes: 1 addition & 1 deletion python/altrios/resources/rolling_stock/Manifest_Empty.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ car_type: Manifest_Empty
length: 18.0
axle_count: 4
brake_count: 1
mass_static: 28500.0
mass_static_base: 28500.0
mass_freight: 0.0
speed_max: 20.0
braking_ratio: 0.25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ car_type: Manifest_Loaded
length: 18.0
axle_count: 4
brake_count: 1
mass_static: 28500.0
mass_static_base: 28500.0
mass_freight: 101500.0
speed_max: 20.0
braking_ratio: 0.11
Expand Down
2 changes: 1 addition & 1 deletion python/altrios/resources/rolling_stock/Unit_Empty.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ car_type: Unit_Empty
length: 10.7
axle_count: 4
brake_count: 1
mass_static: 26500.0
mass_static_base: 26500.0
mass_freight: 0.0
speed_max: 20.0
braking_ratio: 0.25
Expand Down
2 changes: 1 addition & 1 deletion python/altrios/resources/rolling_stock/Unit_Loaded.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ car_type: Unit_Loaded
length: 10.7
axle_count: 4
brake_count: 1
mass_static: 26500.0
mass_static_base: 26500.0
mass_freight: 90500.0
speed_max: 20.0
braking_ratio: 0.11
Expand Down
4 changes: 2 additions & 2 deletions python/altrios/resources/rolling_stock/rail_vehicles.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Car Type,Length (m),Axle Count,Brake Count,Mass Static (kg),Mass Freight (kg),Speed Max (m/s),Braking Ratio,Mass Extra per Axle (kg),Bearing Res per Axle (N),Rolling Ratio,Davis B (s/m),Cd*A (m^2),Curve Coefficient 0,Curve Coefficient 1,Curve Coefficient 2
Car Type,Length (m),Axle Count,Brake Count,Mass Static Base (kg),Mass Freight (kg),Speed Max (m/s),Braking Ratio,Mass Extra per Axle (kg),Bearing Res per Axle (N),Rolling Ratio,Davis B (s/m),Cd*A (m^2),Curve Coefficient 0,Curve Coefficient 1,Curve Coefficient 2
Unit_Empty,10.7,4,1,26500,0,20,0.25,750,80,0.00075,0,4,0.056,0.4387579,0.01025485
Unit_Loaded,10.7,4,1,26500,90500,20,0.11,750,80,0.00075,0,4,0.056,0.4387579,0.01025485
Intermodal_Empty,18,4,1,28500,0,20,0.25,750,80,0.00075,0,4,0,0,0
Intermodal_Loaded,18,4,1,28500,101500,20,0.11,750,80,0.00075,0,4,0,0,0
Manifest_Empty,18,4,1,28500,0,20,0.25,750,40.26,0.001546,0,1.231,0.056,0.4387579,0.01025485
Manifest_Loaded,18,4,1,28500,101500,20,0.11,750,40.26,0.001546,0,4.087,0.056,0.4387579,0.01025485
Manifest_Loaded,18,4,1,28500,101500,20,0.11,750,40.26,0.001546,0,4.087,0.056,0.4387579,0.01025485
6 changes: 3 additions & 3 deletions rust/altrios-core/src/train/rail_vehicle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pub struct RailVehicle {
pub brake_count: u8,

/// Railcar mass, not including freight
#[serde(alias = "Mass Static (kg)")]
pub mass_static: si::Mass,
#[serde(alias = "Mass Static Base (kg)")]
pub mass_static_base: si::Mass,
/// Freight component of total static railcar mass
#[serde(alias = "Mass Freight (kg)")]
pub mass_freight: si::Mass,
Expand Down Expand Up @@ -64,7 +64,7 @@ pub struct RailVehicle {
impl RailVehicle {
/// Returns total non-rotational mass, sum of `mass_static_freight` and `mass_static`
pub fn mass_static_total(&self) -> si::Mass {
self.mass_static + self.mass_freight
self.mass_static_base + self.mass_freight
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust/altrios-core/src/train/test_rail_vehicles.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Car Type,Length (m),Axle Count,Brake Count,Mass Static (kg),Mass Freight (kg),Speed Max (m/s),Braking Ratio,Mass Extra per Axle (kg),Bearing Res per Axle (N),Rolling Ratio,Davis B (s/m),Cd*A (m^2),Curve Coefficient 0,Curve Coefficient 1,Curve Coefficient 2
Car Type,Length (m),Axle Count,Brake Count,Mass Static Base (kg),Mass Freight (kg),Speed Max (m/s),Braking Ratio,Mass Extra per Axle (kg),Bearing Res per Axle (N),Rolling Ratio,Davis B (s/m),Cd*A (m^2),Curve Coefficient 0,Curve Coefficient 1,Curve Coefficient 2
Bulk,60,4,1,30000,65000,20,0.11,1500,18,1.5,0,4,0.0,0.0,0.0
Loading

0 comments on commit 9ee5e14

Please sign in to comment.