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

Fix constraint notation

parent 1593e0b1
No related branches found
No related tags found
No related merge requests found
...@@ -70,9 +70,9 @@ function SpoiltSliceSelect(pulse::RFPulseComponent; orientation=[0, 0, 1], group ...@@ -70,9 +70,9 @@ function SpoiltSliceSelect(pulse::RFPulseComponent; orientation=[0, 0, 1], group
for time_var in (res.rise_time1, res.flat_time1, res.diff_time, res.flat_time2, res.fall_time2) for time_var in (res.rise_time1, res.flat_time1, res.diff_time, res.flat_time2, res.fall_time2)
@constraint model time_var >= 0 @constraint model time_var >= 0
end end
#@constraint model res.diff_time <= res.rise_time1 @constraint model res.diff_time <= res.rise_time1
#@constraint model res.diff_time <= res.fall_time2 @constraint model res.diff_time <= res.fall_time2
#@constraint model qval(res, nothing, 1) == qval(res, 1, nothing) @constraint model qval(res, nothing, :pulse) == qval(res, :pulse, nothing)
end end
if !isnothing(spoiler_scale) if !isnothing(spoiler_scale)
...@@ -81,7 +81,7 @@ function SpoiltSliceSelect(pulse::RFPulseComponent; orientation=[0, 0, 1], group ...@@ -81,7 +81,7 @@ function SpoiltSliceSelect(pulse::RFPulseComponent; orientation=[0, 0, 1], group
elseif spoiler_scale == :max elseif spoiler_scale == :max
@objective model Min objective_function(model) + qval(res, nothing, 1) @objective model Min objective_function(model) + qval(res, nothing, 1)
else else
@constraint model qval(res, nothing, 1) >= 2π * 1e-3 / spoiler_scale @constraint model qval(res, nothing, :pulse) >= 2π * 1e-3 / spoiler_scale
end end
end end
set_simple_constraints!(res, kwargs) set_simple_constraints!(res, kwargs)
......
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