[Help-glpk] Compiling GLPK with Intel C++ Compiler

2007-02-08 Thread Ali Baharev
Hello, I am using GLPK and i am quite satisfied with it, it is really a gem of the open source community. I would like to compile it with icc on Linux i686-smp, 32 bit. I use it for solving (continuous) LP problems through the API, so i do not have to compile the routines related to mps file

[Help-glpk] Setting message level

2007-02-12 Thread Ali Baharev
Hello, I have a problem with setting the message level: lpx_set_int_parm(lp, LPX_K_MSGLEV, 1); works fine if lpx_simplex(lp) is invoked. If i call lpx_interior(lp) instead, it has no effect on the message level. Could anyone help me, please? Many thanks, Ali

[Help-glpk] Setting message level

2007-02-13 Thread Ali Baharev
Hello, I have a problem with setting the message level: lpx_set_int_parm(lp, LPX_K_MSGLEV, 1); works fine if lpx_simplex(lp) is invoked. If i call lpx_interior(lp) instead, it has no effect on the message level. Could anyone help me, please? Many thanks, Ali

Re: [Help-glpk] Re: Counting solutions rather than optimizing solutions

2007-02-25 Thread Ali Baharev
The issue is unclear. Counting the number of integer feasible solutions (as well as generating them) for your problem is a trivial task. Since the problem has no objective, what does a better solution mean? I guess he mean more efficient or elegant way of solving the problem. It would be nice

Re: [Help-glpk] MathProg for Windows - where do I get it?

2007-05-29 Thread Ali Baharev
Hello, It is part of the GLPK solver. Just type glpsol --model transportation.mod --output transportation.sol . I have attached an example file transportation.mod from the documentation. Good luck, Ali On 5/29/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I find references to MathProg for

Re: [Help-glpk] Save solution in GLPK

2007-06-05 Thread Ali Baharev
Hello, At the second call of lpx_simplex your problem is primal infeasible so phase I of the primal simplex is invoked, that is why you see 0 at the objective value. At iteration 44, it reaches feasibilty and switches to phase II. It seems to me that you would like to re-optimize your problem.

Re: [Help-glpk] Huge problem.. can glpk solve it?

2007-06-12 Thread Ali Baharev
Here is a C implementation of the Hungarian method: http://www.informatik.uni-freiburg.de/~stachnis/misc.html Good luck, Ali On 6/12/07, Andrew Makhorin [EMAIL PROTECTED] wrote: \sum_{i=1}^{375} x_i_j = 1, \all j \sum_{j=1}^{375} x_i_j = 1, \all i where x_i_j denotes that the combination

Re: [Help-glpk] Executable GLPK For Windows

2007-06-15 Thread Ali Baharev
Hello, You can download v4.9 from the GnuWin32 project: https://sourceforge.net/project/showfiles.php?group_id=23617release_id=189708 Note this is not the latest version. I think it shouldn't be too difficult to compile the latest source package on your machine. Good luck, Ali On 6/15/07,

Re: [Help-glpk] Please help!

2007-07-11 Thread Ali Baharev
Hello, Try this: http://downloads.sourceforge.net/gnuwin32/glpk-4.9.exe?use_mirror=surfnet Good luck! On 7/11/07, tobias anglevik [EMAIL PROTECTED] wrote: Hello, I´m trying to download GLPK and install it but I don´t know how to do it. Does anyone know how to explain this for a guy how is a

[Help-glpk] How to create a glp_prob pool?

2007-09-15 Thread Ali Baharev
Dear Colleagues, I have the following problem. In my computations i have to solve LP problems repeatedly. The LP problems are not at all difficult, the difficulty lies in the enormous number of LP problems to be solved. One thing is common in all LP problems: they have the same form, i.e. the

Re: [Help-glpk] Binary variables in glpk

2007-09-15 Thread Ali Baharev
If i am not mistaken, the function you are looking for is glp_set_col_kind(glp_prob* mip, int j, int kind) where kind is GLP_BV. It is discussed in section Mixed integer programming routines. Do you have to use the C API? Using Mathprog could be easier. Good luck, Ali On 9/15/07, Nicholas

Re: [Help-glpk] Question about the behavior of lpx_exact

2007-10-03 Thread Ali Baharev
Dear Marc, This exact arithmetic feature in GLPK is very interesting but i am afraid it is not applicable to relatively large linear programs. If you need some kind of verification of your result, C Jansson published a rigorous method and numerical results for real life problems illustrating its

Re: [Help-glpk] Stop execution

2007-11-28 Thread Ali Baharev
Dear Enrico, I could not understand your problem clearly but there was a similar discussion. I think you can implement what you need via callback routines. Please see Andrew's responses: http://lists.gnu.org/archive/html/help-glpk/2007-08/msg8.html

Re: [Help-glpk] information on presolve results

2008-01-10 Thread Ali Baharev
Thank you for your response. One reason is debugging. I generate the LP problems by linearizing nonlinear problems. A redundant nonlinear constraint may or may not be nonredundant in the LP problem after linearization. Identifying redundant rows / columns could help me debugging the nonlinear

Re: [Help-glpk] control parameters and round-off error

2008-01-14 Thread Ali Baharev
Thank you for your detailed e-mail. I tried parm.nrs_max = 10; but it did not help. The objective may be inaccurate also due to reduced cost tolerance which is 1e-7 by default. Besides, if the objective coefficients are too small (much less than 1.0), it would be desired to scale them. My

Re: [Help-glpk] control parameters and round-off error

2008-01-14 Thread Ali Baharev
, Michael Hennebry [EMAIL PROTECTED] wrote: On Mon, 14 Jan 2008, Ali Baharev wrote: I faced the following problem. I repeatedly call glp_simplex on the same lp object (only continuous variables) after manipulating the objective function. The objective function value i get seems to be a bit

Re: [Help-glpk] control parameters and round-off error

2008-01-15 Thread Ali Baharev
Thanks for the tips. There was an LP problem where 2.0 = x_j = 3.0 and solving min x_j resulted 1.5. I have lost this example and i do not remember the numbers but it was something like that. It would be difficult to explain the inconsistency with the current one. It is OK if the result is

Re: [Help-glpk] control parameters and round-off error

2008-01-15 Thread Ali Baharev
Thanks for the tip. I did try the exact solver but it is very-very slow, as i expected. My LP problems are generated by successive linearization of a nonlinear problem, and i need to automate the solution process. So my problem is not only for this particular LP problem, i need an error estimate

Re: [Help-glpk] control parameters and round-off error

2008-01-15 Thread Ali Baharev
My LP problems are generated by successive linearization of a nonlinear problem, and i need to automate the solution process. So my problem is not only for this particular LP problem, i need an error estimate on the objective function value for each solved LP problem. I think that in

Re: [Help-glpk] control parameters and round-off error

2008-01-25 Thread Ali Baharev
After i had spent more than a week with hopeless debugging i found that the true solution was lost due to a bug in my source code: an array was treated as the indexing started from one but for that particular array indexing started from zero. As a result the LP solver got incorrect input data, and

Re: [Help-glpk] Phase I

2008-02-12 Thread Ali Baharev
Hi, Why don't you call glp_simplex with zero (or constant) objective? Good luck! Ali On Feb 13, 2008 12:50 AM, Dragos Ilie [EMAIL PROTECTED] wrote: Hi! I am interested in using glpk to find a (initial) feasible solution to a problem with linear constraints. This should be equivalent the

Re: [Help-glpk] help to formulate problem in terms of LP

2008-04-19 Thread Ali Baharev
Maybe i miss something import but a intersects b if and only if the intersection of internal areas is not empty. One has to solve the following LP problem (feasibility test): min z=0 s.t. x = 1 x = 3 y = 2 y = 3 x = 2 x = 4 y = 1 y = 4 If the question would be that how to compute the convex hull

Re: [Help-glpk] Perform phase 1 simplex only

2008-05-20 Thread Ali Baharev
Make sure that the objective is not set (i.e. zero), then call glp_simplex. The procedure stops where the Phase 1 stops. Best, Ali ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk

Re: [Help-glpk] Compilation problems on RH Enterprice...

2008-06-05 Thread Ali Baharev
Probably this thread helps: http://lists.gnu.org/archive/html/help-glpk/2006-12/msg00018.html Best, Ali ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk

Re: [Help-glpk] Using lpx_integer for more than 200 variables

2008-06-26 Thread Ali Baharev
Dear Paul, The number of integer variables is just one thing. I think i have a MIP problem with less than 20 integer variables and glpsol would not be able to solve it. You should first improve and / or simplify your model rather than change the code of the GLPK. Or try a commercial solver such

Re: [Help-glpk] how to get intermediate results from glpsol

2008-07-23 Thread Ali Baharev
Hello, I am afraid setting the objective to zero is probably not the best solution for Chris. He would like to have 'the current best (feasible) solution' however setting the objective to zero yields the first integer feasible which may not be a good solution. Probably setting a gap limit would

[Help-glpk] verified bound on the objective value

2008-08-07 Thread Ali Baharev
Dear List Members, We often see posts from confused users who cannot understand why GLPK behaves weirdly for some LP instances. The suspected reason is usually excessive round-off error. I also had a long discussion on this topic in January:

Re: [Help-glpk] code for a simple MIP problem

2008-08-08 Thread Ali Baharev
Hello, In the Reference Manual at 1.3 Brief Example you can find an example C program with explanation. Good luck, Ali On Fri, Aug 8, 2008 at 6:54 PM, KAKAR, RATIKA [EMAIL PROTECTED] wrote: Hi, Could someone please send me a simple program for MIP problem, in Java or C? I need help with

Re: [Help-glpk] Irrational numbers

2008-08-11 Thread Ali Baharev
I am convinced that interval arithmetic provide the tools to overcome this and similar other problems, see for example: http://www.ti3.tu-harburg.de/~keil/#software http://www.ti3.tu-harburg.de/cgi-bin/cjbibsearch/publications/ti3.html?author=jansson (all papers containing the word rigorous in

Re: [Help-glpk] Irrational numbers

2008-08-12 Thread Ali Baharev
Dear Vijay Patil, You are right. I should have used term repeating decimal instead of irrational. Should have looked up before using it. I would rather say not machine / internally representable. For example 0.1 is neither irrational nor repeating decimal, and still cannot be represented

Re: [Help-glpk] Irrational numbers

2008-08-12 Thread Ali Baharev
I would like to note that 0.1 is a rational number and therefore its decimal representation is periodic: 0.1...000... = 0.0...999..., i.e. it is a repeating decimal. You are right. I misunderstood the meaning of repeating decimal, my fault. I just wanted to say that interval

Re: [Help-glpk] lpx_create_prob issue

2008-08-19 Thread Ali Baharev
Could you please e-mail the source code too? It is hard to figure out without that. Ali On Tue, Aug 19, 2008 at 7:41 PM, Jose Monreal [EMAIL PROTECTED] wrote: Good afternoon everyone, I have a problem with glpk, after I create a problem with lpx_create_prob in a c function, it changes the

Re: [Help-glpk] output KILLED

2008-08-26 Thread Ali Baharev
Please provide more information on how the glpsol is started, by a shell script? If you use the C API to call glp_simplex, please send us the source file. It seems that the scheduler or maybe memory is causing the program to be killed. Please send us the source file in which you suspect the

Re: [Help-glpk] Level of messages output

2008-08-26 Thread Ali Baharev
And you have the PDF with the new API? does it exist? There is no PDF version. However in every distribution contains the documentaion also, if i am not mistaken PS version is available. With the free Ghostscript: http://pages.cs.wisc.edu/~ghost/ you should be able to read that. If not, i will

Re: [Help-glpk] Makefiles for 64 bit Windows

2008-08-28 Thread Ali Baharev
I was always curious why there are so many problems with 64 bit applications. If someone could e-mail me an explanation (preferably written for dummies) i would appreciate. In the wikipedia i read this: SSE2 instructions on x86 and x64 CPUs do require the data to be 128-bit (16-byte) aligned

