Re: [Help-glpk] [Fwd: tutorial]

2015-10-14 Thread Raniere Silva
Hi, Erik (in copy) contacted me asking that I upload again a few examples in GNU Octave that I wrote in the past (mention in this thread). Do we have one standard location for examples? I now the files provided at https://www.gnu.org/software/glpk/#downloading have some examples and I happy to

Re: [Help-glpk] MIP Help

2014-11-14 Thread Raniere Silva
Hi Mike, I am new to GLPK and I can't the MIP solver to report integer values. Basically, when I first call the simplex, and then cal glp_inop, the message report that it found a solution but when I call glp_mip_col_val, it reports double numbers, not integers. This is the correct behavior.

Re: [Help-glpk] Interior point method and MIPs

2014-07-01 Thread Raniere Silva
Hi Andrew, I understand that for MIPs, GLPK uses branch-and-bound and only offers the simplex method. I would be interested in knowing why the interior point method is only allowed for LPs, not MIPs. In some cases the solution for MIP is one vertex of the problem and interior point methods

Re: [Help-glpk] GLPK Examples in C Needed

2014-06-11 Thread Raniere Silva
I am looking for a repository of working C programs (or Java, or Ruby, or...) that access GLPK and demo its awesomeness. https://gitorious.org/tutoriais-computacao-cientifica/glpk/source/9cd938d3e5ee00c3ec20ba6f68e3da6bad13238f: Sorry that this set of examples is small. Raniere

Re: [Help-glpk] [Fwd: tutorial]

2014-03-31 Thread Raniere Silva
I'm want to use this to solve some optimization problem, but I dont know how to input and compute it (Im using matlab). Optimization is not my major so can you send me a tutorial of how it work, input constraints. Not a tutorial, only some basic examples:

Re: [Help-glpk] [Fwd: GPLK and consistency of global constraints]

2013-11-29 Thread Raniere Silva
Hi Umar, I would like to know about the techniques GPLK (or any other solver) uses to ensure global consistency of all constraints while making a choice. For example, for a MIP(mixed integer) program with binary variables x_1...x_n a solver needs to decide whether a variable x_i will be 0 or

Re: [Help-glpk] [Fwd: Question]

2013-10-20 Thread Raniere Silva
Hi Roy, To retrieve the values of the objective function and variables values with the C API look for the functions: * glp_get_obj_val * glp_get_col_prim I hope that is what you are looking for. Raniere ___ Help-glpk mailing list Help-glpk@gnu.org

Re: [Help-glpk] Question about scaling MIP

2013-10-20 Thread Raniere Silva
Where in the source code I have to look at? Any tip for a article about that? The scaling affects only the basis factorization and the simplex solver. Let me see if I understanding correctly. When solving a MIP, for each node of the tree it scale the problem before use the simplex solver

Re: [Help-glpk] Help

2013-08-23 Thread Raniere Silva
Hi Abhishek, Can I run a glpsol program and get it to run a java program? No. `glpsol` is a C program that uses GLPK C-API. Can my data file be a java file and my code be a mod file? Maybe you can write a Java program that read your model and use the data from your other Java program.

Re: [Help-glpk] [Fwd: help running glpk 4.52]

2013-07-24 Thread Raniere Silva
Hello Juan, I am compiling using: g++ example.cpp -lglpk -o example However, when I run the file ./example I get: error while loading shared libraries: libglpk.so.35: cannot open shared object file: No such file or directory Your operational system can't locate the shared library. You

Re: [Help-glpk] About Quadratic Programming

2013-07-19 Thread Raniere Silva
Hi Bruce, I checked the current version 4.52 and didn't find it support quadratic programming.Is there any plans to add quadratic programming feature to glpk? Simple answer - I don't know. Long answer --- AFAIK, the simplex method didn't work with quadratic programming.

Re: [Help-glpk] [Fwd: GLPK installation help]

2013-07-02 Thread Raniere Silva
Hello, I was trying to install GLPK 4.35 on my Ubuntu 12.05 LTS system but couldn't succeed. I downloaded the sig file and ran the following command: sudo gpg --verify glpk-4.35.tar.gz.sig Why are you running gpg as root? AFAIK, the error you got is because you are using gpg as root.

Re: [Help-glpk] glpk matrices' limitation

2013-06-23 Thread Raniere Silva
I would like to ask whether the matrices ia[], ja[], ar[] have a size limitation or the only limitation that exists is due to the PC memory. AFAIK, the PC memory or the limitation is the `INT_MAX` from `limits.h`. Raniere ___ Help-glpk mailing list

Re: [Help-glpk] [Fwd: Ipopt GMPL Interface]

2013-04-22 Thread Raniere Silva
Hi Dieter, I am new to GLPK and so far I'm very impressed by it's capabilities. My question goes to solving non-linear problems written in GMPL using e.g. ipopt. Is there an interface or could anyone point me into a direction where i can learn how to do this? I'm on Linux Mint, so I

Re: [Help-glpk] How to provide to the GLPK MIP solver a integer feasible solution

2013-04-08 Thread Raniere Silva
Hi Giorgio, I have a model to which I can provide a initial feasible solution. How can I do that? I do long time ago (about 3 years). Initially I tried with glp_read_mip: I didn't use that. Hope that some one can help you with that. The second attempt was with the callback routine:

Re: [Help-glpk] Help: How to build MIP model

2013-01-04 Thread Raniere Silva
Hi Luca, The problem is as follows: minimize { sum[from i=1 to 96] of {c1*x1(i)+c2*x2(i)+c3*x3(i)} } with this constraints: x1(i)+x2(i)+x3(i)=c4(i) x1(i)+x3(i)=c5 x1=5 0=x2=1 binary 0=x3=1 binary where x1, x2, x3 and c4 are vectors of 96 elements. c1,c2,c3,c5 are contants.

Re: [Help-glpk] Help: How to build MIP model

2013-01-04 Thread Raniere Silva
by Raniere Silva r.gaia...@gmail.com */ #include stdio.h #include stdlib.h #include glpk.h int main(void){ int n = 96, i, ir, j, jc; double c1=1.0; double c2=1.0; double c3=1.0; double c5=1.0; double c4[97]; for(j = 1; j = n; j++){ c4[j] = 1.0; } glp_prob *lp

Re: [Help-glpk] Help: How to build MIP model

2013-01-04 Thread Raniere Silva
Jeffrey, Maybe I'm missing something, but shouldn't there be a call to mip solver somewhere in your code? Yes, you right. Sorry about the mistake. Briefly, just replace `glp_simplex` in line 81 by `glp_intopt`. Raniere ___ Help-glpk mailing list