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

derivative annotation restrictions #1543

Closed
modelica-trac-importer opened this issue Nov 4, 2018 · 5 comments
Closed

derivative annotation restrictions #1543

modelica-trac-importer opened this issue Nov 4, 2018 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@modelica-trac-importer
Copy link
Collaborator

Reported by stefanv on 25 Jul 2014 18:44 UTC
A derivative annotation can specify restrictions of the form order=N, noDerivative=V, and zeroDerivative=V. The spec states,

A function may supply multiple derivative functions subject to different restrictions.

What it does not state is the order in which they are to be considered. Two possibilities come to mind:

  1. The order they are written. The first one that matches is used.

  2. Most restrictive to least restrictive. The first one that matches is used.


Migrated-From: https://trac.modelica.org/Modelica/ticket/1543

@modelica-trac-importer
Copy link
Collaborator Author

Comment by jmattsson on 28 Jul 2014 07:27 UTC
The second one is not a complete ordering, so it would have to be ordered by written order when they are equally restrictive. We'd also need to clearly specify what is considered more or less restrictive.

Also note that order=N is not a restriction on what function calls the derivative function can be used for - it only tells the compiler that it takes fewer arguments.

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 1 Dec 2014 15:58 UTC
Language group:
The first matching one (based on zeroDerivative etc) in the order they are written should be used; therefore the restrictive ones should be written first.

@modelica-trac-importer
Copy link
Collaborator Author

Modified by hansolsson on 10 Dec 2014 15:40 UTC

@modelica-trac-importer
Copy link
Collaborator Author

Comment by jmattsson on 10 Dec 2014 15:46 UTC
Decision was made at design meeting. Now need to update spec.

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 17 Jul 2015 08:35 UTC
Resolved in r8353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests