help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] problem with glp_load_matrix


From: Michael Hennebry
Subject: Re: [Help-glpk] problem with glp_load_matrix
Date: Mon, 15 Jul 2013 15:13:14 -0500 (CDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Mon, 15 Jul 2013, Hector Arciniegas wrote:

Dear friends.
I am using python with glpk (python-glpk_0.4.45-1_i386) under ubuntu 12.04 for resolve knapsack problems, this work good from 4 to 500 variables; but for 1000 variables send me the follow message: "ViolaciĆ³n de segmento (`core' generado)", after execute "glp_load_matrix(prob, 2*items, ia, ja, ar)"
Has somebody one idea about?. Thanks.

It looks like an attempt to dereference a null pointer.
That is what malloc returns if it fails.
Does glpk or python use malloc without testing the return value?
My recollection is that glpk uses xmalloc, which is
a wrapper that tests the return value of malloc.
That said, a 1000 variable knapsack problem seems
a little small to be causing memory issues.

BTW a general MIP solver might not be the
best way to solve your knapsack problems.
That said, if it works well enough,
'tain't worth much effort to find something better.

--
Michael   address@hidden
"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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]