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

Allow user function derivative definition for user defined functions. #60

Open
joaquinffernandez opened this issue Mar 11, 2020 · 1 comment
Assignees

Comments

@joaquinffernandez
Copy link
Collaborator

See definition of: https://www.modelica.org/documents/ModelicaSpec34.pdf#%5B%7B%22num%22%3A177%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C54%2C713%2C0%5D
Also, must work for the old version on GQLynk functions.

@joaquinffernandez
Copy link
Collaborator Author

Proposed implementation:
1- Add generic defs and register in Ginac interface for functions with different number of parameters (perhaps up to 10), the first parameter if each function should be an ex that contains the proper function name.
2- Add the derivative name to an internal dict that can be replaced each time the actual function is called.
3- In the ginac2mmo translation, the proper function derivative name should be replace, after this point, everything should be equal to a normal expression handling and printing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant