diff --git a/src/MRIBuilder.jl b/src/MRIBuilder.jl index f43eb7a93148fb54e6c12701486b0e59c37a9c68..038fe00572d19db60968403461b024d5c0f54e1e 100644 --- a/src/MRIBuilder.jl +++ b/src/MRIBuilder.jl @@ -3,7 +3,7 @@ Builds and optimises NMR/MRI sequences. """ module MRIBuilder -include("global_model.jl") +include("solve_model.jl") include("scanners.jl") include("variables.jl") include("building_blocks.jl") @@ -14,7 +14,7 @@ include("gradients/gradients.jl") include("pulses/pulses.jl") include("readouts/readouts.jl") -import .GlobalModel: set_model +import .SolveModel: set_model export set_model import .Scanners: Scanner, B0, Siemens_Connectom, Siemens_Prisma, Siemens_Terra diff --git a/src/containers/sequences.jl b/src/containers/sequences.jl index 0e53c13299c1889b16887832bac5c1670d098e95..5093fff094391d5ef67938a24bc87af9e034f562 100644 --- a/src/containers/sequences.jl +++ b/src/containers/sequences.jl @@ -1,6 +1,6 @@ module Sequences import JuMP: Model -import ...GlobalModel: @global_model_constructor +import ...SolveModel: @global_model_constructor import ...Variables: variables, start_time, duration, VariableType import ...BuildingBlocks: BuildingBlock diff --git a/src/gradients/instant_gradients.jl b/src/gradients/instant_gradients.jl index 22016ec190c3dd226f5f423532f31ca3aabf6a22..6e27687de1e9372076e6755d0a8601e64cf8b107 100644 --- a/src/gradients/instant_gradients.jl +++ b/src/gradients/instant_gradients.jl @@ -3,7 +3,7 @@ import JuMP: @constraint, @variable, Model, owner_model import ...Variables: qval, bval, start_time, duration, variables, get_free_variable, VariableType import ...BuildingBlocks: BuildingBlock import ...ConcreteBlocks: to_concrete_block, AbstractConcreteBlock -import ...GlobalModel: @global_model_constructor +import ...SolveModel: @global_model_constructor """ InstantGradientBlock(; orientation=:bvec, qval=nothing) diff --git a/src/gradients/pulsed_gradients.jl b/src/gradients/pulsed_gradients.jl index 6a91760c355235c899d44deda07fd50f25385ac5..93d5cbdecc56626266ed663ba01c2269754422e3 100644 --- a/src/gradients/pulsed_gradients.jl +++ b/src/gradients/pulsed_gradients.jl @@ -8,7 +8,7 @@ import StaticArrays: SVector import ...Variables: qval, bval, rise_time, flat_time, slew_rate, gradient_strength, variables, duration, δ, get_free_variable, VariableType import ...BuildingBlocks: BuildingBlock, duration, set_simple_constraints! import ...ConcreteBlocks: ConcreteBlock, to_concrete_block -import ...GlobalModel: @global_model_constructor +import ...SolveModel: @global_model_constructor """ diff --git a/src/pulses/constant_pulses.jl b/src/pulses/constant_pulses.jl index c83209a1dc800a8e517eb95621492e4b81bfed68..f641b2558f8e509027372b0124ab08ff8f5f7f4c 100644 --- a/src/pulses/constant_pulses.jl +++ b/src/pulses/constant_pulses.jl @@ -3,7 +3,7 @@ import JuMP: VariableRef, @constraint, @variable, value, Model import ...BuildingBlocks: BuildingBlock, set_simple_constraints! import ...ConcreteBlocks: ConcreteBlock, to_concrete_block import ...Variables: variables, get_free_variable, flip_angle, phase, amplitude, frequency, bandwidth, start_time, end_time, VariableType, duration -import ...GlobalModel: @global_model_constructor +import ...SolveModel: @global_model_constructor """ ConstantPulse(; variables...) diff --git a/src/pulses/instant_pulses.jl b/src/pulses/instant_pulses.jl index ffee58be9710c8c189ef20f37ca7030a21c0dff6..a230830100fd13400f9a290e4dbdfa1ecd8310c6 100644 --- a/src/pulses/instant_pulses.jl +++ b/src/pulses/instant_pulses.jl @@ -3,7 +3,7 @@ import JuMP: @constraint, @variable, VariableRef, value, Model import ...BuildingBlocks: BuildingBlock import ...ConcreteBlocks: to_concrete_block, AbstractConcreteBlock import ...Variables: flip_angle, phase, start_time, variables, duration, get_free_variable, VariableType -import ...GlobalModel: @global_model_constructor +import ...SolveModel: @global_model_constructor struct InstantRFPulseBlock <: BuildingBlock model :: Model diff --git a/src/pulses/sinc_pulses.jl b/src/pulses/sinc_pulses.jl index fd6e7472678e76a42c3514dd3230967d3c941a03..a66d5329b947ab22ccfebd5d0ecb41ccc4332c10 100644 --- a/src/pulses/sinc_pulses.jl +++ b/src/pulses/sinc_pulses.jl @@ -6,7 +6,7 @@ import Polynomials: fit, Polynomial import ...BuildingBlocks: BuildingBlock, set_simple_constraints! import ...ConcreteBlocks: ConcreteBlock, to_concrete_block import ...Variables: flip_angle, phase, amplitude, frequency, bandwidth, VariableType, variables, get_free_variable, duration -import ...GlobalModel: @global_model_constructor +import ...SolveModel: @global_model_constructor """ SincPulse(; symmetric=true, max_Nlobes=nothing, apodise=true, variables...) diff --git a/src/global_model.jl b/src/solve_model.jl similarity index 98% rename from src/global_model.jl rename to src/solve_model.jl index d845afb46f6334eafeb55bca3a55b1b79884b71b..227380bfa65b834329f841b336feb9e3a4df4b35 100644 --- a/src/global_model.jl +++ b/src/solve_model.jl @@ -1,4 +1,4 @@ -module GlobalModel +module SolveModel import JuMP: Model const GLOBAL_MODEL = Ref(Model()) diff --git a/src/wait.jl b/src/wait.jl index 9bf981af88d237c6d59160669a2b7204a8ff3e4e..97014ddd529dd1df0323077f4de4efa91b173e0a 100644 --- a/src/wait.jl +++ b/src/wait.jl @@ -3,7 +3,7 @@ import JuMP: Model, @constraint, @variable, VariableRef, owner_model, value import ..Variables: VariableType, variables, duration, get_free_variable import ..BuildingBlocks: BuildingBlock import ..ConcreteBlocks: to_concrete_block, ConcreteBlock -import ..GlobalModel: @global_model_constructor +import ..SolveModel: @global_model_constructor import ...Scanners: Scanner """