-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial implementation of CBC solver. #215
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of trivial comments but otherwise this looks good to me.
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?
@@ -0,0 +1,92 @@ | |||
use crate::solvers::SolverSettings; | |||
|
|||
/// Settings for the OpenCL IPM solvers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solver name needs updating
pywr-core/src/solvers/cbc/mod.rs
Outdated
let coefs = &elements[start as usize..end as usize]; | ||
|
||
unsafe { | ||
let c_name = CString::new("row").expect("Failed to create CString for column name."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be '...for row name."'
I'll probably do this when finishing #18. It's an issue in all of the other crates that depend on I've addressed the comments. |
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: