Re: MathProg, glpk and C language
Andrew Makhorin <[email protected]>
| Newsgroups | gmane.comp.gnu.glpk |
|---|---|
| Message-ID | <1507117743.5870.3.camel@corvax> |
> I am trying to write a function in ANCI C programming language. The > aim of this function is to get some input arguments from the main C > program, then solve a MIP problem and return the value of objective > function along with the values of structural variables back to the C > main program. > The issue is that the MIP problem I am about to solve via glpk has a > quite large number of variables. So, I am not able to hard-code them. > Hence, I came across the idea to use MathProg language, as it is very > easy to code my model. > The question is, how to do this? Is it possible to incorporate > MathProg code inside a C language function? Please note that I am > aware of how to write a C program that calls API routines of glpk in > order to solve a simple model, but here I am not referring to this > case. > Any suggestion of a site, pdf or relevant document will be very > helpful. Please see Section 3.2 "Routines for processing MathProg models" in the glpk reference manual (file glpk.pdf can be found in the subdirectory 'doc' in every glpk distribution tarball).