-
Notifications
You must be signed in to change notification settings - Fork 115
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
Modifying row coefficient via the C interface #655
Comments
Looking at #339, I can see problems - including large overheads. But I think you have a much simpler request if you are just modifying one coefficient - even simpler if you are not changing the coefficient to or from zero. Will this be done outside a solve - or at least before cuts have been added? Inside Cbc there are really two solvers - one as passed in and the other after cuts and fixing. So it could be done at Osi level e.g. or at Cbc level |
Thanks for the advice. I'll take a look over the next couple of days. Will you want this against the stable or master branch (or both)? |
For my use case, the update is between solves. |
Do it to master. Looking at code, modifyCoefficient in ClpModel doesn't do some things that would make it safer e.g. check if there is matrix stored by row which would also need updating. Also if a factorization has been saved it may not may not be valid so that should be noted. It is unlikely that any of that will matter, but I may add a safer version. |
Only needed a tiny change to make safer - done that in master. Also I was only looking Cbc C interface. When I looked at Clp C interface the function you need is already there. /* Change matrix coefficients */ |
I would like to modify a row's coefficient and resolve a model via the C interface. I noticed there was a brief mention of this functionality in #339 , but I do not think that functionality has been added. Is this something of interest to the project, and could the code in #339 be a basis for a pull request? If so, I am happy to try to implement that.
The text was updated successfully, but these errors were encountered: