From c066a9420e9373e85bc2214cbb44e3a2fd5cc593 Mon Sep 17 00:00:00 2001 From: Trung Kien Date: Sun, 23 Jan 2022 17:35:54 +0700 Subject: [PATCH] InvertedPendulumMPCControl: fixed deprecated waring about using * for matrix multiplication (#631) --- .../InvertedPendulumMPCControl/inverted_pendulum_mpc_control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/InvertedPendulumMPCControl/inverted_pendulum_mpc_control.py b/Control/InvertedPendulumMPCControl/inverted_pendulum_mpc_control.py index e7b30777..3764f295 100644 --- a/Control/InvertedPendulumMPCControl/inverted_pendulum_mpc_control.py +++ b/Control/InvertedPendulumMPCControl/inverted_pendulum_mpc_control.py @@ -77,7 +77,7 @@ def mpc_control(x0): for t in range(T): cost += cvxpy.quad_form(x[:, t + 1], Q) cost += cvxpy.quad_form(u[:, t], R) - constr += [x[:, t + 1] == A * x[:, t] + B * u[:, t]] + constr += [x[:, t + 1] == A @ x[:, t] + B @ u[:, t]] constr += [x[:, 0] == x0[:, 0]] prob = cvxpy.Problem(cvxpy.Minimize(cost), constr)