Skip to content

Commit

Permalink
cleanup dynamics run_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
thowell committed Jan 10, 2022
1 parent a696991 commit dfd2314
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions src/dynamics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 comments on commit dfd2314

@thowell
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/52015

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.2 -m "<description of version>" dfd2314be527e20fedebcfa2523b95795eec9a1c
git push origin v0.1.2

Please sign in to comment.