Hi Bohdan,
At a high level, I’m leaning towards this needing some custom work in order to get this generic. Essentially, because this is a partial coupling (ie 0-Max), there will need to be some iterative solving going on - so if this were me I’d be looking to feed that into a solver.
What is the latest from your end on this?
Best
Geoff