pywr / pywr-next

An experimental repository exploring ideas for a major revision to Pywr using Rust as a backend.
6 stars 4 forks source link

feat: Add VisitMetrics and VisitPaths traits and implementation. #167

Closed jetuk closed 2 months ago

jetuk commented 2 months ago

This adds methods to the network and various components for "visiting" Metrics and Paths. These methods are useful for finding, for example, all paths in a model.

The traits are trivially implemented for common types. New derive macros replace the previous PywrNode macro. These macros generate implementations of the two traits for the struct and enum types currently used in the schema.

Outstanding items: