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
8abd6c06
Verified
Commit
8abd6c06
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Add default fixed implementation for `AbstractBlock`.
parent
fed383cb
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/variables.jl
+9
-1
9 additions, 1 deletion
src/variables.jl
with
9 additions
and
1 deletion
src/variables.jl
+
9
−
1
View file @
8abd6c06
...
@@ -14,13 +14,21 @@ In addition this defines:
...
@@ -14,13 +14,21 @@ In addition this defines:
module
Variables
module
Variables
import
JuMP
:
@constraint
,
@variable
,
Model
,
@objective
,
objective_function
,
AbstractJuMPScalar
import
JuMP
:
@constraint
,
@variable
,
Model
,
@objective
,
objective_function
,
AbstractJuMPScalar
import
..
Scanners
:
gradient_strength
,
slew_rate
,
Scanner
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.
Parent type of all components, building block, and sequences that form an MRI sequence.
"""
"""
abstract type
AbstractBlock
end
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
=
[
all_variables_symbols
=
[
:
block
=>
[
:
block
=>
[
:
duration
=>
"duration of the building block in ms."
,
:
duration
=>
"duration of the building block in ms."
,
...
...
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