Skip to content

Commit 2566904

Browse files
committed
Suppress invalid warnings
1 parent 0bb2913 commit 2566904

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/KiteModels.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module KiteModels
1515
using PrecompileTools: @setup_workload, @compile_workload
1616
using Dierckx, Interpolations, Serialization, StaticArrays, LinearAlgebra, Statistics, Parameters, NLsolve,
1717
DocStringExtensions, OrdinaryDiffEqCore, OrdinaryDiffEqBDF, OrdinaryDiffEqNonlinearSolve,
18-
NonlinearSolve, SHA
18+
NonlinearSolve, SHA, Suppressor
1919
import Sundials
2020
using Reexport, Pkg
2121
using VortexStepMethod

src/symbolic_awe_model.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,19 @@ function init!(s::SymbolicAWEModel;
324324

325325
inputs = create_sys!(s, s.sys_struct; init_va_b)
326326
prn && @info "Simplifying the system"
327-
prn ? (@time (sys, _) = structural_simplify(s.full_sys, (inputs, []))) :
328-
((sys, _) = structural_simplify(s.full_sys, (inputs, [])))
329-
s.sys = sys
327+
@suppress_err begin
328+
prn ? (@time (sys, _) = structural_simplify(s.full_sys, (inputs, []))) :
329+
((sys, _) = structural_simplify(s.full_sys, (inputs, [])))
330+
s.sys = sys
331+
end
330332
dt = SimFloat(1/s.set.sample_freq)
331-
if prn
332-
@info "Creating ODEProblem"
333-
@time s.prob = ODEProblem(s.sys, s.defaults, (0.0, dt); s.guesses)
334-
else
335-
s.prob = ODEProblem(s.sys, s.defaults, (0.0, dt); s.guesses)
333+
prn && @info "Creating ODEProblem"
334+
@suppress_err begin
335+
if prn
336+
@time s.prob = ODEProblem(s.sys, s.defaults, (0.0, dt); s.guesses)
337+
else
338+
s.prob = ODEProblem(s.sys, s.defaults, (0.0, dt); s.guesses)
339+
end
336340
end
337341
if length(lin_outputs) > 0
338342
lin_fun, _ = linearization_function(s.full_sys, [inputs...], lin_outputs; op=s.defaults, guesses=s.guesses)

0 commit comments

Comments
 (0)