-
Notifications
You must be signed in to change notification settings - Fork 67
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
loadProblem() with a single function call #56
Comments
Afaik there is no algebraic modelling (or let's say matrix-based modelling) available in SCIP, meaning: there is no way to define a vector / batch of variables and there is no way to define a vector / batch of constraints defined by a constraint coeff-matrix and a constraint rhs-vector. That being said, i don't see the issue. Targeting this kind of low-lvl algebraic structure (i'm having Highs in mind which i once filled with some parent which also filled or-tools' PDLP) sounds relatively straightforward to me:
I would guess that's < 100 lines of code. Maybe even < 50 if one would store the algebraic model in something like Eigen. Don't forget the necessary memory-management (SCIPfree...) Don't you agree, that a 50-100 loc wrapper external_to_scip(...) is a small investment? One more remark:
One more opinion:
|
Hi, you are correct that there is no such matrix-based problem creation function in SCIP. I agree that this would be a nice convenience feature. It could be an addition to the interface of cons_linear. I don't think we are going to implement that ourselves, but we would welcome and support a PR! (The solution is pretty much a combination of for loops as described by @sschnug .) |
Hello!
I'm working with various models in the domain of Energy Markets. Some of my models are quite large (tens of millions of variables, millions of constraints) and I'm constantly looking for ways to improve the solving time. I would love to experiment with SCIP but I couldn't find a way to pass the entire problem to the solver with a single function call (well, 3-4 would be ok too but not millions ;)
I developed a generic solver interface for my kind of models, such that at the high level takes network objects (such as Supply/Transport/Demand nodes and Edges) and at the low level passes corresponding variables and constraints down to a solver in the form of ordered lower_bound/upper_bound/cost arrays for variables, and CSC matrix and bounds arrays for constraints.
So far, I managed to integrate my library with
I'm sure a similar method exists in Mosek but I haven't had a chance to integrate with it just yet.
These methods allow me to quickly integrate different solvers through thin driver libraries as my generic library outputs almost exactly what these methods accept. But I can't find any similar function in the C API of SCIP and the need to pass every variable and constraint with a function call holds me back.
I saw this struct_matrix.h in the docs but it seems this structure can only be read from the model once it is all set up and never used to actually create/load a problem.
I hope to be wrong, or let this be a feature request otherwise =)
Thank you!
The text was updated successfully, but these errors were encountered: