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

A macro-based API #5

Open
ChrisRackauckas opened this issue Aug 1, 2017 · 3 comments
Open

A macro-based API #5

ChrisRackauckas opened this issue Aug 1, 2017 · 3 comments

Comments

@ChrisRackauckas
Copy link
Contributor

Hey,
Following up from some JuliaCon comments. The expression-based API is interesting, but I was thinking you should add a macro-based API on top of it. Essentially:

de = @ode_system begin
  x2
  u1 - 1.625
end

can create de=[:(x2[j]),:(u1[j]-1.625)] and it would be more natural than the user defining these themselves. It would also hide the implementation detail of the [j]. The lower level API using arrays of expressions would still exist for more advanced users to programmatically create expressions.

@huckl3b3rry87
Copy link
Contributor

huckl3b3rry87 commented Mar 6, 2018

@ChrisRackauckas I have been thinking more about this and was wondering how to go about doing this. Do you have any suggestions? I was looking at your odedef macro here and here and it looks pretty complicated, so I was wondering do you know how to do this easily or if I am starting with the wrong thing?

@ChrisRackauckas
Copy link
Contributor Author

ParameterizedFunctions.jl gets hairy since there's so much other stuff involved, like inverse Jacobian calculations. We plan to cover optimal control in SciCompDSL.jl, which is the next DSL in construction and is designed to be cross platform. If you can take a look and weigh in on the things that are needed to do optimal control correctly then I'd be happy to make sure it's a good front-end for your needs.

@huckl3b3rry87
Copy link
Contributor

@ChrisRackauckas very cool! That would be great, thanks!

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

2 participants