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

Initial implementation of CBC solver. #215

Closed jetuk closed 2 months ago

jetuk commented 3 months ago

The current CBC C interface does not support modifying constraint coefficients. Therefore this solver can not support aggregated nodes with factors at present. In theory it could support constant factors, but that is also not implemented here.

If this initial version is OK there are two follow-ups to come:

  1. Refactor #198 to work with CBC as well.
  2. Use an updated version of CBC that supports constraint coefficient modification.
jetuk commented 3 months ago

Would it be worth adding the solver as a cli option in this PR? Relatedly, I do not think it is currently possible to run the feature-gated solvers via the cli. Looks like it requires the features to be duplicated in the cli toml file, unless there is a way to have shared features in a workspace?

I'll probably do this when finishing #18. It's an issue in all of the other crates that depend on pywr-core.

I've addressed the comments.