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
MultiBody.Joints.Constraints.UniversalJoint uses == on Real #1002
Comments
Comment by sjoelund.se on 25 Feb 2013 10:44 UTC If MSL wants to follow the specification, the code should be re-written or we need to schedule this for spec 3.2rev2. I'd propose the spec changes. |
Comment by hansolsson on 25 Feb 2013 12:48 UTC The underlying reason for disallowing comparison between real variables is that one needs to consider that they are not exactly computed; this can occur during simulation but also due to the imprecise calculations for parameters. In this case it is even more problematic(*) - there are two real vectors as input and only 6 combinations of values are supported for them (and then an else treating all other cases the same), i.e.
If you only support a limited set of values you use an integer or enumeration instead of testing for specific values of reals; that clearly documents it for users and avoids the problems. The same goes for Constraints.RevoluteJoint |
Comment by hansolsson on 27 Feb 2013 08:30 UTC
Assuming I did not misunderstand something. |
Comment by hansolsson on 27 Feb 2013 08:33 UTC |
Comment by otter on 3 Mar 2013 13:19 UTC |
Comment by dietmarw on 3 Mar 2013 14:09 UTC
why? Since its commented out it should never have been added. |
Reported by jmattsson on 25 Feb 2013 08:57 UTC
Modelica.Mechanical.MultiBody.Joints.Constraints.UniversalJoint contains the equations:
The
n_a
andn_b
vectors are of type Real, and the specification clearly disallows==
and<>
for Reals.The rationale given in the specification for this limitation mostly concerns variables, so it might be reasonable to lift the restriction for parameters.
Migrated-From: https://trac.modelica.org/Modelica/ticket/1002
The text was updated successfully, but these errors were encountered: