Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MRIBuilder.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
MRIBuilder.jl
Commits
47b0a137
Verified
Commit
47b0a137
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Fix constraint notation
parent
1593e0b1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/all_building_blocks/spoilt_slice_selects.jl
+4
-4
4 additions, 4 deletions
src/all_building_blocks/spoilt_slice_selects.jl
with
4 additions
and
4 deletions
src/all_building_blocks/spoilt_slice_selects.jl
+
4
−
4
View file @
47b0a137
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment