-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathabstract.jl
150 lines (107 loc) · 3.48 KB
/
abstract.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
"""
AbstractSystem
Abstract supertype for all system types.
"""
abstract type AbstractSystem end
"""
statedim(s::AbstractSystem)
Returns the dimension of the state space of system `s`.
"""
function statedim end
"""
stateset(s::AbstractSystem)
Returns the set of allowed states of system `s`.
"""
function stateset end
"""
inputdim(s::AbstractSystem)
Returns the dimension of the input space of system `s`.
"""
function inputdim end
"""
inputset(s::AbstractSystem)
Returns the set of allowed inputs of system `s`.
"""
function inputset end
"""
AbstractDiscreteSystem
Abstract supertype for all discrete system types.
"""
abstract type AbstractDiscreteSystem <: AbstractSystem end
"""
AbstractContinuousSystem
Abstract supertype for all continuous system types.
"""
abstract type AbstractContinuousSystem <: AbstractSystem end
"""
islinear(s::AbstractSystem)
Specifies if the dynamics of system `s` is specified by linear equations.
### Notes
We adopt the notion from [Section 2.7, 1]. For example, the system with inputs
``x' = f(t, x, u) = A x + B u`` is linear, since the function ``f(t, ⋅, ⋅)`` is
linear in ``(x, u)`` for each ``t ∈ \\mathbb{R}``. On the other hand,
``x' = f(t, x, u) = A x + B u + c`` is affine but not linear, since it is not
linear in ``(x, u)``.
This function uses the information of the type, not the value. So, if a system
type allows an instance that is not linear, it returns `false` by default.
For example, polynomial systems can be nonlinear; hence `islinear`
returns `false`.
[1] Sontag, Eduardo D. *Mathematical control theory: deterministic finite dimensional
systems.* Vol. 6. Springer Science & Business Media, 2013.
"""
function islinear(::AbstractSystem) end
"""
isaffine(s::AbstractSystem)
Specifies if the dynamics of system `s` is specified by affine equations.
### Notes
An affine system is the composition of a linear system and a translation.
See [`islinear(::AbstractSystem)`](@ref) for the notion of linear system adopted
in this library.
This function uses the information of the type, not the value. So, if a system
type allows an instance that is not affine, it returns `false` by default.
For example, polynomial systems can be nonlinear; hence `isaffine` is `false`.
"""
function isaffine(::AbstractSystem) end
"""
ispolynomial(s::AbstractSystem)
Specifies if the dynamics of system `s` is specified by polynomial equations.
The criterion refers to the *type* information, not the value. Hence, e.g. a
`LinearContinuousSystem` is not considered to be of polynomial type.
"""
function ispolynomial(::AbstractSystem) end
"""
AbstractMap
Abstract supertype for all map types.
"""
abstract type AbstractMap end
"""
outputdim(m::AbstractMap)
Returns the dimension of the output space of the map `m`.
"""
function outputdim end
"""
outputmap(s::SystemWithOutput)
Returns the output map of a system with output.
"""
function outputmap end
"""
islinear(m::AbstractMap)
Specifies if the map `m` is linear or not.
### Notes
A map is *linear* if it preserves the operations of scalar multiplication and
vector addition.
"""
function islinear(::AbstractMap) end
"""
isaffine(m::AbstractMap)
Specifies if the map `m` is affine or not.
### Notes
An affine map is the composition of a linear map and a translation.
See also [`islinear(::AbstractMap)`](@ref).
"""
function isaffine(::AbstractMap) end
"""
apply(m::AbstractMap, args...)
Apply the rule specified by the map to the given arguments.
"""
function apply end