|
From: | Xypron |
Subject: | Re: [Help-glpk] Please help me debug this small python-glpk program |
Date: | Wed, 23 Nov 2011 21:31:44 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Icedove/3.1.15 |
Hello Christophe-Marie, the IBM ILOG documentation teaches: "To specify any of the variables as general integer variables, add a GENERAL section;" cf. http://publib.boulder.ibm.com/infocenter/cosinfoc/v12r2/topic/ilog.odms.cplex.help/Content/Optimization/Documentation/CPLEX/_pubskel/CPLEX880.html IBM ILOG's choice of the keyword GENERAL may be awkward, but everything seems to be correct. Best regards Xypron On 23.11.2011 15:53, Christophe-Marie Duquesne wrote: 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_______________________________________________ Help-glpk mailing list address@hidden https://lists.gnu.org/mailman/listinfo/help-glpk |
[Prev in Thread] | Current Thread | [Next in Thread] |