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
Improved direct usage #156
Conversation
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
+ Coverage 92.36% 92.69% +0.33%
==========================================
Files 11 12 +1
Lines 432 452 +20
==========================================
+ Hits 399 419 +20
Misses 33 33
Continue to review full report at Codecov.
|
Direct usage is usage outside of an |
Fixes #109 |
end | ||
|
||
macro I(ex) | ||
name = :ICompile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a nicer way to handle this than returning the macro and then requiring the macro to be called? If we do this with a gensym we can write a macro which calls this macro to return a macro and then calls the returned macro, which is a crazy definition of "identity"
eqs = [σ*(y-x), | ||
x*(ρ-z)-y, | ||
x*y - β*z] | ||
_f = eval(ModelingToolkit.build_function(eqs,[x,y,z],[σ,ρ,β])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eval on the user side makes it easier to pick the appropriate module, which is important for newly registered function calls
I there's a lot of other fixes in here, so I'm going to merge and tag and we can continue refining this, especially the |
For things that @dpsanders wants to do, a simplified form of expression building is quite handy.