资 源 简 介
ctypes-glpk is a Python module which encapsulates the functionality of the GNU Linear Programming Kit (GLPK). The GLPK allows one to specify linear programs (LPs) and mixed integer programs (MIPs), and to solve them with either simplex, interior-point, or branch-and-cut algorithms. The goal of ctypes-glpk is to give one Python access to all documented functionality of GLPK.
Advantages
Complete access to all documented functionality of GLPK, up to version 4.33
No installation or compiler required, just import a single module named "glpk" and run
Cross platform, running on Windows, Linux, and virtually any other platform supporting GLPK
Example
C code
```
#include
#include
#include "glpk.h"
int main(void)
{
glp_prob *lp;
int ia[1+1000], ja[1+1000];
double ar[1+1000], Z, x1, x2, x3;
lp = glpcreateprob();
glpsetprob_name(lp, "sampl