I would like to use or-tools and the GLOP solver to solve linear programming problems.
I already have another program that creates LP files which are, as far as I know, fairly standard for defining linear programs.
Has anyone managed to pass those files directly to GLOP? What file format das GLOP understand and how do I pass them to GLOP?
Example lp file:
maximize 2x1 + 3x2 - x3
subject to
x1 + x2 <= 1
x1 + x2 + x3 <= 0
x2 - 2x3 <= 2
bounds
x1 free
x2 free
x3 free
end
Edit:
LoadLinearProgramFromModelOrRequest
seems to be the way. See here. I don't know how to use it thoughThere is not API to read LP files, we did not write a good enough LP reader. We do support reading MPS files.