Skip to content

Commit

Permalink
add StepIntersectModule
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Feb 9, 2024
1 parent 612e350 commit aeda1d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@
# Composition operation for one step of an approximation model with one step
# backward of the same model
# ============================================================================
module StepIntersectModule

using ..DiscretizationModule
using ..Exponentiation: _exp, _alias
using ..ApplySetops: _apply_setops
using ..ForwardModule: Forward
using MathematicalSystems
using LazySets
using Reexport

using ..Exponentiation: _exp, _alias
export StepIntersect

@reexport import ..DiscretizationModule: discretize

const CLCS = ConstrainedLinearContinuousSystem

"""
StepIntersect{DM<:AbstractApproximationModel} <: AbstractApproximationModel
Expand Down Expand Up @@ -52,10 +61,11 @@ end
function Base.show(io::IO, alg::StepIntersect)
print(io, "`StepIntersect` approximation model with:\n")
print(io, " - model: $(alg.model)\n")
return print(io, " - set operations method: $(alg.setops)\n")
print(io, " - set operations method: $(alg.setops)\n")
return nothing
end

Base.show(io::IO, m::MIME"text/plain", alg::StepIntersect) = print(io, alg)
Base.show(io::IO, ::MIME"text/plain", alg::StepIntersect) = print(io, alg)

# ------------------------------------------------------------
# Homogeneous case
Expand All @@ -78,9 +88,7 @@ function discretize(ivp::IVP{<:CLCS,<:LazySet}, δ, alg::StepIntersect)
Ω0₋ = initial_state(ivpnegd)

Ω0 = _apply_setops(Ω0₊ Ω0₋, alg.setops)
return IVP(CLDS(Φ, X), Ω0)
return IVP(ConstrainedLinearDiscreteSystem(Φ, X), Ω0)
end

# ------------------------------------------------------------
# Inhomogeneous case
# ------------------------------------------------------------
end # module
3 changes: 2 additions & 1 deletion src/Discretization/discretization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ include("BackwardModule.jl")
@reexport using ..BackwardModule

# Intersect one step forward in time with one step backward
include("StepIntersect.jl")
include("StepIntersectModule.jl")
@reexport using ..StepIntersectModule

# Discretize using the correction hull of the matrix exponential
include("CorrectionHullModule.jl")
Expand Down
3 changes: 0 additions & 3 deletions src/Initialization/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ export
TMJets21b,
VREP,

# Approximation models
StepIntersect,

# Flowpipes
flowpipe,
Flowpipe,
Expand Down

0 comments on commit aeda1d1

Please sign in to comment.