MathematicalSystems.jl icon indicating copy to clipboard operation
MathematicalSystems.jl copied to clipboard

Follow-up of @system macro

Open mforets opened this issue 5 years ago • 3 comments

Originally posted by @ueliwechsler in https://github.com/JuliaReach/MathematicalSystems.jl/pull/125#issuecomment-575240459

The following things can be done in a later PR (in approximately increasing order of work needed):

  • [x] add template f_(x_,u_) for allowing to write @system(x' = f(x,u_12) (add one line) (#154)
  • [ ] ensure that state≠input≠noise (~#155~ #164)
  • [ ] add docstring to all functions
  • [ ] make f_(x_,u_) and f_(x_,w_) distinguishable
  • [x] correct handling for arbitrary order of input set definition + unit_tests (#176)
  • [ ] make @system(x' = x + Bu) work by extracting state_dim from B
  • [ ] add LazySets.Universe(n) or nothing as default cases for undefined sets (a straightforward option would be to handle every set as a Constrained set with all set as Universe(n) by default and if a set definition is provided specify the corresponding set)
  • [x] Make @system macro work without parantheses, e.g. @system x' = A*x (#156 )
  • [ ] Add support for remaining types, e.g. polynomial
  • [ ] Add support for SystemWithOutput, e.g. @system(x' = Ax + Bu, y=Bx + Du)
  • [ ] Allow arbitrary input for dynamic equations without *, e.g. @system(x' = Ax + Bu1)
  • [ ] Major revision by using type specific "templates" for each AbstractSystem type

mforets avatar Jan 23 '20 11:01 mforets

from #137:

  • [x] allow property initial_state as state(0) ∈ set to create IVP

ueliwechsler avatar Jan 29 '20 11:01 ueliwechsler

from #139

  • [x] consistent type conversion in x' = -x and x' = 2x

ueliwechsler avatar Jan 31 '20 23:01 ueliwechsler

Additionally, we should try to remove the explicit dependency on MathematicalSystems in these lines https://github.com/JuliaReach/MathematicalSystems.jl/blob/641d4f5a067f2bea6fd0dd0de7c2f193a9a8632c/src/macros.jl#L535 https://github.com/JuliaReach/MathematicalSystems.jl/blob/641d4f5a067f2bea6fd0dd0de7c2f193a9a8632c/src/macros.jl#L538

by writing push!(params, I($state_dim), :B) or something similar.

ueliwechsler avatar Feb 04 '20 09:02 ueliwechsler