From b8891557fd5e24fb8ce19406f0b95726d4921fee Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Fri, 2 Feb 2024 10:37:39 +0000
Subject: [PATCH] Replace model parameter with global_model

---
 src/wait.jl | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/wait.jl b/src/wait.jl
index abffc4d..7cc0337 100644
--- a/src/wait.jl
+++ b/src/wait.jl
@@ -1,8 +1,8 @@
 module Wait
-import JuMP: Model, @constraint, @variable, VariableRef, owner_model, value
+import JuMP: @constraint, @variable, VariableRef, value
 import ..Variables: VariableType, variables, duration, get_free_variable
 import ..BuildingBlocks: BuildingBlock, to_block
-import ..BuildSequences: @global_model_constructor
+import ..BuildSequences: global_model
 import ...Scanners: Scanner
 
 """
@@ -17,20 +17,16 @@ Duration can be set to one of:
 - `nothing` to make it fully determined by external constraints and objectives
 """
 struct WaitBlock <: BuildingBlock
-    model :: Model
     duration :: VariableType
-    function WaitBlock(model::Model, duration=nothing)
+    function WaitBlock(duration=nothing)
         res = new(
-            model, 
-            get_free_variable(model, duration),
+            get_free_variable(duration),
         )
         @constraint model res.duration >= 0
         return res
     end
 end
 
-@global_model_constructor WaitBlock
-
 """
     to_block(JuMP variable/:min or :max/nothing/number)
 
-- 
GitLab