Rjf/traversal abstractions clone issue #44
Merged
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.
This PR refactors the energy model build process so that all objects in the energy
TraversalModelService
are wrapped inArc
references if they are large heap objects, so cloning is not expensive. it cleans up the build removing one layer of indirection along the way.TraversalModelService
(and builder) traits were defined in routee-compass but have been moved to routee-compass-core so that they are available from the routee-compass-powertrain crate. build methods now return a TraversalModelError on failure, since CompassConfigurationError is no longer in scope.It's probably a good low-hanging fruit task to move the rest of the builder traits to the core crate too.
i attempted to update the doc reference from the routee-compass crate that references TraversalModelBuilder, but i'm worried it won't take, that we can't make cross-crate references like that. we may need to replace those builder links with a direct hyperlink to the routee-compass-core docs at docs.rs.
Closes #34.