Skip to content

Commit 1816188

Browse files
committed
Use for Problem
1 parent 88d3914 commit 1816188

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/expansions.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ end
110110
function dynamics_expansion!(sig::FunctionSignature, diff::DiffMethod,
111111
model::DiscreteDynamics, D::Vector{<:DynamicsExpansion}, Z::Traj)
112112
for k in eachindex(D)
113-
# RobotDynamics.discrete_jacobian!(Q, D[k].∇f, model, Z[k], args...)
114113
RobotDynamics.jacobian!(sig, diff, model, D[k].∇f, D[k].f, Z[k])
115-
# save_tmp!(D[k])
116-
# D[k].tmpA .= D[k].A_ # avoids allocations later
117-
# D[k].tmpB .= D[k].B_
118114
end
119115
end
120116

src/problem.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ end
9191

9292
"$(TYPEDSIGNATURES)
9393
Get number of states, controls, and knot points"
94-
Base.size(prob::Problem) = state_dim(prob.model), control_dim(prob.model), prob.N
94+
RD.dims(prob::Problem) = state_dim(prob.model), control_dim(prob.model), prob.N
95+
96+
import Base.size
97+
@deprecate size(prob::Problem) dims(prob)
9598

9699
"""
97100
controls(::Problem)
@@ -268,7 +271,7 @@ argument `idx` specifies the location of the dynamics constraint in the constrai
268271
If `idx == -1`, it will be added at the end of the `ConstraintList`.
269272
"""
270273
function add_dynamics_constraints!(prob::Problem, idx=-1)
271-
n,m = size(prob)
274+
n,m = dims(prob)
272275
conSet = prob.constraints
273276

274277
# Implicit dynamics

0 commit comments

Comments
 (0)