Re: [Help-glpk] How to add a restriction

2008-08-30 Thread Ali Baharev
How can I add a column like glp_set_col_ but I do not want that variable to apper at the Objectve Function. If you do not set the coefficient of a variable then it will not appear in the objective. In other words it will appear with zero coefficient by default. Best, Ali

Re: [Help-glpk] Re: producing PDF documentation

2008-12-02 Thread Ali Baharev
Thanks! :) ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk

Re: [Help-glpk] Constraints Problem

2008-12-03 Thread Ali Baharev
lpx_load_matrix(lp,1,ia,ja,ar); You did not load all the matrix, only one non-zero element but you have 4 of them. Try: lpx_load_matrix(lp, 4,ia,ja,ar); It seems to me you are using an old version of GLPK, try to update to a more recent one. Good luck, Ali

Re: [Help-glpk] Setting initial integer solution in GLPSOL

2008-12-16 Thread Ali Baharev
First of all: it is really good to see GLPK becoming better and better. There are a number of primal heuristics which would be nice to have in GLPK. Would it be difficult to implement the following proposals, regarding how often the problem of big M formulation comes up here in the mailing list?

Re: [Help-glpk] Using branch and cut starting with relaxed solution

2008-12-19 Thread Ali Baharev
You are completely correct. Though, I'm finding the relaxed solution right now via a decomposition method (which is why I have no basis at the end) and I'm finding it up to 100X faster than glp_simplex would otherwise. Since this is the case, I'd love to use that as a starting point for

Re: [Help-glpk] How to analyze which constraint (or combination of constraints) is causing the model to become unsolvable?

2009-01-14 Thread Ali Baharev
If finding the minimal set of conflicting constraints is a well known problem, are there any solutions provided in GLPK for it? Not that i know of. It is outside of the scope of GLPK. And if it is, what other tools could be used to find out the minimal set? I am sorry i cannot be more

Re: [Help-glpk] Getting the number of simplex iterations

2009-02-13 Thread Ali Baharev
Hi, Try this: int iter_count = lpx_get_int_parm(lp, LPX_K_ITCNT); May or may not work with you distribution, i used it a long while ago... Good luck, Ali ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk

Re: [Help-glpk] How to install this software

2009-03-16 Thread Ali Baharev
The current version is glpk-4.36.tar.gz ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk

Re: [Help-glpk] GLPK re-endrant

2009-07-04 Thread Ali Baharev
Hi, Once upon a time, I had a discussion with one of the GPULib developers and he told me GPUs were not good for the simplex method, because the gain is not so significant for sparse matrix-vector operations. (Or at least it was what i understood.) Ali

Re: [Help-glpk] Nonlinear optimiser recommendations

2009-07-27 Thread Ali Baharev
Hi, Your question is a little off-topic. Ipopt is very robust / stable but slow. The other open-source nonlinear solvers i tried so far failed to solve my problems. https://projects.coin-or.org/Ipopt The commercial solver CONOPT is said to be both fast and robust / stable.

Re: [Help-glpk] CoinGLPK with GAMS

2009-08-04 Thread Ali Baharev
Hi, Download the GLPK source distribution. It includes the manual in PDF format. http://ftp.gnu.org/gnu/glpk/ Ali ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk

Re: [Help-glpk] How can I get coefficients

2009-08-08 Thread Ali Baharev
In the documentation, find: 4 Advanced API Routines 4.3 Simplex tableau routines 4.3.1 glp_eval_tab_row—compute row of the tableau . . . . . 119 4.3.2 glp_eval_tab_col—compute column of the tableau . . . 120 Good luck, Ali ___ Help-glpk mailing list

Re: [Help-glpk] time complexity in glpk

2009-08-19 Thread Ali Baharev
The time complexity of the Hungarian method is O(n^3). I was unable to determine how this relates to the complexity of the network simplex method. Ali ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk

Re: [Help-glpk] Can you help me?

