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

Uses of conditional components in ModelicaTest.MultiBody #1333

Closed
modelica-trac-importer opened this issue Jan 14, 2017 · 6 comments
Closed
Assignees
Labels
bug Critical/severe issue L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined

Comments

@modelica-trac-importer
Copy link

Reported by jmattsson on 25 Oct 2013 09:46 UTC
In ModelicaTest.MultiBody.Joints, both UniversalSpherical and SphericalSpherical2 contains the asserts:

assert(rs1.r_rel[1] < tol2 and rs1.r_rel[2] < tol2 and rs1.r_rel[3] <
  tol2, "Difference in positions between bodies is too much");
assert(rs2.r_rel[1] < tol2 and rs2.r_rel[2] < tol2 and rs2.r_rel[3] <
  tol2, "Difference in positions between bodies is too much");
assert(rs3.r_rel[1] < tol1 and rs3.r_rel[2] < tol1 and rs3.r_rel[3] <
  tol1, "Difference in positions between bodies is too much");

This is an error, since r_rel in rs1 is conditional.


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

@modelica-trac-importer modelica-trac-importer added bug Critical/severe issue L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined labels Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Modified by jmattsson on 25 Oct 2013 09:47 UTC

@modelica-trac-importer modelica-trac-importer changed the title Uses of conditional components in ModelicaTest Uses of conditional components in ModelicaTest.MultiBody Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Modified by jmattsson on 21 Nov 2013 08:34 UTC

@modelica-trac-importer modelica-trac-importer added this to the Design81 milestone Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Modified by jmattsson on 21 Nov 2013 10:11 UTC

@modelica-trac-importer modelica-trac-importer modified the milestones: MSL3.2.1+build.3, Design81 Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Comment by otter on 20 Jun 2014 14:09 UTC
Replying to [ticket:1333 jmattsson]:

In ModelicaTest.MultiBody.Joints, both UniversalSpherical and SphericalSpherical2 contains the asserts:

assert(rs1.r_rel[1] < tol2 and rs1.r_rel[2] < tol2 and rs1.r_rel[3] <
  tol2, "Difference in positions between bodies is too much");
assert(rs2.r_rel[1] < tol2 and rs2.r_rel[2] < tol2 and rs2.r_rel[3] <
  tol2, "Difference in positions between bodies is too much");
assert(rs3.r_rel[1] < tol1 and rs3.r_rel[2] < tol1 and rs3.r_rel[3] <
  tol1, "Difference in positions between bodies is too much");

This is an error, since r_rel in rs1 is conditional.

Changed declaration of rs1, rs2, rs3 to:

Modelica.Mechanics.MultiBody.Sensors.RelativeSensor rs1(
    final get_r_rel=true, ...
    ...

With "final", the vector is no longer conditional.

Fixed in 6d9ae49 (trunk) and in 6173d2c (maintenance).

@modelica-trac-importer
Copy link
Author

Comment by jmattsson on 23 Jun 2014 07:43 UTC
Declaring the parameter final does not make the component stop being conditional. The current rule in the specification is "A component declared with a condition_attribute can only be modified and/or used in connections."

@modelica-trac-importer
Copy link
Author

Comment by otter on 23 Jun 2014 10:00 UTC
Fixed in 4586fd9 (trunk) and in 4ff0c41 (maintenance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined
Projects
None yet
Development

No branches or pull requests

2 participants