From c71f92f6fe4d3547a96d0399e777bd05b1b5fec8 Mon Sep 17 00:00:00 2001 From: schillic Date: Fri, 1 Mar 2024 10:45:30 +0100 Subject: [PATCH] suppress output of Flowstar in tests --- src/Algorithms/FLOWSTAR/post.jl | 2 +- test/Project.toml | 2 ++ test/algorithms/FLOWSTAR.jl | 7 ++++--- test/runtests.jl | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Algorithms/FLOWSTAR/post.jl b/src/Algorithms/FLOWSTAR/post.jl index bf333ec286..17e2096a62 100644 --- a/src/Algorithms/FLOWSTAR/post.jl +++ b/src/Algorithms/FLOWSTAR/post.jl @@ -74,7 +74,7 @@ function post(alg::FLOWSTAR{ST,OT,PT,IT}, ivp::IVP{<:AbstractContinuousSystem}, ContinuousReachModel(states, params, setting, scheme, eom, dom) end - # call Flow*; use Val(true) to obtain TaylorModel1 of TaylorN + # call Flow*; use Val(true) to obtain TaylorModel1 of TaylorN sol = FlowstarContinuousSolution(model, Val(true)) flow = sol.flow diff --git a/test/Project.toml b/test/Project.toml index 6947eca3d7..2878a57a10 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -16,6 +16,7 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Polyhedra = "67491407-f73d-577b-9b50-8179a7c68029" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" TaylorModels = "314ce334-5f6e-57ae-acf6-00b6e903104a" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -36,5 +37,6 @@ Optim = "0.18 - 0.20, 1" Plots = "0.25 - 0.29, 1" Polyhedra = "0.5 - 0.7" StaticArrays = "0.12, 1" +Suppressor = "0.2" Symbolics = "4 - 5" TaylorModels = "0.6" diff --git a/test/algorithms/FLOWSTAR.jl b/test/algorithms/FLOWSTAR.jl index e92d293504..b6c3332371 100644 --- a/test/algorithms/FLOWSTAR.jl +++ b/test/algorithms/FLOWSTAR.jl @@ -1,11 +1,12 @@ -import Flowstar +import Flowstar, Symbolics +using Suppressor: @suppress # suppress long output of Flowstar using ReachabilityAnalysis: ReachSolution @testset "FLOWSTAR algorithm" begin # Passing a model file. model = joinpath(@__DIR__, "..", "models", "LotkaVolterra.model") ivp = @ivp(BlackBoxContinuousSystem(model, 2), x(0) ∈ (4.8 .. 5.2) × (1.8 .. 2.2)) - sol = solve(ivp; tspan=(0, 1), alg=FLOWSTAR(; δ=0.02)) + sol = @suppress solve(ivp; tspan=(0, 1), alg=FLOWSTAR(; δ=0.02)) RT = TaylorModelReachSet{Float64,IntervalArithmetic.Interval{Float64}} @test sol isa ReachSolution{Flowpipe{Float64,RT,Vector{RT}}, FLOWSTAR{Float64,Flowstar.FixedTMOrder, @@ -18,7 +19,7 @@ using ReachabilityAnalysis: ReachSolution return dx[2] = -3 * x[2] + x[1] * x[2] end ivp = @ivp(x' = f!(x), dim = 2, x(0) ∈ (4.8 .. 5.2) × (1.8 .. 2.2)) - sol = solve(ivp; tspan=(0, 1), alg=FLOWSTAR(; δ=0.02)) + sol = @suppress solve(ivp; tspan=(0, 1), alg=FLOWSTAR(; δ=0.02)) RT = TaylorModelReachSet{Float64,IntervalArithmetic.Interval{Float64}} @test sol isa ReachSolution{Flowpipe{Float64,RT,Vector{RT}}, FLOWSTAR{Float64,Flowstar.FixedTMOrder, diff --git a/test/runtests.jl b/test/runtests.jl index 0dcef959c5..e60a86329f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,4 @@ -using Test -using ReachabilityAnalysis +using Test, ReachabilityAnalysis TEST_MODELS = ["models/harmonic_oscillator.jl", "models/forced_oscillator.jl",