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: Initial commit of a mutual exclusivity node. #198

Closed jetuk closed 1 week ago

jetuk commented 3 months ago

This is the first commit of using the Highs solver to model binary variables, and using those variables to apply a mutual exclusivity constraint. I.e. flow is allow through up to N nodes at a time.

TODO:

This starts to resolve issue #187.

jetuk commented 3 months ago

Re CLP/CBC.

CLP is linear programme only. CBC is the MILP solver that uses CLP internally. We have two choices:

  1. Retain the CLP solver for LP only models, and add a CBC solver for LP & MILP models.
  2. Replace the CLP with a CBC solver.

I suggest (2) is preferrable as long as CBC isn't significantly slower for the LP only case.

It is probably worthwhile doing this switch in another issue/PR before completing this one.

jetuk commented 3 months ago

Also, the tests will fail on the lack of support in CLP first.

jetuk commented 3 months ago

I've created a project to try to organise how to move this forward: https://github.com/orgs/pywr/projects/1