Skip to content

investigate and maybe fix some unexpected behavior with derating in Hybrid #126

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

calbaker
Copy link
Collaborator

@calbaker calbaker commented May 8, 2025

Problem

but it's acting a bit weirdly for the hybrid locomotive, which needs further investigation

Solution

  • turned out the peak FC power for the HEL was being set to the same as the Conv when applying derating, which offset all of the derating and then some
  • fix the above for the HEL

but it's acting a bit weirdly for the hybrid locomotive, which needs further investigation
[hel.clone()]
+ [alt.Locomotive.default()] * 1
[alt.Locomotive.default()] * 2
# + [hel.clone()]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FDsteven uncomment this

@@ -47,24 +47,24 @@
fc_with_derate.set_default_elev_and_temp_derate()
fc_with_derate_dict = fc_with_derate.to_pydict()
Copy link
Collaborator Author

@calbaker calbaker May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FDsteven this fc_with_derate_dict is the conventional FC. We need to make an equivalent for the hybrid and set the derate on it instead!

  • get the HEL dict
  • pull the FC out
  • instantiate a new FC for the HEL
  • run the set_...derate method
  • turn it back into a dict
  • put in the HEL dict
  • turn the HEL dict back into a HEL

@@ -476,10 +476,10 @@ def plot_bel_pwr_and_soc(ts: alt.SpeedLimitTrainSim, mod_str: str) -> Tuple[plt.
ax[0].plot(
df_with_derate['history.time_seconds'],
df_with_derate['loco_con.history.energy_fuel_joules'] / 1e9,
label='with derate',
label='with derate',u
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • remove the ,u at the end of this line, d'oh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants