From dfe00de9e24df205d129850bd4b6b2eed4fc8698 Mon Sep 17 00:00:00 2001 From: Ahmad Amine Date: Wed, 2 Oct 2024 14:46:43 -0400 Subject: [PATCH] Fix test to correct calls of func_KS/ST --- tests/test_dynamics.py | 102 +++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 54 deletions(-) diff --git a/tests/test_dynamics.py b/tests/test_dynamics.py index 3e60f522..9c30707c 100644 --- a/tests/test_dynamics.py +++ b/tests/test_dynamics.py @@ -194,47 +194,43 @@ def test_derivatives(self): x_ks, 0, u, - params={ - "mu": self.mu, - "C_Sf": self.C_Sf, - "C_Sr": self.C_Sr, - "lf": self.lf, - "lr": self.lr, - "h": self.h, - "m": self.m, - "I": self.I, - "s_min": self.s_min, - "s_max": self.s_max, - "sv_min": self.sv_min, - "sv_max": self.sv_max, - "v_switch": self.v_switch, - "a_max": self.a_max, - "v_min": self.v_min, - "v_max": self.v_max, - }, + self.mu, + self.C_Sf, + self.C_Sr, + self.lf, + self.lr, + self.h, + self.m, + self.I, + self.s_min, + self.s_max, + self.sv_min, + self.sv_max, + self.v_switch, + self.a_max, + self.v_min, + self.v_max, ) f_st = func_ST( x_st, 0, u, - params={ - "mu": self.mu, - "C_Sf": self.C_Sf, - "C_Sr": self.C_Sr, - "lf": self.lf, - "lr": self.lr, - "h": self.h, - "m": self.m, - "I": self.I, - "s_min": self.s_min, - "s_max": self.s_max, - "sv_min": self.sv_min, - "sv_max": self.sv_max, - "v_switch": self.v_switch, - "a_max": self.a_max, - "v_min": self.v_min, - "v_max": self.v_max, - }, + self.mu, + self.C_Sf, + self.C_Sr, + self.lf, + self.lr, + self.h, + self.m, + self.I, + self.s_min, + self.s_max, + self.sv_min, + self.sv_max, + self.v_switch, + self.a_max, + self.v_min, + self.v_max, ) start = time.time() @@ -243,24 +239,22 @@ def test_derivatives(self): x_st, 0, u, - params={ - "mu": self.mu, - "C_Sf": self.C_Sf, - "C_Sr": self.C_Sr, - "lf": self.lf, - "lr": self.lr, - "h": self.h, - "m": self.m, - "I": self.I, - "s_min": self.s_min, - "s_max": self.s_max, - "sv_min": self.sv_min, - "sv_max": self.sv_max, - "v_switch": self.v_switch, - "a_max": self.a_max, - "v_min": self.v_min, - "v_max": self.v_max, - }, + self.mu, + self.C_Sf, + self.C_Sr, + self.lf, + self.lr, + self.h, + self.m, + self.I, + self.s_min, + self.s_max, + self.sv_min, + self.sv_max, + self.v_switch, + self.a_max, + self.v_min, + self.v_max, ) duration = time.time() - start avg_fps = 10000 / duration