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

Conversion of factors in RiverSplitWithGaugeNode is incorrect #241

Open jetuk opened 1 month ago

jetuk commented 1 month ago

The implementation TryFrom<RiverSplitWithGaugeNodeV1> for RiverSplitWithGaugeNode is not correct. The representation of the factors is the not the same between v1.x and v2.x of Pywr. v2.x requires factors as a proportion of the main flow. Whereas v1.x requires specifying the factors as ratios.

https://github.com/pywr/pywr-next/blob/745d6d0571e70335e7c33baf10ba12958e0ff771/pywr-schema/src/nodes/river_split_with_gauge.rs#L220

Possible solutions: