-
Notifications
You must be signed in to change notification settings - Fork 10
fastsim-3 style api #133
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
Open
calbaker
wants to merge
91
commits into
main
Choose a base branch
from
feature/remove-auto-get-set
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fastsim-3 style api #133
+180,527
−176,470
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r loco type per recommended
… only plot speed limit in SLTS plots
…te is somehow not working, need to take deeper look.
… the structure with pandas dataframes
test meet_pass::dispatch::test_dispatch::test_simple_dispatch ... FAILED failures: ---- meet_pass::dispatch::test_dispatch::test_simple_dispatch stdout ---- thread 'meet_pass::dispatch::test_dispatch::test_simple_dispatch' panicked at altrios-core/src/meet_pass/dispatch.rs:333:70: called `Result::unwrap()` on an `Err` value: [altrios-core/src/meet_pass/est_times/mod.rs:688] Caused by: 0: [altrios-core/src/meet_pass/est_times/est_time_structs.rs:79] time step: 10 1: [altrios-core/src/train/speed_limit_train_sim.rs:538] 2: [altrios-core/src/consist/consist_model.rs:448] loco idx: 2, loco type: HybridLoco 3: [altrios-core/src/consist/locomotive/locomotive_model.rs:1211] "HybridLoco": "HybridLoco" 4: [altrios-core/src/consist/locomotive/hybrid_loco.rs:279] fc_on: true [altrios-core/src/consist/locomotive/hybrid_loco.rs:280] pwr_out_req.get::<si::kilowatt>(): 2861.03699599694 kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:281] self.edrv.state.pwr_elec_prop_in: TrackedState(2892497.3446029206 m^2 kg^1 s^-3, Fresh) kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:282] gen_pwr_out_req.get::<si::kilowatt>(): 1808.8410260843998 kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:283] self.gen.state.pwr_elec_aux: TrackedState(0.0 m^2 kg^1 s^-3, Fresh) kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:284] self.gen.state.pwr_elec_out_max: TrackedState(1808841.0260843998 m^2 kg^1 s^-3, Fresh) kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:285] self.gen.state.pwr_mech_in: TrackedState(1845799.9999999998 m^2 kg^1 s^-3, Fresh) kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:286] res_pwr_out_req.get::<si::kilowatt>(): 1083.6563185185207 kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:287] self.res.state.pwr_prop_max: TrackedState(1083656.3185185208 m^2 kg^1 s^-3, Fresh) kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:288] self.res.state.pwr_disch_max: TrackedState(1093666.6666666667 m^2 kg^1 s^-3, Fresh) kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:289] self.res.state.pwr_regen_max: TrackedState(1103677.0148148127 m^2 kg^1 s^-3, Fresh) kW [altrios-core/src/consist/locomotive/hybrid_loco.rs:290] self.res.state.pwr_charge_max: TrackedState(1093666.6666666667 m^2 kg^1 s^-3, Fresh) kW 5: [altrios-core/src/consist/locomotive/powertrain/fuel_converter.rs:245] utils::almost_le_uom(&pwr_out_req, &self.pwr_out_max, Some(TOL)): false fc pwr_out_req (1.845800 MW) must be less than or equal to static pwr_out_max (1.678000 MW) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failures: meet_pass::dispatch::test_dispatch::test_simple_dispatch test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 103 filtered out; finished in 0.66s
calbaker
commented
Jun 13, 2025
.force | ||
.update(fric_brake_force, || format_dbg!())?; | ||
|
||
let pwr_whl_out_unclipped = f_consist * *self.state.speed.get_fresh(|| format_dbg!())?; |
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.
@garrettlanderson , this might have introduced a problem
… into feature/remove-auto-get-set
…Stopping for now to go do a couple other things. There's probably some optimization that needs to occur once I get this working. Black did a whole lot of formatting on this. That is most of the changes.
To duplicate verificiation: - run python/altrios/demos/speed_limit_train_sim_demo_with_derating.py - run ```python to_dataframe = train_sim.to_dataframe()[-1] common_cols = set(train_sim.to_dataframe()[-1].columns) & set(to_dataframe_expected.columns) [col for col in common_cols if not to_dataframe_expected[col].equals(to_dataframe[col])] ``` rollout_demo.py runs but plots need attention
…data that needs to be checked and updated if no errors are found
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
to_pydict
andfrom_pydict
work much betterTrackedState
guaranteesTODOs
solves https://github.com/NREL/altrios-private/issues/567