Dear all, I would like to try a specialized algorithm for my (MI)LP problem but the library that implements it requires to specify the model in a structured row-wise or column-wise matrix form, where diagonal blocks and linking constraints are marked explicitly, and the task of creating such a matrix getting indexes right seems daunting. I already have a cplex/concert c++ implementation for the same problem that I find easy to follow. I wonder what is the easiest way to generate a matrix representation from that. For one, the C++ Concert library does not seem to have a IloLPMatrix class as in Java and .Net's versions. More generally, if I were to write a model in matrix format, structured or otherwise, from scratch I'd be using a few containers to represent constraints and variables and interpret the indexes of the LP matrix, in a way similar to concert's. Something like
I have a home-brew old C library that does that but it's kind of hackish, and uses C99 features so it's likely I cannot mix it freely with the rest of c++ code if needed. I realize this could be done with vectors and arrays as well, and possibly some classes to add syntactic sugar, but I wonder if there's something already done which provides better abstraction and is possibly more efficient at mapping indexes. Do you know of any free C/C++ modelling library that allows to create a model via object instantiation and map it to a matrix representation? TIA
asked
Andrea T |