MathematicalSystems.jl
MathematicalSystems.jl copied to clipboard
Maps with constraints
The src/maps.jl
defines a bunch of structures that subtype AbstractMap
. As you can see in the table below, we are missing several combinations.
Type | Constrains state | Constrains inputs | Is defined? |
---|---|---|---|
IdentityMap | x D | ||
ConstrainedIdentityMap | x | D | |
LinearMap | x D | ||
AffineMap | x D | ||
LinearControlMap | x D | ||
ConstrainedLinearMap | x | D | |
ConstrainedAffineMap | x | D | |
AffineControlMap | x D | ||
ConstrainedAffineControlMap | x | x | x (needs update) |
ConstrainedLinearControlMap | x | x | x (needs update) |
Here are two approaches to complete the table:
-
Add all the missing combinations one by one, e.g.
ConstrainedLinearMap
forx -> Ax
with constraints onx
, etc. -
Add a new struct by composition, defining maps with constraints, like:
struct ConstrainedMap{C, M<:AbstractMap}
constraint::C
map::M
end
For ...ContinuousSytem
and ...DiscreteSystem
we've been implementing approach 1.
I like approach 2 because it is more general. At the same time, it has less structure, because it does not speak about "constraint on what" (state or input).
I prefer 2.
And how about
At the same time, it has less structure, because it does not speak about "constraint on what" (state or input).
?
Add ConstrainedControlMap
which can also constrain the input.