-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathivp.jl
44 lines (33 loc) · 828 Bytes
/
ivp.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
InitialValueProblem
Parametric composite type for initial value problems. It is parameterized in the
system's type.
### Fields
- `s` -- system
- `x0` -- initial state
### Examples
The linear system ``x' = -x`` with initial condition ``x_0 = [-1/2, 1/2]``:
```jldoctest
julia> p = InitialValueProblem(LinearContinuousSystem([-1.0 0.0; 0.0 -1.0]), [-1/2, 1/2]);
julia> p.x0
2-element Array{Float64,1}:
-0.5
0.5
julia> statedim(p)
2
julia> inputdim(p)
0
```
"""
struct InitialValueProblem{S <: AbstractSystem, XT} <: AbstractSystem
s::S
x0::XT
end
statedim(ivp::InitialValueProblem) = statedim(ivp.s)
inputdim(ivp::InitialValueProblem) = inputdim(ivp.s)
inputset(ivp::InitialValueProblem) = inputset(ivp.s)
"""
IVP
`IVP` is an alias for `InitialValueProblem`.
"""
const IVP = InitialValueProblem