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

Add soft min/max flow to LinkNode #181

Open jetuk opened 2 months ago

jetuk commented 2 months ago

Feature request to add ability for a soft minimum and/or maximum node. This feature could be added to the basic node types: Input, Link and Output. When active it would create an additional internal node for the soft min and/or max.

s-simoncelli commented 1 week ago

I started to implement this for a Link node. Do we want the node to look like this internally?

image

Or is it simpler to just set one soft constraint and the user decides whether it is a min or max?

jetuk commented 1 week ago

I think the schematic is correct. I think you'll want it to only create the additional links if they are needed. It will probably be easier to keep them separated/dedicated for min and max for clarity and tracking (also if someone wants both?).

We'll need to ensure that the attributes correctly reflect these additional links.

s-simoncelli commented 1 week ago

Ok, my first implementation is in #213