/
abstract.jl
254 lines (179 loc) · 6.19 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
"""
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(::AbstractSystem) end
"""
stateset(s::AbstractSystem)
Returns the set of allowed states of system `s`.
"""
function stateset(::AbstractSystem) end
"""
inputdim(s::AbstractSystem)
Returns the dimension of the input space of system `s`.
"""
function inputdim(::AbstractSystem) end
"""
inputset(s::AbstractSystem)
Returns the set of allowed inputs of system `s`.
"""
function inputset(::AbstractSystem) end
"""
noisedim(s::AbstractSystem)
Returns the dimension of the noise space of system `s`.
"""
function noisedim(::AbstractSystem) end
"""
noiseset(s::AbstractSystem)
Returns the set of allowed noises of system `s`.
"""
function noiseset(::AbstractSystem) end
"""
state_matrix(s::AbstractSystem)
Return the state matrix of an affine system.
### Notes
The state matrix is the matrix proportional to the state, e.g. the matrix `A`
in the linear continuous system ``x' = Ax``.
"""
function state_matrix(::AbstractSystem) end
"""
input_matrix(s::AbstractSystem)
Return the input matrix of a system with linear input.
### Notes
The input matrix is the matrix proportional to the input, e.g. the matrix `B`
in the linear continuous system with input, ``x' = Ax + Bu``.
"""
function input_matrix(::AbstractSystem) end
"""
noise_matrix(s::AbstractSystem)
Return the noise matrix of a system with linear noise.
### Notes
The noise matrix is the matrix proportional to the noise, e.g. the matrix `D`
in the linear system with noise, ``x' = Ax + Dw``.
"""
function noise_matrix(::AbstractSystem) end
"""
affine_term(s::AbstractSystem)
Return the affine term in an affine system.
### Notes
The affine term is e.g. the vector ``c`` in the affine system ``x' = Ax + c``.
"""
function affine_term(::AbstractSystem) end
"""
outputmap(s::AbstractSystem)
Returns the output map of a system with output.
"""
function outputmap(::AbstractSystem) 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)``.
The result of this function only depends on the system type, not the value, and
can also be applied to `typeof(s)`. 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.
The result of this function only depends on the system type, not the value, and
can also be applied to `typeof(s)`. 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 result of this function only depends on the system type, not the value, and
can also be applied to `typeof(s)`. Hence, e.g. a `LinearContinuousSystem` is not
considered to be of polynomial type.
"""
function ispolynomial(::AbstractSystem) end
"""
isblackbox(s::AbstractSystem)
Specifies if no specific structure is assumed for the dynamics of system `s`.
The result of this function only depends on the system type, not the value, and
can also be applied to `typeof(s)`.
"""
function isblackbox(::AbstractSystem) end
"""
isnoisy(s::AbstractSystem)
Determines if the dynamics of system `s` contains a noise term `w`.
The result of this function only depends on the system type, not the value, and
can also be applied to `typeof(s)`.
"""
function isnoisy(::AbstractSystem) end
"""
iscontrolled(s::AbstractSystem)
Determines if the dynamics of system `s` contains a control input `u`.
The result of this function only depends on the system type, not the value, and
can also be applied to `typeof(s)`.
"""
function iscontrolled(::AbstractSystem) end
"""
isconstrained(s::AbstractSystem)
Determines if the system `s` has constraints on the state, input and noise,
respectively (those that are available).
The result of this function only depends on the system type, not the value, and
can also be applied to `typeof(s)`.
"""
function isconstrained(::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(::AbstractMap) 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(::AbstractMap) end