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

Add default fixed implementation for `AbstractBlock`.

parent fed383cb
No related branches found
No related tags found
No related merge requests found
......@@ -14,13 +14,21 @@ In addition this defines:
module Variables
import JuMP: @constraint, @variable, Model, @objective, objective_function, AbstractJuMPScalar
import ..Scanners: gradient_strength, slew_rate, Scanner
import ..BuildSequences: global_model, global_scanner
import ..BuildSequences: global_model, global_scanner, fixed
"""
Parent type of all components, building block, and sequences that form an MRI sequence.
"""
abstract type AbstractBlock end
function fixed(ab::AbstractBlock)
params = []
for prop_name in propertynames(ab)
push!(params, fixed(getproperty(ab, prop_name)))
end
return typeof(ab)(params...)
end
all_variables_symbols = [
:block => [
:duration => "duration of the building block in ms.",
......
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