that.)
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
do you know mabye a good simplex solver with exact arithmetic? Maybe
based
on GMP?
There is a package that exactly you need; see:
http://members.jcom.home.ne.jp/masashi777/exlp.html
___
Help-glpk mailing list
Help-glpk@gnu.org
. Although
Free Software and Open Source are similar to each other, there is
a significant difference between these two terms. Please see the
article Why `Free Software' is better than `Open Source' at:
http://www.gnu.org/philosophy/free-software-for-freedom.html
Best regards,
Andrew Makhorin
Does this mean that if you have e.g. best_mip = 1 and best_bound=-99, you
get a rel_gap ~= 100/1 = 1% ?
Yes, however, rel_gap appears on the screen only if it is less than 10,
i.e. 1000%.
___
Help-glpk mailing list
Help-glpk@gnu.org
in Russia and report that they
successfully solved several LP models with about 250,000 variables
and 100,000 constraints, and plan to use Glpk for larger LP models
with about 400,000 variables and 150,000 constraints. (They don't
use MathProg; all data are provided in MPS format.)
Andrew Makhorin
on the list, i.e. because glpk simplex solver is not
robust and sometimes numerical difficulties cause its crashing. Try to
change some options (e.g. --noscale, --nopresol, --std, etc.).
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http
im using BC++ 5.0 and when using the built in GLPK
functions i get EAccessViolation at certain adress. I
unpacked GLPK, ran make -f w32bc5.mak and included
the glpk library and glpk.h into my project. The
same happens if i run the sample.c file, found in
the Examples directory. It halts on
When i tried to call glpsol.exe to solve a *.mod *file, i take following
error message.
Only one input file is allowed!
What may be missing in this situation.
This message means that you specified more than one input file in
command-line, however, glpsol does not support such feature. If you
Still playing with the simplex tableau (ST). I'll start with a small
example.
Here consider the following ST, where x1-3 are structural variables
whereas x4-5 are slack variables, and . are some coefficient.
| x1 x2 x3 x4 x5 |
-
x4 | . . . 1 0 |
x5 | . . .
Where are glpk48.lib?
The following messages can help:
http://lists.gnu.org/archive/html/help-glpk/2004-04/msg6.html
http://lists.gnu.org/archive/html/help-glpk/2003-11/msg00052.html
___
Help-glpk mailing list
Help-glpk@gnu.org
Is it possible to set this constraint ?
SUM (Xi * Yj) = 1
where Xi and Yj are variables in {0,1}.
Your inequality can be written as follows:
sum zk = 1
where zk are binary variables such that zk = xi * yj (or,
equivalently, zk = xi yj). The latter constraints are still
non-linear,
I am trying to formulate a multiple choice knapsack problem. I
am stuck
at the point where I need to formulate subsets of a given set.
From the archives of this list I have got the idea that you can
it like
this:
set FOO;
set BAR{FOO};
Am I correct here?
This depends on whether
I need to run my system with GLPK DLL.
When I insert the GLPK DLL in the .net Project the following message is
showed:
This is not a valid assembly or COM component.
What I need to do to run correctly the GLPK with C#.net? :/
The following messages can help:
is not well conditioned
due to extra round-off errors introduced by the lp presolver.
Andrew Makhorin
lpx_read_mps: reading problem data from `UnstableLP.mps'...
lpx_read_mps: problem eSimGene
lpx_read_mps: 622 rows, 373 columns, 1460 non-zeros
lpx_read_mps: 23 integer columns, 22 of which are binary
I'm trying to translate an Ampl model file in Mathprog, and don't know
how to write the definition of the set setC that is an union of
indexed sets.
The ampl formulation is below:
##
set setA;
set setB{setA};
set setC := union {a in setA} setB[a];
##
glpk returns invalid use of reserved
I've been trying GLPK for a month now and I have some
suggestions for
enhancement that would make the package more
attractive (at least to me!).
Thank you for suggestions.
1) The possibility to specify that the matrix is
symmetric and therefore use
half the storage.
I've never met
For those that could be interested, I finally get how to link glpk with
borland C++ 6:
1)I downloaded the complete package from here:
http://gnuwin32.sourceforge.net/packages/glpk.htm
2)I followed the post
https://www.coin3d.org/pipermail/coin-discuss/2001-March/000482.html
and I
I do not belong to the OR community. Anyway I need Linear Programming to
solve a problem. I start using glpk with diffilculty. At least I would
have expected that just adding a display statement in one of the simple
example file provided with glpk would entail no problem.
I just ran
limit the solution time; for example:
glpsol ... --tmlim 600 ...
limits the solution time to 600 secs = 10 mins.
PS: Please send your questions about glpk to help-glpk@gnu.org,
not to me.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
additional constraints
(and/or modify the objective function) to determine solution having
desirable properties.
Glpsol is not able to generate all integer feasible solutions. However,
this is usually not needed in practice; besides, the number of integer
feasible points may be extremely huge.
Andrew
I am writing a version of the record_solution function, defined in
glpmip2.c, and I got confused; shouldn't the line
tree-best = lpx_get_obj_val(lp);
be replaced by
tree-best = lpx_get_mip_val(lp);
as we are dealing with MIPs?
The correct line is the following:
tree-best
Sorry, I did not mention the context of this use of record_solution; I
was writing a version to call after fixing some integer variables with
some heuristics, and doing a branch-and-bound on the remaining. So it
seems that I need to use lpx_get_mip_val, and also lpx_mip_col_val and
I have been using the GLPK software on some programs with heuristics
for MIP. I fix some integer variables with the heuristics, and
determine the remaining and the continuous ones with lpx_integer (I
have put a tabu search software based in this approach on
http://www.ncc.up.pt/~jpp/mipts).
I have some requests though:
* I'd like to optionally specify an initial bound for the BB.
This feature will be implemented in a next release.
* I'd like to optionally see the real valued bound for the BB for a MIP
with integer objective function.
The lower bound obtained from a
To provide an initial MIP solution found by a primal heuristic one
could replace lines 84-85 in the routine mip_create_tree (see file
glpmip1.c):
tree-found = 0;
tree-best = 0.0;
by the following lines:
tree-found = 1;
tree-best = incumbent value;
The incumbent value
The lower bound obtained from a relaxation is only a bound. Its value
may depend, for example, on transformations performed by presolver or
on cutting planes added to the relaxation. So it does not express any
essential information.
I agree with you, but when using cplex I use it as an
Running glpk4.9 under my application I get this error:
Assertion failed: ipp!=ipp; file src/glpipp2.c; line 795
(console output)
I have no idea of what does it means??? :-((
This is a bug in the mip presolver. Thank you for your report.
I have a multi-agent model, I have the error
Hi
I am working on building an LP model of an electricity market. I had a
model
that ran in about 20 seconds. After changing some of the input data, I
ran it
again, and this time GLPK kept giving the message:
'spx_simplex: numerical instability (primal simplex, phase II)'
and took much
Is there any bibtex entry to use for the GLPK manual?
No. If you need to refer to glpk, the following reference may be used:
GNU Linear Programming Kit, Version X.Y,
http://www.gnu.org/software/glpk/glpk.html
___
Help-glpk mailing list
I want to compile GLPK into a Win32/MFC dll and call it from a proprietary
software product (and thus include the GLPK dll in the installation of the
software). Is this permitted under the GNU license? What license should I
use
(General Public License or Lesser General Public License), what
I've integrated GLPK in a software I'm developing, however, it's too
noisy in the output. Can I make it silent?
Use the routines lib_set_print_hook and lib_set_fault_hook; for details
see comments to these routines in file src/glplib2.c.
___
So this wil probably give around 600*600 shortest distances.
Do you really need to know all the distances or you need to solve
some high-level problem using the distances as an intermediate result?
If the former, I am just wondering how you are going to use such huge
amount of information. :+)
In version 4.8 there is a nice example: maxflow.mod
regarding this example, how does one declare and assign a
symbolic (string) parameter within the Arcs set?
i.e., I would like to assign a 'name' parameter to Arcs:
param n, integer, = 2;
/* number of nodes */
set Nodes,
Is there a build-in function that gets the cardinality
of the set? I was unable to find it in the
documentation.
Unfortunately the function card() is not implemented yet.
The equivalent expression sum{my_set}1 can be used instead.
___
Help-glpk
In the set, a dummy index plus
1 points to the next element. Is it cyclic? 1..5, j=5,
i=j+1, i=1?
No, it is not. You should write something like
i = if j 5 then j + 1 else 1
or more intricate
i = mod(j,5) + 1
___
Help-glpk mailing list
I currently have GLPK 4.9 installed and the following CPLEX file:
maximize 1
st
- 2 x1 - 3 x2 = -1
2 x1 + 3 x2 = 1
- 1 x1 - 1 x2 = -4
1 x1 + 1 x2 = 4
bounds
x1 free
x2 free
end
Cplex can read it.
glpsolve:
$ glpsol --cpxlp test.lp
lpx_read_cpxlp: reading problem data from
I had been trying to call loop with in loop
I was trying using for loop But i get strange problem
either it can not be defined or so
1.Can we call loops in Math program ?
2:If yes then please give me how to use it in math program ?
Look at the example 'queens.mod' included in the glpk
Thanks, and is it possible to have it output the solution found?
I searched --help flag but found nothing.
To write the solution into a file for further browsing use the
option '-o filename'.
P.S. Another, more correct way to specify a dummy objective in
cplex lp format is the following:
Do someone know how can I stop the solver when it found the first feasible
solution? I´m using the LPX_K_TMLIM parameter, but sometimes it finishes
before it found a solution.
An easiest way is specifying a dummy objective function. This makes
any feasible solution to be optimal.
I am using glpk to solve scheduling problem. I encountered a simple
problem but couldn't figure out why is that.
The error message I got is 'lpx_load_matrix: ja[55] = 7; column index
out of range
Does this mean I cannot have fewer structural variables than variables
in the raw constrains.
once it will have left the basis.
3. Construct a valid basis using lpx_adv_basis or a similar routine.
(This is a bad idea in case of re-optimization.)
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman
instances can be solved by the
mip presolver (--intopt in glpsol 4.9).
Andrew Makhorin
/* SUDOKU, Number Placement Puzzle */
/* Written in GNU MathProg by Andrew Makhorin [EMAIL PROTECTED] */
/* Sudoku, also known as Number
Are there equivalent ways to code AMPL prev/last/next/ord functions
in GLPK?
prev/last/next require some linear ordering of the set. Formally,
a linear ordering is the mapping S - {1,2,...,n}, where n is the
cardinality of S. So, to describe some ordering it is sufficient to
assign a distinct
I have a set like in the picture
http://www.nabble.com/user-images/2538.jpg
and I want to consider it in the constraint as
http://www.nabble.com/user-images/2540.jpg
For this I have written as
s.t. cons_N2 {j in M}: sum {k in K, i in N: (j,p) in J [i,k]} x [i,j,p] =
1;
programming.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
if I write s.t. equa_cons1 {i in N}: b[i] = - log (1-h[i])
isn't it a legal expression?
If h is a parameter, the expression is valid, otherwise not.
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
Interesting to note that in many cases (even in the cases when the
puzzle is classified as very hard) the lp relaxation is yet integer
feasible and therefore branching is not needed, though Sudoku is
proven to be np-hard. Moreover, many instances can be solved by the
mip presolver (--intopt
Is there any interaction between presolve and restarting with the dual?
I set the presolve on before the first call to the simplex method.
The presolver must be disabled before re-optimization. If it is
enabled, the current basis is ignored that makes re-optimizaton
impossible.
However I would want to decrease the
value ( say from 200 to 10 ) of the standard output frequency. Is
there any way to set this parameter through glpsol command line?
There is not such command-line option. You may either insert the
corresponding call in glpsol code or modify the default
I would like to thank you for your great lp solver tool which is heavily
used by our analysis software.
Thank you for your interest in glpk.
Unfortunately we encountered major memory problems when first using the
glpk API naively.
The only way to avoid these memory problems was to call the
Could you help how to compile my program by gcc in 64bit mode? Because
my current problem is the parameter ne for lpx_load_matrix exceeds the
size of 32 bit int. I have to use long int to represent ne. Then,
lpx_load_matrix will have a warning of none comparative parameter.
Do you mean that
specialized methods like network simplex
(it is not implemented in glpk) or a version of out-of-kilter
algorithm, because they would obtain the solution much faster.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman
, it is a lack of the implementation.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
I am using GLPK JNI for my problem. For the small instances it's ok
since the solver doesn't take much time to solve. But sometimes
when the instances are large GLPK takes few minutes to solve the
instance. Now what if the user wants to interrupt the solver and
not continue the solution
Thanks for your quick response but unfortunately this solution
doesn't apply in this case. I want to let the user decide whether
he wants to interrupt/cancel the solution process or not, and when.
To be precise in the GUI I want to provide the cancel button once
the solution is in
is implemented.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
, just to read ampl
models; see http://en.wikipedia.org/wiki/COIN-OR_SYMPHONY ).
If you need to get access to the translator database, this is also
possible (see file glpmpl.h). However, all essential information can
be obtained by api routines.
Andrew Makhorin
pointers.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
How can I to disable the run-time reporting? Any
ideas/suggestions would be very helpful!
Use the routines lib_set_print_hook and lib_set_fault_hook; for details
see comments to these routines in file src/glplib2.c.
___
Help-glpk mailing list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
GLPK 4.10 -- Release Information
Release date: May 11, 2006
GLPK (GNU Linear Programming Kit) is intended for solving large-scale
linear programming (LP), mixed integer linear programming (MIP), and
other related
, glpsol will
not call the mathprog postsolver.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
I am a newbie in glpk. I followed previous instructions in this
mailing list how to link glpk with bc5. The instructions were very
short and I had still the same problem. I had to convert libglpk
file with the help of coff2omf.exe but I could not find coff2omf.exe
in the bcc directory. Even
the glpk static library 'glpk.a' in 'Project Options/
Parameters/Linker' using the button 'Add Library or Object'.
Then all will work.
I successfully compiled glpk 4.10 with Dev-C++ 4.9.9.2; so if you need
the library 'glpk.a', I can post it to you.
Andrew Makhorin
that allows the solver performing re-optimization.
In particular, glpk bb solver uses such feature.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
. Are there any options I
can use to speed up the execution? Would moving up to 4.10 help much?
Try to run your model with glpsol 4.10 specifying the option '--cuts'.
(Could you please post your model to me in mps format?)
Andrew Makhorin
___
Help-glpk mailing
To my understandig the solve-Statement in the model has no effect.
The solve statement plays role of a semantic delimiter. Below it all
variables are assigned particular values and therefore may be used in
the same way as parameters.
___
Help-glpk
I'm in trouble with set in a problem in the glpk datastructure and I
can't find answers to my questions (perhaps I looked at the wrong
places).
The two main problems:
1. How can I set a variable to the right hand side?
If I have a constraint like this: x1+x2 = y1 I can't set:
and rereading the problem.
The error appears due to huge constraint coefficients. You can call
lpx_scale_prob to scale the problem (as glpsol does).
To obtain the solution with glpsol you need to disable the lp presolver
(--nopresol), because it cannot recover non-optimal solutions.
Andrew
I'd like to cite MathProg reference manual. How can i make BibTex entry?
There is no bibtex entry. If you need to refer to glpk, you can use the
following reference:
GNU Linear Programming Kit, Version X.Y,
http://www.gnu.org/software/glpk/glpk.html
I have 2 queries that I need help on.
1. printf, I can't seem to be able to use printf without an error
popping up saying that the quote(single or double) is not allowed.
Has anyone else ever come across this?
Why not? If the string contains a single quote, you need to enclose it
with double
Since I use VC6 through the school server, I guess that's why I cannot
run
Build GLPK with Visual C++ 6.0.bat. The following is the message I
got when I
run .bat. Can anybody send glpk.lib compared for VC6 to me? Thanks!
You should specify the correct path to MSVC directory (see the
I noticed the following args at the top of the tspsol app and couldn't
find what they mean in the docs:
For more details about tsplib and its format see:
http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/
___
Help-glpk mailing list
i have time sets below,
set W; #week
set D; #day
set H; #hour
and a binary decision variable.
var delta{w in W, d in D, h in H},binary;
My question is that;
if delta[w.d,h] = 0 for a specific hour, it has to be equal to zero for the
following 23 hours too.
That is if delta is
Also I'd like to mention OR-Library by J.E.Beasley which include
a lot of instances in different areas of OR/MS:
http://people.brunel.ac.uk/~mastjjb/jeb/info.html
Though all the instances are in plain text format, they can be
easily converted, say, to cplex lp format or to MathProg models.
there is another way, but I haven't found it.
Thank anybody in advance for any help.
Please see attachment to the message:
http://lists.gnu.org/archive/html/help-glpk/2003-08/msg00023.html
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http
I installed glpk using apt-get in Ubuntu. I then downloaded the source.
I'm currently trying to build glpsol.c to ensure that everything is set
up properly in my environment, but I am getting the following output
when I run gcc glpsol.c -lgpk
[EMAIL PROTECTED] gcc glpsol.c -lglpk
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
GLPK 4.12 -- Release Information
Release date: November 08, 2006
GLPK (GNU Linear Programming Kit) is intended for solving large-scale
linear programming (LP), mixed integer linear programming (MIP), and
other
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
To fix the '-lm' bug in glpk 4.12 just replace the original files
'configure.in' and 'configure' in the glpk distribution by the patched
ones included in the attachment. Then configure and compile the package
in usual way.
-BEGIN PGP
Can I use this GMP library, to increase the speed, on Windows?
Good question, because I am very interested in that too.
Looks like (however, I am not sure) it can be compiled only with gcc,
besides, many gmp routines are written in the GNU assembly language,
so the only way to use it with
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
GLPK 4.13 -- Release Information
Release date: November 13, 2006
GLPK (GNU Linear Programming Kit) is intended for solving large-scale
linear programming (LP), mixed integer linear programming (MIP), and
other
I simply replaced the lpx_simplex routine to lpx_exact on my program
but the system freezes, when it tried to resolve PL's. There is some
setup to do, before?
Nothing to do before is needed. Lpx_exact is much slower than the
floating-point solver due to huge rational numbers which may appear
In my optimization work, I almost always use the
API of a solver instead of a modeling language.
The reason is that I usually want to solve another
problem related to the first and its solution.
Absent a reliable mechanism for converting variable
names to variable indices this can be
The GNU Linear Programming Kit, Part 1: Introduction to linear
optimization
http://www-128.ibm.com/developerworks/linux/library/l-glpk1/
The GNU Linear Programming Kit is a powerful, proven tool for solving
numeric problems with multiple constraints. This article introduces
GLPK, the glpsol
This was a relatively smaller instance. When I perform the same
thing on a bigger instance ( problem file attached), using --intopt,
it takes quite a long time. Could you suggest any other enhancements
in the way I can run it to furthur optimize it ?
Your instance is hard for glpk due to its
I am trying to formulate a transportation problem (with intermediate
storage warehousing) where some of the parameters such as demand and unit
costs vary day-to-day over a 365-day period. Google doesn't provide any
help, looking for time-dependent example problems in mps format, and I don't
I have a 0-1 MIP formulation of a scheduling problem. I employ the
GLPK
C API to represent my problem and use two function calls in the end
to
generate two input files in the CPLEX LP and fixed MPS format
respectively
for the same problem.
The calls I use are :
I have 2 questions about LP with glpk.
1) How to deal with problems with constraint boundary disturbance quickly.
For example, originally I have L_ix_iU_i (i=1,...n), when I get the answer
of x, how can I get another answer with glpk quickly to
L_i-ex_iU_i+e,where e is a number(such as 0.2 or
I think you should switch to the dual simplex method before
re-optimization.
Perfectly correct, because if the current basis is optimal, changing
bounds of variables leads to the dual feasibile basis. To enable the
dual simplex method one needs to set the control paramater LPX_K_DUAL.
Hello,
I'm extremely new to using the GLPK and I'm having a bit of trouble
modeling a problem. I don't know if this list accepts attachments,
but a pdf containing the Linear Program that I am attempting to model
is attached to this message. Any help/hints/pointers etc. would be
I would like to know if GLPK is thread-safe or not. It seems it's using
a global pointer (in the glplib1a.c file) variable quite intensively,
thus I imagine GLPK is not thread-safe. I have not investigated very
much in the code of GLPK, so maybe I have missed a crucial point about
this
What I need is indeed reentrability : what I want to do is solve
different subproblems of the same problem in parallel, so each LPX is
local to one thread only.
This must work.
I think it should be possible to implement an GNU/Linux equivalent
for your TLS-based routines, using the
I am trying to run the GLPK solver from Matlab, by calling the
function glpkmex from within my Matlab script.
I am trying to do this on a Linux machine, where I have Matlab
properly installed. I managed to install GLPK, and run ./configure
properly.
However, I'm not sure how the directory
CheminOptique.mod:26: integrand following max{...} has invalid type
Context: ...; var lambdaM = max { i in I , j in I } lambdaIJ [ i , j
] ;
Model processing error
I wanted to have the maximun of lamdba[i,j]
You want too much :) All constraints must be linear. You can try
reformulating
to
do that.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk
Due to a hardware failure on fencepost.gnu.org I cannot receive
e-mail posted to me on [EMAIL PROTECTED] since December 19, 2006 at least
until January, 2007.
If you need to reach me, please send your messages to
[EMAIL PROTECTED].
Andrew Makhorin
I used glpsol to solve the linear relaxed version of a MIP problem ( all
variables in my problem are 0 or 1) and output the solution using -o
flag. What I want is to get all those variables which have been set to
either 0 or 1 as a part of the solution and do not have a fractional
value.
Thinkpad
running RHEL 4
Please write the problem data to a text file, say, in mps or cplex
format (lpx_write_mps, lpx_write_cpxlp) and post it to me.
Andrew Makhorin
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help
I've found that GLPK is unable to read some .mps files that can be
read by
other software. see
http://www.sce.carleton.ca/faculty/chinneck/MPSreader/MPSobject.html
I've attached 2 of these files since they seem to cause different
errors
when GLPK reads them.
The error for 22433.mps
I'm getting the following error message form TSPSOL
keyword 'EDGE_DATA_FORMAT' not recognized
TSP file processing error
Is this feature not supported?
It is not supported, i.e. it is assumed that the graph is complete.
If your instance has small size (up to 20-30 vertices), you can try
is there a way to use lazy constraints with GLPK? Say, I solve an
integer program and find a suitable solution for a given set of
constraints. Then I want to check this solution against another set
of additional lazy constraints (lazy in the sense that they are not
part of the original
1 - 100 of 1851 matches
Mail list logo