I’m using the Lpsolve library for Java to solve linear programming problems.
In the Lpsolve Help API, the developers give an example of filling the constraint matrix as strings of type String separated by spaces:
// add constraints solver.strAddConstraint("3 2 2 1", LpSolve.LE, 4); solver.strAddConstraint("0 4 3 1", LpSolve.GE, 3);
Probably, this method is possible if there are not many coefficients. But if the LP task is quite difficult, then how to remember the location of a variable? How to quickly generate vectors of indicators, especially binary ones, where only one unit occurs in the entire row of coefficients? And then how to read the optimization result without the names of the coefficients?
Share your usage experience
read Lp solve API 🙂
QQYu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.