From f967ac6ac194a92c27c14108f5eb101f9b428fc9 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Fri, 2 Feb 2024 12:19:41 +0000
Subject: [PATCH] disable printing by default

---
 src/build_sequences.jl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/build_sequences.jl b/src/build_sequences.jl
index 2101ed7..15ce413 100644
--- a/src/build_sequences.jl
+++ b/src/build_sequences.jl
@@ -70,12 +70,12 @@ function build_sequence(f::Function, ::Nothing; optimise=false)
 end
 
 function build_sequence(f::Function, scanner::Scanner, optimiser_constructor; optimise=true, kwargs...)
-    model = Model(optimizer_with_attributes(optimiser_constructor, pairs(kwargs)...))
+    model = Model(optimizer_with_attributes(optimiser_constructor, [string(k) => v for (k, v) in kwargs]...))
     build_sequence(f, scanner, model, optimise)
 end
 
-function build_sequence(f::Function, scanner::Scanner; kwargs...)
-    build_sequence(f, scanner, Ipopt.Optimizer; kwargs...)
+function build_sequence(f::Function, scanner::Scanner; print_level=2, kwargs...)
+    build_sequence(f, scanner, Ipopt.Optimizer; print_level=print_level, kwargs...)
 end
 
 
-- 
GitLab