Skip to content

Commit

Permalink
Merge branch 'mforets/various_fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
mforets committed Apr 2, 2020
2 parents 54e6457 + 8b5404a commit 5f4cdaa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/Flowpipes/reachsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ Taylor model reach-set represented as a vector taylor models in one variable
### Notes
The parameter `N` refers to the numerical type of the representation.
In `TMJets`, the space variables are normalized to the interval `[-1, 1]`.
"""
struct TaylorModelReachSet{N} <: AbstractTaylorModelReachSet{N}
X::Vector{TaylorModel1{TaylorN{N}, N}}
Expand Down
34 changes: 26 additions & 8 deletions src/Hybrid/time_triggered.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
abstract type AbstractHybridAutomatonwithClockedLinearDynamics <: AbstractHybridSystem end
const AHACLD = AbstractHybridAutomatonwithClockedLinearDynamics

import MathematicalSystems: system, statedim, initial_state

"""
HACLD1{T<:AbstractSystem, MT, N} <: AHACLD
Expand All @@ -23,14 +25,16 @@ This type is parametric in:
- `T` -- system type
- `MT` -- type of the reset map
- `N` -- numeric type, for the sampling time and jitter
- `N` -- numeric type, applies to the sampling time and jitter
The following getter functions are available:
- `system` -- returns the associated system
- `initial_state` -- initial state of the continuous mode
- `jitter` -- returns the jitter
- `reset_map` -- returns the reset map
- `sampling_time` -- retuns the sampling time
- `jitter` -- returns the jitter
- `statedim` -- dimension of the state-space
- `system` -- returns the continuous mode
"""
struct HACLD1{T<:AbstractSystem, MT, N} <: AHACLD
sys::T
Expand All @@ -39,13 +43,17 @@ struct HACLD1{T<:AbstractSystem, MT, N} <: AHACLD
ζ::N
end

MathematicalSystems.system(hs::HACLD1) = hs.sys
MathematicalSystems.statedim(hs::HACLD1) = statedim(hs.sys)
#MathematicalSystems.initial_state(hs::HACLD1) = hs.x0
# default constructor without jitter
function HACLD1(sys::T, rmap::MT, Tsample::N) where {T, MT, N}
return HACLD1(sys, rmap, Tsample, zero(N))
end

initial_state(hs::HACLD1) = initial_state(hs.sys)
jitter(hs::HACLD1) = hs.ζ
reset_map(hs::HACLD1) = hs.rmap
sampling_time(hs::HACLD1) = hs.Tsample
jitter(hs::HACLD1) = hs.ζ
#initial_time(hs::HACLD1) = hs.t0
statedim(hs::HACLD1) = statedim(hs.sys)
system(hs::HACLD1) = hs.sys

# tstart Ts-ζ tend
# [-------------|-------------]
Expand Down Expand Up @@ -107,3 +115,13 @@ function post(alg::AbstractContinuousPost, ivp::IVP{<:HACLD1}, tspan; kwargs...)

return HybridFlowpipe(out)
end

#=
function reach_HACLD1_no_jitter()
end
function reach_HACLD1_with_jitter()
end
=#

0 comments on commit 5f4cdaa

Please sign in to comment.