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)