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

Don't assume car network mode as default #3532

Merged
merged 11 commits into from
Nov 7, 2024
Merged

Conversation

rakow
Copy link
Contributor

@rakow rakow commented Oct 30, 2024

In the VehicleType datatype class, the default networkMode used to be set to "car". This default value is not documented in the XML schema. The schema just says the networkMode is optional. This behavior can lead to unexpected results if users forget to set the network mode of a vehicle type. E.g. everything like counts, noise, volumes will be incorrectly calculated.
In this PR the default value is removed and an exception thrown if the network mode is accessed without being explicitly defined.
This will break existing scenarios which relied on the previous behavior that every vehicle is a "car" by default. Defining the network mode in the vehicles XML will be mandatory.

@rakow rakow enabled auto-merge (squash) November 7, 2024 14:03
@rakow rakow merged commit 426bec1 into master Nov 7, 2024
49 checks passed
@rakow rakow deleted the no-default-network-mode branch November 7, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants