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

SinkDetector id more concise and consistent #90

Open
WJSchakel opened this issue Nov 30, 2023 · 1 comment
Open

SinkDetector id more concise and consistent #90

WJSchakel opened this issue Nov 30, 2023 · 1 comment
Assignees
Labels
consistency Improving internal code consistency

Comments

@WJSchakel
Copy link
Collaborator

The id of a SinkDetector is defined as "SINK@" + lane.getFullId() + "." + position.
This creates a full id as: Link 1.Lane 1.SINK@Link 1.Lane 1.50.0000000 m. This can be shorter by omitting the lane.getFullId().

Note that depending on the Locale this may also be Link 1.Lane 1.SINK@Link 1.Lane 1.50,0000000 m. We need consistency in the id, so it should not depend on the Locale.

@averbraeck should we solve the Locale consistency in DJUNITS, or only at the OTS side? I can image in DJUNITS we make a toString(Locale) method.

@WJSchakel WJSchakel added the consistency Improving internal code consistency label Nov 30, 2023
@WJSchakel
Copy link
Collaborator Author

The id is (for) now defined as: String.format(Locale.US, "Sink@%.3fm", position.si).

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

No branches or pull requests

2 participants