-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix/remove-loaded-empty -- removes _loaded
and _empty
fields from rail vehicle
#81
Conversation
rather than `_empty` and `_loaded` fields
_loaded
and _empty
fields from rail vehicle
python unit tests pass some functional tests fail
Runing `python speed_limit_train_sim_demo.py` yields: Traceback (most recent call last): File "/Users/cbaker2/Documents/github/altrios/python/altrios/demos/speed_limit_train_sim_demo.py", line 77, in <module> train_sim: alt.SpeedLimitTrainSim = tsb.make_speed_limit_train_sim( RuntimeError: [altrios-core/src/train/train_config.rs:644] Caused by: Extra values in `n_cars_by_type` that are not in `car_type`: ["Manifest_Empty", "stivelrlydt"]
running `python speed_limit_simple_corr_demo.py` yields: Traceback (most recent call last): File "/Users/cbaker2/Documents/github/altrios/python/altrios/demos/speed_limit_simple_corr_demo.py", line 73, in <module> train_sim: alt.SetSpeedTrainSim = tsb.make_speed_limit_train_sim( RuntimeError: [altrios-core/src/train/train_config.rs:647] Caused by: [altrios-core/src/train/train_config.rs:163] Expected `self.n_cars_by_type` to contain 'Manifest_Empty'
made it so logging feature is enabled but logging must be activated
bail!("`set_mass` is not enabled for `RailVehicle`") | ||
} | ||
|
||
fn derived_mass(&self) -> anyhow::Result<Option<si::Mass>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we size locomotive consists in the train planner, we also include axle_count * mass_extra_per_axle_kilograms
when estimating mass. Just flagging to confirm we don't need to harmonize across the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbbruch, that should be correct, and right now, I don't think there is a cleaner way to do this. I think there is room for improvement that we should discuss, but I think that can come later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment for one thing to double-check in rail_vehicle.rs
but otherwise all looks good to me.
because friction brakes now have to handle rotational mass, too
Highlights
rail_vehicles: Vec<RailVehicle>
is now an input toTrainConfig::new()
rail_vehicle
is no longer needed as input tomake_.*_train_sim
make_.*_train_sim_parts
is now a thing for getting intermediate objects for inspectionTODO
Mass
trait to train stuff, where appropriate -- @calbaker