diff --git a/src/components/instant_gradients.jl b/src/components/instant_gradients.jl index ba0eddc648f78773a367a8aa4015e5c61582fcd6..a16787200006271a0adff1abec75f467c52484f1 100644 --- a/src/components/instant_gradients.jl +++ b/src/components/instant_gradients.jl @@ -1,7 +1,7 @@ module InstantGradients import StaticArrays: SVector, SMatrix import JuMP: @constraint -import ...Variables: VariableType, duration, qval, bmat_gradient, get_free_variable, set_simple_constraints!, effective_time, make_generic, adjust_internal +import ...Variables: VariableType, duration, qval, bmat_gradient, get_free_variable, set_simple_constraints!, effective_time, make_generic, adjust_internal, adjustable import ...BuildSequences: global_model import ..AbstractTypes: EventComponent, GradientWaveform @@ -70,6 +70,8 @@ bmat_gradient(::InstantGradient, qstart=nothing) = zero(SMatrix{3, 3, Float64, 3 make_generic(ig::InstantGradient) = ig +adjustable(::InstantGradient) = :gradient + function adjust_internal(ig::InstantGradient1D; orientation=nothing, scale=1., rotation=nothing) if !isnothing(orientation) && !isnothing(rotation) error("Cannot set both the gradient orientation and rotation.")