Skip to content

Commit

Permalink
pre-commit/test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luca7084 committed Jul 21, 2023
1 parent 3367ca1 commit a79925a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rocket_twin/systems/control/controller_fmu.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def setup(self, model_path, model_name):

self.add_inward("time_var", 0.0, desc="System time", unit="")
self.add_inward("time_int", 0.0, desc="Interval between fueling end and launch", unit="")
self.add_inward("time_lnc", 100000., desc="Launch time", unit='')
self.add_inward("time_lnc", 100000.0, desc="Launch time", unit="")
self.add_transient("x", der="1")

pulling = {
Expand Down
6 changes: 3 additions & 3 deletions rocket_twin/tests/test_controller_fmu.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def test_controller_fmu(self):
values = {
"g_tank.w_out_max": 1.0,
"rocket.tank.w_out_max": 0.5,
"controller.time_int": 3.,
"rocket.controller.time_int": 3.,
"controller.time_int": 3.0,
"rocket.controller.time_int": 3.0,
}
driver.set_scenario(init=init, values=values)
driver.add_recorder(DataFrameRecorder(includes=["rocket.a", "rocket.dyn.a"]), period=1.0)
Expand All @@ -46,6 +46,6 @@ def test_controller_fmu(self):
data = data.drop(["Section", "Status", "Error code"], axis=1)
print(data)

np.testing.assert_allclose(sys.rocket.a, 41.0, atol=10 ** (0))
np.testing.assert_allclose(sys.rocket.a, 40.0, atol=10 ** (0))
np.testing.assert_allclose(sys.g_tank.weight_p, 5.0, atol=10 ** (0))
np.testing.assert_allclose(sys.rocket.tank.weight_p, 0.0, atol=10 ** (0))

0 comments on commit a79925a

Please sign in to comment.