You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #15 we implement either constant or varying input iterators. An abstraction of an infinitely periodic input could be useful, and maybe it can be implemented by combining Base.IsInfinite() with an AbstractVector field.
The text was updated successfully, but these errors were encountered:
Not sure, if I understand the concept and the usage of Input in MathematicalSystems, but I implemented a periodic input in my MPC package something like this:
#TODO: make immutable (with Ref)using TreeViews
using Crayons
mutable struct FixedInput{MT<:AbstractMatrix} <:AbstractController
U::MT
n::Integer
k::Integerendfunctioncontrol_input(ctrl::FixedInput)
u = ctrl.U[:, mod(ctrl.k, ctrl.n) +1]
ctrl.k +=1return u
end
Not sure, if I understand the concept and the usage of Input in MathematicalSystems,
We can probably improve the docs, I've commented here. The idea is that this type models an input to a system and it can be iterated over; the concrete interpretation is left for downstream packages. Very much like in your example.
In #15 we implement either constant or varying input iterators. An abstraction of an infinitely periodic input could be useful, and maybe it can be implemented by combining
Base.IsInfinite()
with anAbstractVector
field.The text was updated successfully, but these errors were encountered: