diff --git a/src/dynamics.jl b/src/dynamics.jl index e1eeacb..f5b85bc 100644 --- a/src/dynamics.jl +++ b/src/dynamics.jl @@ -163,46 +163,8 @@ function xuy_indices(cons::Vector{Dynamics{T}}) where T [collect((t > 1 ? sum([cons[s].nx + cons[s].nu for s = 1:(t-1)]) : 0) .+ (1:(+ cons[t].nx + cons[t].nu + cons[t].ny))) for t = 1:length(cons)] end -# struct DynamicsIndices -# x::Vector{Vector{Int}} -# u::Vector{Vector{Int}} -# xu::Vector{Vector{Int}} -# xuy::Vector{Vector{Int}} -# end - -# struct DynamicsDimensions -# x::Vector{Int} -# u::Vector{Int} -# w::Vector{Int} -# end - -# function DynamicsDimensions(cons::Vector{Dynamics{T}}; -# w_dim=[0 for t = 1:(length(cons) + 1)]) where T -# x_dim = [[con.nx for con in cons]..., cons[end].ny] -# u_dim = [con.nu for con in cons] -# return DynamicsDimensions(x_dim, u_dim, w_dim) -# end - function dimensions(dyn::Vector{Dynamics{T}}; w=[0 for t = 1:(length(dyn) + 1)]) where T x = [[d.nx for d in dyn]..., dyn[end].ny] u = [[d.nu for d in dyn]..., 0] return x, u, w -end - -# struct DynamicsModel{T} -# dyn::Vector{Dynamics{T}} -# idx::DynamicsIndices -# dim::DynamicsDimensions -# end - -# function DynamicsModel(cons::Vector{Dynamics{T}}; -# w_dim=[0 for t = 1:(length(cons) + 1)]) where T -# idx = DynamicsIndices( -# x_indices(cons), -# u_indices(cons), -# xu_indices(cons), -# xuy_indices(cons)) -# dim = DynamicsDimensions(cons, w_dim=w_dim) -# DynamicsModel(cons, idx, dim) -# end - +end \ No newline at end of file