2009-08-23 Thread Ali Baharev
Hello, There is nothing wrong. It seems to me you have chosen the bounds to be the minimum and maximum value for a 32-bit signed integer. But your bounds are converted to double precision variables, and GLPK checks bounds accordingly, the relative error is less than 1.0e-9 which is OK. You can

Re: [Help-glpk] RE: Time Limit Didn't Work On Tournament Model

2009-09-12 Thread Ali Baharev
Another interesting thing is that, using EXACTLY the same parameters, the compilation of glpsol 4.9 I downloaded from http://winglpk.sourceforge.net/ is unable to get the gap below 4.6% (the optimum is 0%), whereas it seems to solve fairly easily in the GUSEK 0.2 Windows IDE. This is exactly

Re: [Help-glpk] GLPK vs. SCIP for solving MIP

2009-10-02 Thread Ali Baharev
Hi Yaron, The cplex lp file format is smarter than the MPS that is why i suggested that. However you should not get incorrect results with the MPS... :( It may be some MPS format problems (SCIP expects or handles differently than GLPK) or some numerical problems you avoided by using the smarter

[Help-glpk] numerical (in)stability

2009-10-30 Thread Ali Baharev
Dear Andrew, Thank you for your response. I decided to move our conversation http://lists.gnu.org/archive/html/bug-glpk/2009-10/msg00018.html here from the bug-glpk because we are not dealing with a bug anymore. I just added a limit on the number of restarts in the simplex algorithm. In this

Re: [Help-glpk] mip formulations and reformulations

2009-11-06 Thread Ali Baharev
This thread is getting more and more exciting :) The Zimpl User Guide gives examples of reformulations that made the solution process much faster: Section 5 - Modeling examples http://zimpl.zib.de/download/zimpl.pdf It appeared earlier on this mailing list before: AIMMS Modeling Guide -

Re: [Help-glpk] what kind of simplex does glp_simplex use

2009-11-12 Thread Ali Baharev
Hello, You can tell GLPK to use either primal or dual, see the documentation (a pdf) included in the distribution: glp simplex—solve LP problem with the primal or dual simplex method and also: Control parameters GLP_PRIMAL—use two-phase primal simplex; GLP_DUAL —use two-phase dual simplex;

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 they are

Re: [Help-glpk] Re: XyPron: shadow prices in MIP problem

2010-06-11 Thread Ali Baharev
No, it is not. Could you please send us your code so we have the chance to help? Ali On Fri, Jun 11, 2010 at 10:41 AM, Fabio pruef...@me.com wrote: Is it normal that solving the problem again with fixed integer variables at the optimal values takes nearly as long as solving the original

[Help-glpk] computational efforts, message level and KKT check

2010-11-28 Thread Ali Baharev
Dear Andrew, In my application I would like to get the computational efforts through the C API. In the previous releases I could use lpx_get_int_parm with LPX_K_ITCNT but it does not seem to work anymore. Please provide API functions to get the computational efforts such as iteration count. If I

[Help-glpk] Re: computational efforts, message level and KKT check

2010-12-01 Thread Ali Baharev
for an official solution. Ali On Mon, Nov 29, 2010 at 2:01 AM, Ali Baharev ali.baha...@gmail.com wrote: Dear Andrew, In my application I would like to get the computational efforts through the C API. In the previous releases I could use lpx_get_int_parm with LPX_K_ITCNT but it does not seem to work

Re: [Help-glpk] computational efforts, message level and KKT check

2010-12-01 Thread Ali Baharev
Dear Andrew, Thank you for the detailed explanation. I decided not to include routines like lpx_get_parm/lpx_set_parm in the new api, because most of control parameters in the old api are solver properties rather than model properties. Probably such statistics could be reported through the

Re: [Help-glpk] computational efforts, message level and KKT check

2010-12-01 Thread Ali Baharev
GLP_MSG_ERR is a value of a control parameter passed to glp_simplex, and glp_scale_prob knows nothing about it. I think it is normal for processing routines to display some brief information about what is going on. In any case you can suppress/resume the terminal output with glp_term_out. I