Skip to content

Commit

Permalink
Merge pull request #48 from andgoldschmidt/mintime_fix
Browse files Browse the repository at this point in the history
min time unequal step fix
  • Loading branch information
aarontrowbridge authored Nov 28, 2023
2 parents 740c1e3 + 7b161de commit 8d91684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/objectives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,11 @@ function MinimumTimeObjective(;
)

# TODO: amend this for case of no TimeStepsAllEqualConstraint
L(Z⃗::AbstractVector, Z::NamedTrajectory) = D * Z⃗[Δt_indices][end]
L(Z⃗::AbstractVector, Z::NamedTrajectory) = D * sum(Z⃗[Δt_indices])

∇L = (Z⃗::AbstractVector, Z::NamedTrajectory) -> begin
= zeros(typeof(Z⃗[1]), length(Z⃗))
∇[Δt_indices[end]] = D
∇[Δt_indices] .= D
return
end

Expand Down

0 comments on commit 8d91684

Please sign in to comment.