Skip to content

Commit 5862eec

Browse files
authored
Merge pull request #332 from alecarraro/alecarraro/mz_system
Add `parametric` systems
2 parents 0655e43 + c575ff8 commit 5862eec

File tree

15 files changed

+523
-76
lines changed

15 files changed

+523
-76
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
1010
MultivariatePolynomials = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3"
1111
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
12+
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1213
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1314

1415
[compat]
@@ -18,5 +19,6 @@ LinearAlgebra = "<0.0.1, 1.4"
1819
MacroTools = "0.5"
1920
MultivariatePolynomials = "0.3, 0.4, 0.5"
2021
RecipesBase = "0.6, 0.7, 0.8, 1.0, 1.1, 1.2"
22+
Requires = "1.3.1"
2123
SparseArrays = "<0.0.1, 1.4"
2224
julia = "1.5"

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ LazySets = "b4f0291d-fe17-52bc-9479-3d1a343d9043"
66
[compat]
77
Documenter = "1"
88
DocumenterCitations = "1.3"
9-
LazySets = "2, 3, 4"
9+
LazySets = "5"

docs/src/lib/methods.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ isblackbox(::AbstractSystem)
5555
isnoisy(::AbstractSystem)
5656
iscontrolled(::AbstractSystem)
5757
isconstrained(::AbstractSystem)
58+
isparametric(::AbstractSystem)
5859
state_matrix(::AbstractSystem)
5960
input_matrix(::AbstractSystem)
6061
noise_matrix(::AbstractSystem)

docs/src/lib/types.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ SecondOrderConstrainedAffineControlContinuousSystem
5757
SecondOrderConstrainedLinearControlContinuousSystem
5858
SecondOrderContinuousSystem
5959
SecondOrderConstrainedContinuousSystem
60+
LinearParametricContinuousSystem
61+
LinearControlParametricContinuousSystem
6062
```
6163

6264
## Discrete Systems
@@ -94,6 +96,8 @@ SecondOrderConstrainedAffineControlDiscreteSystem
9496
SecondOrderConstrainedLinearControlDiscreteSystem
9597
SecondOrderDiscreteSystem
9698
SecondOrderConstrainedDiscreteSystem
99+
LinearParametricDiscreteSystem
100+
LinearControlParametricDiscreteSystem
97101
```
98102

99103
#### Discretization Algorithms

docs/src/man/systems.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ However in this table we only included continuous system types for brevity.
9999
|SOACS|[`SecondOrderAffineContinuousSystem`](@ref)|
100100
|SOCACCS|[`SecondOrderConstrainedAffineControlContinuousSystem`](@ref)|
101101
|SOCLCCS|[`SecondOrderConstrainedLinearControlContinuousSystem`](@ref)|
102+
|LPCS|[`LinearParametricContinuousSystem`](@ref)|
103+
|LCPCS|[`LinearControlParametricContinuousSystem`](@ref)|
102104

103105
The following table summarizes the equation represented by each system type
104106
(the names are given in abbreviated form). Again, discrete systems are not included. The column *Input constraints* is `yes` if the structure can model input or noise constraints (or both).
@@ -137,3 +139,5 @@ The following table summarizes the equation represented by each system type
137139
|``Mx'' + Cx' + Kx = Bu, x ∈ X, u ∈ U``|yes|yes|SOCLCCS|
138140
|``Mx'' + Cx' + f_i(x) = f_e``|no|no|SOCS|
139141
|``Mx'' + Cx' + f_i(x) = f_e``, x ∈ X, u ∈ U``|yes|yes|SOCCS|
142+
|``x' = A(θ)x, θ ∈ Θ``| no|no|LPCS|
143+
|``x' = A(θ)x + B(θ)u, θ ∈ Θ``| no|no|LPCS|

src/MathematicalSystems.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module MathematicalSystems
22

3+
using Requires
34
using LinearAlgebra, SparseArrays
45
using LinearAlgebra: checksquare
56
import RecipesBase
@@ -55,7 +56,8 @@ export islinear,
5556
isblackbox,
5657
isnoisy,
5758
iscontrolled,
58-
isconstrained
59+
isconstrained,
60+
isparametric
5961

6062
#====================================
6163
Concrete Types for Continuous Systems

src/abstract.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,18 @@ can also be applied to `typeof(s)`.
213213
"""
214214
function isconstrained(::AbstractSystem) end
215215

216+
"""
217+
isparametric(s::AbstractSystem)
218+
219+
Determines if the system `s` contains one or more symbolic parameters in its
220+
dynamics (for example, matrix entries that can take values from a
221+
specified set).
222+
223+
The result of this function only depends on the
224+
system type, not the value, and can also be applied to `typeof(s)`.
225+
"""
226+
function isparametric(::AbstractSystem) end
227+
216228
"""
217229
AbstractMap
218230

src/macros.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Return the system type whose field names match those in `fields`.
127127
### Input
128128
129129
- `AT` -- abstract system type, which can be either `AbstractContinuousSystem`
130-
or `AbstractDiscreSystem`
130+
or `AbstractDiscreteSystem`
131131
- `fields` -- tuple of field names
132132
133133
### Output

0 commit comments

Comments
 (0)