On Fri, 29 Jan 2010, Pavel Klinov wrote:
I wonder if glpk can provide me with several optimal solutions for a
0-1 IP instance (seems not, but I thought I'd ask). I assume I could
use glpk as an oracle that only returns one solution and simply search
around (as suggested in, e.g., [1]), but a mor
On Mon, 1 Feb 2010, Pavel Klinov wrote:
Andrew, Michael, thanks a lot for the replies.
Andrew, this is roughly what I meant by "searching around". The only
difference is that I also modify the objective function to maximize
diversity and add another constraint to make sure that all subsequent
s
On Thu, 4 Feb 2010, Pavel Klinov wrote:
If B&C search gets interrupted due to time-out and but then is run
again, does it start from scratch or is it able to continue from where
it stopped? Is there a way for it to store all the internal data
structures and continue?
Basically I want GLPK MIP s
On Thu, 11 Feb 2010, Ariel Daliot wrote:
Thanks for the reply.
The trick of using an auxiliary binary variable z:
5 * z <= x <= 10 * z
to make x become semi-continuous 5<=x<=10 or x=0, effectively turns a
continuous problem into a mixed integer problem with all its woes.
Any idea how to circum
On Mon, 5 Apr 2010, hncp wrote:
In my previous post I have been wrong in identifying the constraint. What I
actually need is something like XOR operator, not AND operator, i.e. z[i] =
p[i] xor p[i+1]
There are 8 elements of {0, 1}**3.
In this case, 4 of them need to be eliminated.
Just add 4 c
On Tue, 13 Apr 2010, Hammond, Paul wrote:
I #8217;d like to know if GLPK (the C lib) is not thread
safe? If not, are there any plans to ever make it thread safe? We get
occasional core dumps in a multi-threaded environment which we think are
related to thread safety as we get a SIGSEGV inside GL
On Wed, 14 Apr 2010, Hammond, Paul wrote:
I'm thinking since it is written in C, and C is source compatible with C++,
since C++ does support locking in threads, if one was to treat it as a C++ app
written mostly in C, it may be possible to multi-thread it without a huge
rewrite?
C++ doesn't
On Wed, 14 Apr 2010, Hammond, Paul wrote:
So I guess I just don't mean thread safe, I mean thread hot, as in I can have
multiple GLPK computations going in separate threads simultaneously which don't
need to synchronize on anything or if they do, it's for a very small part of
the computation
On Fri, 23 Apr 2010, Louis Wasserman wrote:
After several from-scratch attempts, I get the following (probably simple)
error from make LIBS=-lpthread: make[2]: Entering directory
`/home/lowasser/glpk-4.43/examples #39;
/bin/bash ../libtool --tag=CC --mode=link gcc -g -O2
On Mon, 26 Apr 2010, Lifit wrote:
Excellent suggestion.
I followed your advice, translated into LP, and got scip to solve my
problem (with no extra settings) in less than 20min.
I also tried writing out to MPS (both wmps and freemps), but for some
reason scip produced incorrect results.
My re
On Fri, 25 Jun 2010, glpk xypron wrote:
see the example below.
if w[s] = 0 then inc[s] = 0 else inc[s] = 1
Your "if" is modelled as
s.t. indicator{s in S} :
w[s] <= M * inc[s];
M should be chosen as small as is possible without restricting
the solution.
Possibly better:
w[s] <= M[s] * i
On Wed, 21 Jul 2010, Serveh Shalmashi wrote:
I am using GLPK under octave interface for a mixed integer programming
problem, however when running the solver I am facing the following error:
Assertion failed: a != a
The implication is that a is a NaN (not a number).
Somewhere a divison by 0,
On Wed, 21 Jul 2010, Silly Me wrote:
On Wed, 21 Jul 2010, Serveh Shalmashi wrote:
I am using GLPK under octave interface for a mixed integer programming
problem, however when running the solver I am facing the following error:
Assertion failed: a != a
The implication is that a is a NaN (no
On Mon, 30 Aug 2010, xiaomi wrote:
Is there a totural for how to call GLPK in my own C/C++ programming?
There is example code.
And there is a more serious problem: I saw GLPK uses many memories when
it runs longer. If my own C/C++ programming uses almost all the memories
like open a huge mat
On Wed, 1 Sep 2010, xiaomi wrote:
I am considering to use the property that the result of GLPK is
non-negative to simulate step function as follows:
for example: step function y=u(5);
minimize y
y<=M(x-5) , where M is a large number to simulate sharp slope.
y<=1;
It seems to imply that when y<=
On Wed, 1 Sep 2010, xiaomi wrote:
Thanks, Michael. I am sorry there are several typo in my original statement.
Let me recify it as follows:
for example: step function y=u(5);
maxmize y
y<=M(x-5) , where M is a large number to simulate sharp slope.
y<=1;
The only wired thing is that when x<5, y
On Thu, 9 Sep 2010, JoaoFlavio wrote:
I'm trying to run a .bat file from VBA.
It runs with any application, but not with glpsol.
The code is below:
Sub Run_Glpk()
Dim Address As String
Dim Comando As Variant
Commando
Dim Result As Variant
Address = "C:\Solver\SNP_48\"
Comand
On Sun, 26 Sep 2010, Carlos Herrera wrote:
with 4.13 version). In spite of the not very related subject, my question
is, does somebody knows a "free solver" to solve a non-linear constrained
problem or some method to linearize the product between integer and binary
variables?. My model has one v
On Wed, 10 Nov 2010, Suleyman Demirel wrote:
Usually, if you have an either/or constraint, you should define a binary
variable, say y, taking only 0-1 value. If y=0, the sum is less than zero,
if y=1, the sum is greater than two.
Let M be a very large number (M=1000).Then, you should ha
On Thu, 18 Nov 2010, pradeep wrote:
one stupid way may be is
a+x=b+y
u<=x
M*u>=x
v<=y
M*v>=y
u+v<=1
c=a+(b-a)v
u,v binary
x,y integer >=0
M - large integer
Too complicated, too many integer variables and too big an M.
The following constraints are valid and should be in any method:
c<=a
c<=b
On Wed, 19 Jan 2011, Andrew Makhorin wrote:
Forwarded Message
From: chtimax
To: Help-glpk@gnu.org
Subject: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java
Date: Wed, 19 Jan 2011 05:48:23 -0800 (PST)
Hello Robie and All,
Accept my apologies for the confusion in
On Thu, 27 Jan 2011, Marco Giuntoli wrote:
I have a question to ask: In my problem I am analyzing different scenarios
(independent of each other) and each one must make a MIP optimization. Using
OpenMP directives can not go to every single thread on each scenario because
I glpk return number o
On Fri, 18 Feb 2011, Xypron wrote:
In the appendix the shiftcover model is changed to only use binary variables.
This makes excluding possible solutions much easier.
The idea for the conversion is replacing integer variables (crew[s]) by sums
of powers of two times binary variables (sum{i in
On Mon, 21 Feb 2011, glpk xypron wrote:
Hello Michael,
If all variables and constraint coefficients are integer,
a single constraint on the nonbasic variables will exclude the
current solution without excluding any other integer solutions.
How do you define "nonbasic variable" in a MIP soluti
On Thu, 24 Feb 2011, GLENN RHOADS wrote:
A: min|aij| = 4.000e-01 max|aij| = 2.800e+00 ratio = 7.000e+00
Problem data seem to be well scaled
Thanks. That solves the excessive output problem.
Any suggestions on which scaling method might be preferred for my
application? I think what is h
On Mon, 28 Mar 2011, Andrew Makhorin wrote:
Suppose I solve a linear programming problem with the simplex
algorithm, then change a row of coefficients. I then change the
previously found optimal basis slightly or not at all (by one or zero
variables -- both cases are relevant here) so that the n
On Thu, 7 Apr 2011, Yaron Kretchmer wrote:
The problem is a stock hedging problem, with one of the component of a
correct hedge being that the strike price of the option is >= the value of
the stock.
The enclosde model should have no solution, since I'm fixing the variable
such that the price of
On Mon, 11 Apr 2011, Klas Markström wrote:
I think that Jeff had approximately the right idea.
In the callback to check possible integer feasible solutions
test whether it is actaully fesible.
If so, add it to your list, add a constraint and declare it infeasible.
If not, proceeed as usual.
At th
On Fri, 15 Apr 2011, Andrew Makhorin wrote:
Currently the objective granularity check is disabled because of the new
mip preprocessor, which is still incomplete. Sorry.
If you know that your objective is integer, you may specify an
appropriate mip gap as Marcelo suggested (say, 0.06 for your ex
On Wed, 25 May 2011, Paolo Rossi wrote:
1) How can I linearise a constraint of the type –
x1 <= x2*bx1
where bx1 is binary and x2 is a positive real which arises as a result of a
linearisation through using SOS2 and x1 is a positive real decision
variable
x1 <= x2 if bx1==1
x1 <= 0 i
On Wed, 25 May 2011, Terry wrote:
I guess the answer is no:
http://en.wikibooks.org/wiki/GLPK/Modeling_tips#All_optimal_solutions
That's disappointing. The suggestion is to add a constraint to make the optimal
solution infeasible and run it again. I'm afraid that is too inefficient for my
ap
On Thu, 26 May 2011, Lou Hafer wrote:
If you don't already know the optimal objective, the problem becomes
one of collecting solutions and regularly purging the collection as
better solutions are discovered. Back in the solver, the run time mounts
because you cannot do effective pruning
On Thu, 26 May 2011, Terry wrote:
More specifically I want what this would give me:
Repeat X times:
1. Run the solver to get an optimum solution.
2. Add a constraint to make the last found optimal solution infeasible.
3. Go to step 1.
These are "the top X solutions" that I want. X could be bet
On Sun, 5 Jun 2011, Nick Farrell wrote:
I'm pretty new to linear programming and would like a quick tip.
In the script below, what I *want* to happen is that I first choose the
worst (ie: max) of x[p] and 3, and then solve for the minimum sum of these
values.
z[j]>=x[j]
z[j]>=3
ie: I would
[j] (1-b[j])
where the b's are new binary variables and the
M's and N's are new, possibly large, constants.
Selecting their values is left as an exercise for the reader.
On Mon, Jun 6, 2011 at 11:24 AM, Michael Hennebry <
henne...@web.cs.ndsu.nodak.edu> wrote:
On Sun, 5 Ju
On Tue, 7 Jun 2011, malekro wrote:
i am trying to calculate 2^x from a variable x. i already spent several
hours and with the help of archived posts i thought i have the solution.
unfortunately i cannot figure out why the code below returns an empty result
or malforms the x variable, i think the
On Thu, 16 Jun 2011, Andrew Makhorin wrote:
Forwarded Message
From: Paul Chavent
To: glpk xypron
Cc: Andrew Makhorin , help-glpk@gnu.org
Subject: Re: [Help-glpk] [Fwd: Find nearest point]
Date: Wed, 15 Jun 2011 22:17:03 +0200
It works with a smallest value !
In the wikibo
On Thu, 16 Jun 2011, Andrew Makhorin wrote:
Forwarded Message
From: Lounes BENTAHA
To: help-glpk@gnu.org
Subject: Help
Date: Thu, 16 Jun 2011 11:36:20 +0200
I'm user of GLPK as a C library, i find it more handy, practical and
What i can't or i don't know how doing it is
On Sun, 19 Jun 2011, Sarad AV wrote:
How do we solve Integer Linear Programming formulations of the Travelling
Salesman Problem as in this URL
http://support.sas.com/documentation/cdl/en/ormpug/63352/HTML/default/viewer.htm#ormpug_milpsolver_sect020.htm
where there is a multiplication operator
On Wed, 6 Jul 2011, Andrew Makhorin wrote:
Note that the very first row of N type is also used as the objective
function row (i.e. its coefficients are duplicated and stored
separately), so you can remove that row from the problem object with
glp_del_rows to restore the numbering, which you expe
On Fri, 8 Jul 2011, Akhil langer wrote:
Andrew,
Thanks, Andrew. The NaN problem has been resolved. However, I keep getting
the following warning:
Warning: numerical instability (primal simplex, phase I)
Please note that I have been using INT_MAX as the upper bound for some
columns. Could that
On Fri, 8 Jul 2011, Akhil langer wrote:
Michael, Andrew
I changed the code and all the variables now have fixed upper bound ( 1000
units). But I am still getting the Numerical instability warnings. In my
program, the size of the model increases in each solve. Is the instability
because of the i
On Mon, 11 Jul 2011, Akhil langer wrote:
@Robbie: The problem was very badly scaled (according to the definition
given in the wiki). I used glp_scale_prob() but the warnings persist. In the
program, the model gets modified with addition and deletion of rows between
optimizations. Can I expect th
On Tue, 12 Jul 2011, Meketon, Marc wrote:
I thought that the three different basis factorization methods that Andrew
developed were meant to improve numerical stability (at the cost of speed).
Has anyone tried these?
Using "glpsol" the options are (this comes from the glpsol --help usage
st
On Thu, 14 Jul 2011, Yuri wrote:
It is often very advantageous to be able to know the number of solutions, or
enumerate them instead of getting only one optimal solution as glpk does now.
Is such feature planned in GLPK?
It's not planned in anything.
'Tis a rather big job.
--
Michael henn
On Sat, 16 Jul 2011, Yuri wrote:
I know about this method, but unfortunately it always requires GLPK to solve
the problem again not reusing the results of the previous computation(s).
I suspect that the best you can do is to lie to the feasibility checker
and keep your own set of books.
That w
On Sun, 17 Jul 2011, Yuri wrote:
On 07/16/2011 11:16, Michael Hennebry wrote:
I suspect that the best you can do is to lie to the feasibility checker
and keep your own set of books.
That will require generating all solutions.
Do you refer to some callback that feasibility checker calls or
On Thu, 11 Aug 2011, Vinay Kolar wrote:
I have a set of linear constraints. I am interested in finding the
feasible region and not the optimal value. Is there a way to get the
feasible region in glpk?
The constraint set already describes the feasible region.
What more do you want?
--
Michael
On Tue, 18 Oct 2011, Robbie Morrison wrote:
That said, it is better programming practice to use the
macros and not their definitions. There is no
guarantee that these definitions will remain unchanged.
Perhaps he is printing them out in decimal and
wants to know the significance of the number
On Tue, 18 Oct 2011, Andrew Makhorin wrote:
Yes when I print status I got numbers but I would like to have OPT ...
switch (glp_get_status(lp))
{ case GLP_OPT:
s = "OPTIMAL";
break;
case GLP_INFEAS:
case GLP_NOFEAS:
s = "INFEASIBLE";
break;
. . .
}
number_to_name.h
On Tue, 18 Oct 2011, Andrew Makhorin wrote:
the normal way to solve small traveling salesman problems is:
Solve the LP problem without subtour constraints.
Identify subtours.
Add subtour constraints.
Resolve the LP
Repeat the last two steps until no new subtour arises.
With this algorithm, on
On Wed, 19 Oct 2011, Kasper Tordrup wrote:
s.t. phase{u in U, j in 1..3}: sum{s in S} ((ps[s] * y[s,j,u]) / o[s,u]) =
d[j,u];
But since division with o[s,u] is not linear I can't do that.
So can anyone explain how one could make the constraint linear?
set S;
set U;
param ps {s in S}, integer,
On Fri, 21 Oct 2011, Kasper Tordrup wrote:
Thx for the answers guys.
They helped a lot.
And yes, there is an error. o should be > 0 but for some reason if I change
that, GLPK says "strict bound not allowed"?
o is in the range 1..3
C is expected to be in 1..10 plus/minus
S could be as large as 2
On Thu, 3 Nov 2011, cas...@istar.ca wrote:
With Linear Programming you get fractional answers; UNLESS the coefficient
matrix is totally unimodular and the b vector has all integer components.
That is certainly sufficient, but it is not necessary.
min y
st
2x + 3y >= 5
-2x + 3y >= 1
No tot
On Sun, 27 Nov 2011, Andrew Makhorin wrote:
Forwarded Message
From: jjqcat jjqcat
To: help-glpk@gnu.org
Subject: help
Date: Sat, 26 Nov 2011 23:07:23 +0800
Hi, I'm interested in GLPK and want to use it to solve my problem that is
fitness: a set of integer order
70.8
On Fri, 16 Dec 2011, Xypron wrote:
users of GLPK have had often had problems with the accuracy of big M
formulations.
The trick to using big M is to do the math
to get the smallest Ms that will work.
In CPLEX big M formulations can be replaced by indicator constraints.
This is a constraint s
On Wed, 28 Dec 2011, Ruben Proano wrote:
I have been using GLPK as an API to solve a MIP problem coded in C++. The
model and glpk work well, but when the branch and cut tree is too large and
it exceeds the memory I allocated in the callback function, the program
halts. How can I change the call
On Tue, 24 Jan 2012, Raketenschnitzel wrote:
The specialty about this is the easy form of the constraint: one column its
always the same number. Like that:
power1 power2 power3
january c1 c2 c3
februaryc1 c2
On Tue, 7 Feb 2012, Philipp Bachmann wrote:
I have a MathProg model on the one hand and want to supply its input
not using glp_mpl_read_data(), but programmatically on the other hand.
Also I want to fetch the results after calling the solver not via a
file, but programmatically.
From Andrew's
On Wed, 8 Feb 2012, Harley wrote:
I think Robbie's comments were in response to the 'more reliable' part of
your email. Robbie has worked very hard on the wikibook for GLPK and it is an
excellent reference and it is not wikipedia as it has been created by the
GLPK users but also has not been f
On Thu, 23 Feb 2012, Joey Rios wrote:
Oh, I'm the author of dwsolver. My interest is in doing some computational
tests on 'real' problems. Turns out it's hard (in the NP sense, I think) to
decompose a given LP instance into the correct form for DW decomposition. It's
much easier to generat
On Tue, 3 Apr 2012, John Perry wrote:
From a previous conversation, I understand that setting upper bounds for
integer solutions helps the mip preprocessor find feasible solutions for
minimization problems that have no maximum. I can make this work with the
systems I'm solving right now, but
On Wed, 4 Apr 2012, John Perry wrote:
Michael Hennebry wrote on Wednesday, April 04, 2012,
On Tue, 3 Apr 2012, John Perry wrote:
From a previous conversation, I understand that setting upper bounds for
integer solutions helps the mip preprocessor find feasible solutions
for minimization
On Tue, 10 Apr 2012, Psalm Niranjan wrote:
When I try to compile a C program using glpk functions, I get the the
following error at the linker. I've checked the include path and it
contains glpk.h and the lib contains libglpk. I'm compiling on a 64-bit
machine running ubuntu 11.10
/tmp/ccPR8ZKY
On Tue, 10 Apr 2012, Andrew Makhorin wrote:
Probably you forgot to specify the glpk object library for the
linker,
i.e. 'gcc ... -lglpk ...' .
I've a #include and i'm compiling with -lglpk
This error is not related to glpk; it is a linker error meaning that
the glpk object library is not
On Fri, 13 Apr 2012, Andreas F wrote:
For a team of 17 kids I am assigned to split the group into 2 teams for each
match. Lets say there are 20 matches in a season. The objective is to divide
the group such that each kid spend equally many matches together with any other
kid (i.e. no two ki
On Fri, 13 Apr 2012, glpk xypron wrote:
Hello Andrew,
for assigment problems where the objective can only be integer the lower bound
of each node in the search tree can always be rounded to the next lower/higher
integer (depending on optimization direction).
Probably automatic identification
On Fri, 27 Apr 2012, Kasper Tordrup wrote:
I have a problem with calculating a fraction, the reason is that both the
nominator and denominator are variables.
So I am looking for some way to make this linear:
x_suj = p_s * (y_suj/w_su) or well just find what this fraction is:
y_suj/w_su
where p_s
On Fri, 27 Apr 2012, glpk xypron wrote:
# Solve
# x = p * y / w
# where x, y, w are natural numbers and
# p = 11 / 17
# x in [23, 100]
# y in [10, 200]
# w in [3, 7]
param eps := 1E-5;
param M := 1000;
param w_min := 3;
param w_max := 7;
param p := 11 / 17;
set I := {w_min..w_max};
var w{I}
On Sat, 28 Apr 2012, Andrew Makhorin wrote:
I have a problem with calculating a fraction, the reason is that both
the nominator and denominator are variables.
So I am looking for some way to make this linear:
x_suj = p_s * (y_suj/w_su) or well just find what this fraction
is: y_suj/w_su
where
Divisiblilty can be used to reduce the problem somewhat.
On Fri, 27 Apr 2012, Michael Hennebry wrote:
# Solve
# x = p * y / w
# w * pd * x = pn * y
# where x, y, w are natural numbers and
# p = 11 / 17
# pn = 11
# pd = 17
# x in [23, 100]
# y in [10, 200]
# w in [3, 7]
# Since pn/pd is in
On Wed, 2 May 2012, Kasper Tordrup wrote:
After looking over Xypron's example, it became clear to me that you lack
some information, sorry for that.
The x represent a percentage of p that I need, and this means that y is <=
to w.
So summing up:
x will always be <= to p.
y will always be <= to w.
On Wed, 2 May 2012, Kasper Tordrup wrote:
So, as an example p=1000, y=1 and w=3 and so I want to find x=333.
Does this make it a bit more clear?
Yes.
w and y are arrays of non-negative integer variables.
p is a vector of positive integers.
x is an array of continous variables.
If w_su is
On Fri, 4 May 2012, Andrew Makhorin wrote:
Since the conversion from mathematical formulation to constraints is
systematic , could this be added to marhprog?
No, it is not. There exist infinitely many mip descriptions of the same
integer set. Even z = x OR y can be formulated in infinitely
On Sat, 5 May 2012, Andrew Makhorin wrote:
3. Yet another description (as pointed out by Erwin and Michael)
z >= x
z >= y
z <= x+y
It is a good description, because all inequalities are facet-defined
(until the mip instance includes other constraints).
Together with z<=1, it is *
On Tue, 22 May 2012, spiritfire wrote:
By doing some researches I found out that my code is doing fine but the
problem is hard to solve.
I would like to fasten the solver by reducing the precision from 9 to 7
digits. Is it possible ? Or by reducing the number of iterations but I do
not know how
On Tue, 22 May 2012, spiritfire wrote:
What about increasing the error? I don't really care about having the optimal
solution, I do not need such a precision.
How can I change it ? Because if I stop it before it finds the optimal
solution, than I get no results I whish to be able to view a s
On Thu, 24 May 2012, esma mehiaoui wrote:
Could somebody tell me how to express the following condition in a linear
constraint ?
if A = 1 and B = 1 then C = 1
if A = 1 and B = 0 then C = 0
if A = 0 and B = 1 then C = 0
if A = 0 and B = 0 then C = 0
Ps: just for precision it is not a logic
On Tue, 29 May 2012, Andrew Makhorin wrote:
How to express |A-B|>=C for glpsol ?
A,B and C are a boolean variables
One way is to evaluate the truth table and then use CNF description.
See http://lists.gnu.org/archive/html/help-glpk/2012-05/msg00013.html
for more details.
The referenced
On Tue, 29 May 2012, esma mehiaoui wrote:
Is it possible to expresse the following condition ?
if A+B = C+D = 1 then R = 1
else R=0
R is boolean.
If the others are also boolean, then there are six minimal CNF clauses.
--
Michael henne...@web.cs.ndsu.nodak.edu
"On Monday, I'm gonna have to
On Tue, 26 Jun 2012, Daniele Micarelli wrote:
I have to solve a linear programming problem with the language and I'm
planning mathprog
I have difficulty writing the following constraint: ΣΣ r (i) * x (i, t) <= R
where the first summation is true for all belonging to the W and the second
summatio
On Fri, 29 Jun 2012, Andrew Makhorin wrote:
When this is solved (with --exact --noscale), glpsol tells me "INTEGER
OPTIMAL SOLUTION FOUND" and the variable assignments in the solution are
as follows:
No.Column name Activity Lower bound Upper bound
--
On Mon, 30 Jul 2012, Xypron wrote:
* The routine ios_relative_gap computes the relative mip gap using the
* formula:
*
* gap = |best_mip - best_bnd| / (|best_mip| + DBL_EPSILON)
Beware: The mip gap may rise while you solution gets better:
Ouch. Not a good formula.
Integer optimizat
On Wed, 1 Aug 2012, Andrew Makhorin wrote:
* The routine ios_relative_gap computes the relative mip gap using the
* formula:
*
* gap = |best_mip - best_bnd| / (|best_mip| + DBL_EPSILON)
Beware: The mip gap may rise while you solution gets better:
Ouch. Not a good formula.
This form
On Fri, 17 Aug 2012, Mate Hegyhati wrote:
Hi Zvonko,
maybe something like this?
R >= 0
R <= P - PMIN*X
R <= PMAX*X - P
This fails for X=0.
R >= 0
PMAX >= P >= 0 // might be redundant
if X==1 P >= PMIN// might be redundant
if X==1 R <= P - PMIN
if X==1 R <= PMAX - P
if X==0 P <= 0
i
On Fri, 24 Aug 2012, Mate Hegyhati wrote:
For the aforementioned case the simplest solution is probably this:
u = pos - neg;
pos <= M * x;
neg <= M * (1-x);
where M is bigger than the maximum of |u|
in this case, at most one of pos or neg is positive. If neg (u<0), then
x must be 0, if it is
On Fri, 21 Sep 2012, glpk xypron wrote:
for branching down on the most fractional variable you could use:
I've read that that is not a particularly good criterion.
That said, better criteria make more complex examples.
--
Michael henne...@web.cs.ndsu.nodak.edu
"On Monday, I'm gonna have to
On Sun, 21 Oct 2012, Meketon, Marc wrote:
Xypron used "M" as a large constant (e.g., ). Not as a binary variable.
param M := ;
var B{J,K} >= 0;
s.t. a{j in J}: -M*sum{k in K}B[j,k] <= A[j] <= M*sum{k in K}B[j,k];
Simply picking a large value for one's big M is a bad idea.
One
On Sun, 21 Oct 2012, Meketon, Marc wrote:
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Reginald Beardsley
Sent: Sunday, October 21, 2012 10:46 AM
To: glpk
Subject: [Help-glpk
On Wed, 28 Nov 2012, joel mortyn wrote:
I have a set of Periods from which I create the subset OpenPeriods when the
facility is open.
param nPeriods;set Periods, default{1.. nPeriods};param FacilityOpen{p in
Periods}, binary;set OpenPeriods:= setof{p in Periods: FacilityOpen[p] = 1}
(p);
The
On Thu, 27 Dec 2012, Patrik Dufresne wrote:
Correct me if I'm wrong: With GLPK you may solve multiple problems at the
same time using one thread for each problems. So, I don't understand why
it's important to make GLPK thread safe. As long as you are manipulating
the problem object with the same
On Fri, 18 Jan 2013, Andrew Makhorin wrote:
Forwarded Message
From: Ali Raza
To: help-glpk@gnu.org
Subject: GNU Program
Date: Tue, 15 Jan 2013 17:44:24 -0500
I have a quick question. I am trying to write a simple program in GNU
software. I am having difficities and it is givi
On Fri, 1 Feb 2013, Patrik Dufresne wrote:
I'm using GLPK 4.47 on every platform. On Linux, I did compile it from
source with default flags. For Windows, I pick the pre-compiled version
provided by winglpk project.
That might be the issue right there.
Try running both on Windows or both on Lin
On Sun, 3 Feb 2013, Martijn van Oosterhout wrote:
solution and try again. (I say 'resembles' because the TSP has a
special structure with permits other ways to avoid loops, these other
ways don't work here).
Except when I tried it didn't work, because the reason GLP_IROWGEN is
called with the
On Wed, 6 Feb 2013, Martijn van Oosterhout wrote:
On 5 February 2013 19:29, Michael Hennebry
wrote:
For the purposes of generating cycle-breaking constraints,
you can probably "round" solution to integer:
Anything >= 1-n**-2 rounds to one, everything else to 0.
n is the size o
Replace X with 11y+r .
Add constraints as appropiate.
--
Michael henne...@web.cs.ndsu.nodak.edu
"On Monday, I'm gonna have to tell my kindergarten class,
whom I teach not to run with scissors,
that my fiance ran me through with a broadsword." -- Lily
_
On Fri, 15 Mar 2013, Joey Rios wrote:
If I understand your question, you do have to find the decomposition or your LP
yourself. It can be easy if you really understand the mathematical structure
of you problem, or it can be very difficult if you are just looking at a huge
constraint matrix w
On Fri, 26 Apr 2013, Andrew Makhorin wrote:
There is a typo in the formula for computing mip gap on the page
http://en.wikibooks.org/wiki/GLPK/Terminal_output
The denominator should be |best_mip| + eps.
I'd suggest that a better denominator would be |best_mip - root_lp|
That would make the
provide a better indication
of how hard it would be to close the gap.
That said, Andrew has already expressed an unwillingness to change it.
Heinrich Schuchardt quoted Michael Hennebry:
I'd suggest that a better denominator would be |best_mip - root_lp| That
would make the formula immune to s
On Thu, 2 May 2013, Andrew Makhorin wrote:
The mip gap has the same meaning as the relative error (please see
http://en.wikipedia.org/wiki/Approximation_error ), so changing the
formula would confuse the user. A requirement to make the result
"immune ... and never greater than 100%" looks too ar
1 - 100 of 358 matches
Mail list logo