Skip to content

Vender ModelingToolkit.jl with diffeqpy? #57

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

Closed
ChrisRackauckas opened this issue Dec 3, 2019 · 2 comments
Closed

Vender ModelingToolkit.jl with diffeqpy? #57

ChrisRackauckas opened this issue Dec 3, 2019 · 2 comments

Comments

@ChrisRackauckas
Copy link
Member

It seems like it would be a good front end for diffeqpy which would allow users to easily build Julia functions and get the full speed. I would need help finding out how to vender it so it just shows up, but from there it should be quite straightforward. The macros couldn't be used, but the constructor form would work, and we can just add constructors that allow strings and convert internally to symbols so that it works natively from Python.

@ChrisRackauckas
Copy link
Member Author

@tkf I'm having some trouble using MTK from Python. Do you have any suggestions for things like symbols and arithmetic overloads?

from julia.api import Julia
jl = Julia(compiled_modules=False)
from julia import ModelingToolkit
from jl import Main

x = jl.eval("ModelingToolkit.Variable(:x)")
y = jl.eval("ModelingToolkit.Variable(:y)")
z = jl.eval("Symbol(\"x\")")

ModelingToolkit.Variable(z) # error
x+y # error

@ChrisRackauckas
Copy link
Member Author

Done

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