Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing systems defined by ModelingToolkit #212

Open
mforets opened this issue Jul 5, 2020 · 0 comments
Open

Parsing systems defined by ModelingToolkit #212

mforets opened this issue Jul 5, 2020 · 0 comments

Comments

@mforets
Copy link
Member

mforets commented Jul 5, 2020

We can already define some lazy sets using ModelingToolkit types. The next step would be to allow creating systems and the natural place is to do it in this library. Ideally @system should create an "appropriate" system, eg. below, a linear system without inputs.

For instance,

@parameters t
@variables x(t) y(t)
@derivatives D'~t

f = [D(x) ~ y, D(y) ~ -x]
2-element Array{Equation,1}:
 Equation(derivative(x(t), t), y(t))
 Equation(derivative(y(t), t), -(x(t)))

G = HalfSpace(x >= 1.25, [x, y]) # works
HalfSpace{Float64,Array{Float64,1}}([-1.0, 0.0], -1.25)

@ivp(x' = f(x), x(0)  X0) # to-do
ArgumentError: for a blackbox system, the dimension has to be defined

Stacktrace:
 [1] top-level scope at In[72]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant