SV: [Help-glpk] Python

2009-11-30 Thread Robert Johansson
Ok, but I really want to use Python. The problem is which one to choose (PyMathProg, python-glpk, ctypes-glpk or something else). The math is no problem and the programming bit will be ok if I just can use a language that I know well. In the end I will use it in an educational context so I would

Re: [Help-glpk] Python

2009-11-30 Thread Jeffrey Kantor
Robert, If you're committed to the Python aspect of this, you might also consider CVXOPT (http://abel.ee.ucla.edu/cvxopt/index.html). CVXOPT is generally for convex optimization, but purportedly allows use of glpk for milp problems. I'm not much of a python programmer, so don't have much direct e

Re: [Help-glpk] Python

2009-11-30 Thread Jeffrey Kantor
That's not a lot to go on. There are a lot of ways to formulate linear programming applications, Python being one. You may find one of the modeling languages, such as mathprog, may fit your application and require little programming overhead. What type of applications to you have in mind? On Mo

Re: [Help-glpk] Linear Programming Relaxation

2009-11-30 Thread Jeffrey Kantor
On Mon, Nov 30, 2009 at 4:17 AM, RC Loh wrote: > Hi Andrew, Jeffrey, Michael, > > Thank you very much for your responses. > > I will read up on Special Ordered Set (SOS) as suggested by Micheal. Because > SOS is new to me. > > > Hi Jeffrey, > > What I am trying to obtain is that though using LPR,

[Help-glpk] Python

2009-11-30 Thread Robert Johansson
Hi! I want to use Python to run glpk (under Windows). I looked around for a while and found PyMathProg, python-glpk and ctypes-glpk. My knowledge in C is basic but I can write decent Python scripts. I would be much grateful for any suggestions or advices. cheers, Robert __

Re: [Help-glpk] Re: GLPK MingW build files and PyGLPK

2009-11-30 Thread Luiz M. M. Bettoni
Hi, Nigel. Thanks. I've missed this point before, but Andrew put some light on it. Really, the difference between the MinGW and MSYS buits are the -O2 CFLAG (missing in default GLPK build with MSYS). So, really thanks. With MSYS I can bypass MinGW makefiles (with no extra dependencies) for my

Re: [Help-glpk] Linear Programming Relaxation

2009-11-30 Thread Andrew Makhorin
> What I am trying to obtain is that though using LPR, the solution > is bounded, but the solution does not satisfy what I need which is > "x1+x2<=1" which means that "x1" and "x2" cannot co-exist together in > a solution. In mathematics "x1+x2<=1" does not mean "that x1 and x2 cannot co-exist tog

Re: Re: [Help-glpk] Re: GLPK MingW build files and PyGLPK

2009-11-30 Thread Nigel Galloway
 That sounds like a solution.  Note though that whether compiling using your own MingW makefiles or make files compatible with MSYS (and hence Linux) you are using the same MingW compiler (gcc 3.4 as standard or gcc 4.2 if youv'e  gone experimental). The difference must therefore be due to an optio

Re: [Help-glpk] Linear Programming Relaxation

2009-11-30 Thread Ali Baharev
Hi, > However, when I did the LPR, "x1" and "x2" can become "0.5". Though it still > satisfies the constraint "x1+x2<=1", but that is NOT what I want. Please re-read Andrew's e-mail: > LP relaxation is just an LP problem, where all variables are allowed > to take any *continuous* values, if only

Re: [Help-glpk] Linear Programming Relaxation

2009-11-30 Thread RC Loh
Hi Andrew, Jeffrey, Michael, Thank you very much for your responses. I will read up on Special Ordered Set (SOS) as suggested by Micheal. Because SOS is new to me. Hi Jeffrey, What I am trying to obtain is that though using LPR, the solution is bounded, but the solution does not satisfy wh