-
Notifications
You must be signed in to change notification settings - Fork 441
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
Person money event extension #811
Conversation
What is the best default value for the new fields?
Any opinions on this? |
I think there is some ticket in jira that discusses this, and gives a clear answer for matsim conventions. Can't find it right now because I am in "the East" where there is no Internet in trains.
However, the above would be for "required" attributes according to the dtd. I think that for events the convention is to just not write out at all (look into the Event class).
What is the best default value for the new fields?
* "null" (a String, not the null pointer!): This is what comes out if I read in an EventsFile with old personMoneyEvents without the new fields (null in the code which is written out as String "null"). Disadavantage: hard to tell whether it is null due to a (null pointer) bug in the code or because it should be null
* "" the empty String: shows more that someone wanted to return this (differentiate from a bug).
* Let's not use the null pointer, because after writing out and reading in again it would change to a String "null" :-(
Any opinions on this?
|
I've just changed that and replaced the empty Strings with |
There is an issue with contrib protobuf. It apparently auto-generates |
Updated the proto definition. Should be fixed now. |
Re default values: If we want to have null as the default value in the matsim events, some extra handling is necessary that bi-di maps: ""<=> null while doing conversions. |
Thanks a lot @michalmac 👍 ! |
Thanks for the hint, I was not aware of this. I have just looked through some other event types. PersonMoneyEvent.java#L90-L102 contribs/protobuf/src/main/proto/events.proto#L119-L132 Maybe we stick for this pull request to the current MATSim default ( |
add information for what purpose a person received / paid money and from / to whom -> differentiate different kinds of payments, e.g. analyse toll revenue and drt fare revenue per operator etc.