Skip to content
Snippets Groups Projects
Verified Commit 2dd5ea9f authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Remove assert statements that cannot be tested for JuMP variables

parent 6c1cdac1
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,6 @@ end
function split_gradient(cgb::ConstantGradient, times::VariableType...)
durations = [times[1], [t[2] - t[1] for t in zip(times[1:end-1], times[2:end])]..., duration(cgb) - times[end]]
@assert all(durations >= 0.)
return [typeof(cgb)(cgb.gradient_strength, d) for d in durations]
end
......
......@@ -38,7 +38,6 @@ bmat_gradient(ngb::NoGradient{3}, qstart::AbstractVector{<:VariableType}) = @. q
function split_gradient(ngb::NoGradient, times::VariableType...)
durations = [times[1], [t[2] - t[1] for t in zip(times[1:end-1], times[2:end])]..., duration(ngb) - times[end]]
@assert all(durations >= 0.)
return [NoGradient(d) for d in durations]
end
......
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