-
Notifications
You must be signed in to change notification settings - Fork 21
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
All Person
attributes default to java.lang.String
when saving to MATSim xml
#158
Comments
Now also found on a recent project:
person attributes after reading and writing out through pam have resulted in:
instead of expected
|
thanks Kasia, we now have a BIP (branch in progress); write-leg-attributes which includes a fix for this specific case in the write_matsim (v12) function:
This seems to be a working fix but is obviously a bit trash to maintain and will require us to treat the "vehicles" attribute as special/protected forever after. |
We also have a type issue in one of the new leg attributes:
This one would be fixed by your type mapping. But i will also look to roll out more broadly for "attributes". |
fixed badly by 163 |
All attributes for a
Person
are currently saved asjava.lang.String
in the MATSim xml files:https://github.com/arup-group/pam/blob/main/pam/write.py#L177
Sometimes MATSim requires different java types. Below is an error caused by running the multimodal contrib, which is expecting Person's age to be saved as
java.lang.Integer
for example:We had a go at 'guessing' java types from python types in genet: arup-group/genet#124, master/genet/utils/java_dtypes.py, which may be of use here.
The text was updated successfully, but these errors were encountered: