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 [email protected]
"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
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk