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

[action] Removed g, L and F variables inside DAMData(NumDiff)

parent 8eb7a6c1
No related branches found
No related tags found
No related merge requests found
...@@ -74,9 +74,8 @@ class DifferentialActionDataAbstract: ...@@ -74,9 +74,8 @@ class DifferentialActionDataAbstract:
self.xout = np.zeros(nout) self.xout = np.zeros(nout)
# Dynamics data # Dynamics data
self.F = np.zeros([ nout,ndx+nu ]) self.Fx = np.zeros([nout,ndx])
self.Fx = self.F[:,:ndx] self.Fu = np.zeros([nout,nu])
self.Fu = self.F[:,-nu:]
# Cost data # Cost data
if costData == None: if costData == None:
...@@ -275,20 +274,19 @@ class DifferentialActionDataNumDiff: ...@@ -275,20 +274,19 @@ class DifferentialActionDataNumDiff:
self.datax = [ model.model0.createData() for i in range(model.ndx) ] self.datax = [ model.model0.createData() for i in range(model.ndx) ]
self.datau = [ model.model0.createData() for i in range(model.nu ) ] self.datau = [ model.model0.createData() for i in range(model.nu ) ]
self.g = np.zeros([ ndx+nu ]) # Dynamics data
self.F = np.zeros([ nout,ndx+nu ]) self.Fx = np.zeros([nout,ndx])
self.Lx = self.g[:ndx] self.Fu = np.zeros([nout,nu])
self.Lu = self.g[ndx:]
self.Fx = self.F[:,:ndx] # Cost data
self.Fu = self.F[:,ndx:] self.Lx = np.zeros(ndx)
self.Lu = np.zeros(nu)
if model.ncost >1 : if model.ncost >1 :
self.costResiduals = self.data0.costResiduals self.costResiduals = self.data0.costResiduals
self.R = np.zeros([model.ncost,ndx+nu]) self.R = np.zeros([model.ncost,ndx+nu])
self.Rx = self.R[:,:ndx] self.Rx = self.R[:,:ndx]
self.Ru = self.R[:,ndx:] self.Ru = self.R[:,ndx:]
if model.withGaussApprox: if model.withGaussApprox:
self. L = np.zeros([ ndx+nu, ndx+nu ]) self.Lxx = np.zeros([ndx,ndx])
self.Lxx = self.L[:ndx,:ndx] self.Lxu = np.zeros([ndx,nu])
self.Lxu = self.L[:ndx,ndx:] self.Luu = np.zeros([nu,nu])
self.Lux = self.L[ndx:,:ndx] \ No newline at end of file
self.Luu = self.L[ndx:,ndx:]
\ No newline at end of file
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