Skip to content
Snippets Groups Projects
Commit 264ca6b2 authored by Carlos Mastalli's avatar Carlos Mastalli
Browse files

[unicycle] Reverted back g and L inside unicyle AM

parent 975dca5e
No related branches found
No related tags found
No related merge requests found
...@@ -221,13 +221,8 @@ class ActionModelUnicycleVar: ...@@ -221,13 +221,8 @@ class ActionModelUnicycleVar:
### Cost derivatives ### Cost derivatives
data.R[:ndx,:ndx] = model.costWeights[0] * model.State.Jdiff(model.xref,x,'second') data.R[:ndx,:ndx] = model.costWeights[0] * model.State.Jdiff(model.xref,x,'second')
data.R[ndx:,ndx:] = np.diag([ model.costWeights[1] ]*nu ) data.R[ndx:,ndx:] = np.diag([ model.costWeights[1] ]*nu )
g = np.dot(data.R.T,data.costResiduals) data.g[:] = np.dot(data.R.T,data.costResiduals)
L = np.dot(data.R.T,data.R) data.L[:,:] = np.dot(data.R.T,data.R)
data.Lx[:] = g[:ndx]
data.Lu[:] = g[ndx:]
data.Lxx[:] = L[:ndx,:ndx]
data.Lxu[:] = L[:ndx,ndx:]
data.Luu[:] = L[ndx:,ndx:]
### Dynamic derivatives ### Dynamic derivatives
dx = np.array([u[0],0,u[1]])*model.dt dx = np.array([u[0],0,u[1]])*model.dt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment