Skip to content
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 interpolation unwrap #142

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

calbaker
Copy link
Collaborator

@calbaker calbaker commented Jul 10, 2024

fixes error described in commit message in dc22c07

Since #143 merges all this into fastsim-3, this PR exists solely to make it really easy to get feedback from Kyle on the changes introduced here.

@@ -144,7 +144,7 @@ pub fn interp1d(
if x >= &x_data[size - 2] {
i = size - 2;
} else {
while x > &x_data[i + 1] {
while i < x_data.len() - 2 && x > &x_data[i + 1] {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kylecarow , could you verify that this is reasonable? See the linked error.

…xceeds-max-soc-bug

# Conflicts:
#	fastsim-core/src/simdrive.rs
#	fastsim-core/src/traits.rs
@calbaker calbaker changed the title F3/fix/hev exceeds max soc bug fix interpolation unwrap Jul 17, 2024
@calbaker calbaker merged commit f2b2132 into f3/fix/hev-exceeds-max-soc Jul 17, 2024
6 checks passed
@calbaker calbaker deleted the f3/fix/hev-exceeds-max-soc-bug branch July 17, 2024 16:49
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.

1 participant