From e695acc4fbe6887760a454ae99b23e12f63ce8f7 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Fri, 31 Jan 2025 09:03:00 -0700 Subject: [PATCH] looks like more parameters need to be exposed to pymoo --- cal_and_val/thermal/cal_hev.py | 40 +++++++++++++++++----------------- python/fastsim/pymoo_api.py | 7 ------ 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/cal_and_val/thermal/cal_hev.py b/cal_and_val/thermal/cal_hev.py index e8a6fa8b..ef67bc4d 100644 --- a/cal_and_val/thermal/cal_hev.py +++ b/cal_and_val/thermal/cal_hev.py @@ -332,26 +332,26 @@ def get_exp_pwr_hvac(df): get_mod_soc, get_exp_soc ), - # ( - # get_mod_pwr_fuel, - # get_exp_pwr_fuel - # ), - # ( - # get_mod_cab_temp, - # get_exp_cab_temp - # ), - # ( - # get_mod_fc_temp, - # get_exp_fc_temp - # ), - # ( - # get_mod_spd, - # get_exp_spd - # ), - # ( - # get_mod_pwr_hvac, - # get_exp_pwr_hvac - # ), + ( + get_mod_pwr_fuel, + get_exp_pwr_fuel + ), + ( + get_mod_cab_temp, + get_exp_cab_temp + ), + ( + get_mod_fc_temp, + get_exp_fc_temp + ), + ( + get_mod_spd, + get_exp_spd + ), + ( + get_mod_pwr_hvac, + get_exp_pwr_hvac + ), ), param_fns=( new_em_eff_max, diff --git a/python/fastsim/pymoo_api.py b/python/fastsim/pymoo_api.py index aef4599a..f9f23194 100644 --- a/python/fastsim/pymoo_api.py +++ b/python/fastsim/pymoo_api.py @@ -157,8 +157,6 @@ 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( @@ -255,13 +253,8 @@ def get_errors( objectives[key].append(mod_sig) t2 = time.perf_counter() - import pprint - print("\n") - pprint.pp(objectives) - print("\n") if self.verbose: print(f"Time to postprocess: {t2 - t1:.3g} s") - print(f'\n{objectives}\n') if return_mods: return objectives, solved_mods else: