Skip to content

Commit

Permalink
the bug was caused by a shallow copy!
Browse files Browse the repository at this point in the history
  • Loading branch information
calbaker committed Jan 31, 2025
1 parent 32374ed commit 0f1477e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions cal_and_val/thermal/cal_hev.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Calibration script for 2021_Hyundai_Sonata_Hybrid_Blue
"""
from pathlib import Path

import numpy as np # noqa: F401
import matplotlib.pyplot as plt # noqa: F401
import seaborn as sns
Expand Down Expand Up @@ -407,7 +406,7 @@ def get_exp_pwr_hvac(df):
verbose=False,
)

val_mod_obj = cal_mod_obj
val_mod_obj = deepcopy(cal_mod_obj)
val_mod_obj.dfs = dfs_for_val
val_mod_obj.models = sds_for_val

Expand Down
2 changes: 2 additions & 0 deletions python/fastsim/pymoo_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def update_params(self, xs: List[Any]):
t1 = time.perf_counter()
if self.verbose:
print(f"Time to update params: {t1 - t0:.3g} s")
import pprint
pprint.pp(sim_drives)
return sim_drives

def get_errors(
Expand Down

0 comments on commit 0f1477e

Please sign in to comment.