From 3904c71a4185b8f0df8267e642f1576948660731 Mon Sep 17 00:00:00 2001 From: maximilianschaller <79449026+maxschaller@users.noreply.github.com> Date: Sun, 23 Apr 2023 14:23:50 +0200 Subject: [PATCH] Update MPC.ipynb --- examples/MPC.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/MPC.ipynb b/examples/MPC.ipynb index a2a2921..3a35274 100644 --- a/examples/MPC.ipynb +++ b/examples/MPC.ipynb @@ -57,7 +57,7 @@ "x_init = cp.Parameter(n, name='x_init')\n", "\n", "# define objective\n", - "objective = cp.Minimize(cp.sum_squares(Psqrt@X[:,H-1]) + cp.sum_squares(Qsqrt@X[:,:H]) + cp.sum_squares(Rsqrt@U))\n", + "objective = cp.Minimize(cp.sum_squares(Psqrt@X[:,H]) + cp.sum_squares(Qsqrt@X[:,:H]) + cp.sum_squares(Rsqrt@U))\n", "\n", "# define constraints\n", "constraints = [X[:,1:] == A@X[:,:H]+B@U,\n",