mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-14 04:57:53 -05:00
InvertedPendulumMPCControl: fixed deprecated waring about using * for matrix multiplication (#631)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user