diff --git a/src/variables.jl b/src/variables.jl
index 4b97c03dbfd8e5177948c15da3d9e1f7363b6f9c..d983f8fe85ff7a84bf66f3f846e33bb1b5583407 100644
--- a/src/variables.jl
+++ b/src/variables.jl
@@ -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.",