help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Please help me debug this small python-glpk program


From: Christophe-Marie Duquesne
Subject: [Help-glpk] Please help me debug this small python-glpk program
Date: Wed, 23 Nov 2011 15:53:07 +0100

Hello help-glpk,

I can't find a mailing list for the python-glpk binding[1], so I
figured I could ask my question here since this library makes the code
look very much like C.

I want to formulate a small LP problem (3 variables, 3 constraints)
and to write it on disk. Attached as "expected.lp" is what I want, as
"obtained.lp" is what my code produces, and as "glpk_mip.py" is the
code itself. At line 18, I use glp_set_col_kind(prob, 3, GLP_IV) to
make the variable z an integer variable. However, this variable is
reported as "general" in obtained.lp. Should you read this code as C,
would I be missing something?

[1]: http://www.dcc.fc.up.pt/~jpp/code/python-glpk/

Regards,
Christophe-Marie

Attachment: expected.lp
Description: Binary data

Attachment: obtained.lp
Description: Binary data

Attachment: glpk_mip.py
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]