From 0fddd753935095835571be5b86ddc668f0638fb3 Mon Sep 17 00:00:00 2001 From: Simon Pirkelmann Date: Wed, 18 Nov 2020 21:54:23 +0100 Subject: [PATCH] make parameters of mpc controller changeable --- remote_control/mpc_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remote_control/mpc_controller.py b/remote_control/mpc_controller.py index 33b38b8..44d1dec 100644 --- a/remote_control/mpc_controller.py +++ b/remote_control/mpc_controller.py @@ -6,11 +6,11 @@ from casadi_opt import OpenLoopSolver class MPCController(ControllerBase): - def __init__(self): + def __init__(self, N=20, T=1.0): super().__init__() self.t = None - self.ols = OpenLoopSolver(N=20, T=1.0) + self.ols = OpenLoopSolver(N=N, T=T) self.ols.setup() self.control_rate = self.ols.T / self.ols.N