This repository has been archived by the owner on Jan 19, 2019. It is now read-only.
Fix deserialization order to match serialization #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous commit, 86240a3, addressed the hardcoding of all LP
deserialization being mapped to the first LP type. This fix was a
positive step but left a previously unaddressed issue:
The deserialization was not done in the same order as serialization.
The result of this was that in simulations with more than one KP, LPs
may end up with GIDs and RNGs different than what they had been given
at the start of the original simulation.
This bug could have gone unnoticed in simulations with only one LP type
as there would not be any runtime errors generated unless change in GID
or RNG detection was done at the model level.
This commit addresses the issue and makes the deserialization match the
serialiation process.