From 3530e70b98f3c5f26f3fe6f5df1eb44b30e1e6f7 Mon Sep 17 00:00:00 2001 From: schillic Date: Wed, 13 Feb 2019 10:52:19 +0100 Subject: [PATCH] add support for (lazy) reset maps --- src/ReachSets/DiscretePost/DiscretePost.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ReachSets/DiscretePost/DiscretePost.jl b/src/ReachSets/DiscretePost/DiscretePost.jl index fdc7a57e..310f93d7 100644 --- a/src/ReachSets/DiscretePost/DiscretePost.jl +++ b/src/ReachSets/DiscretePost/DiscretePost.jl @@ -116,9 +116,18 @@ end # --- default methods for handling assignments --- +# default implementation: use 'apply' from MathematicalSystems function apply_assignment(𝒫::DiscretePost, constrained_map::AbstractMap, R⋂G::LazySet; kwargs...) return apply(constrained_map, R⋂G) end + +# for reset maps: return a lazy ResetMap from LazySets +function apply_assignment(𝒫::DiscretePost, + constrained_map::ConstrainedResetMap, + R⋂G::LazySet; + kwargs...) + return LazySets.ResetMap(R⋂G, constrained_map.dict) +end