Skip to content

Commit

Permalink
Update MPC.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschaller committed Apr 23, 2023
1 parent 0abe37b commit 3904c71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/MPC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3904c71

Please sign in to comment.