help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Segmentation Fault


From: Andrew Makhorin
Subject: Re: [Help-glpk] Segmentation Fault
Date: Fri, 20 Nov 2015 14:54:12 +0300

> I am having problems with segmentation fault error. I am using GLPK
> packet in C++. 
> 
> 
> I am applying Benders Decomposition to a system. In each iteration, I
> have to add one cut to a Master Problem, so, for that, I have created
> and index called "iter".
> 
> 
> #define iter 50
> 
> 
> 
> With that, my system can only achieve 50 iterations because after
> there is an error with the variables that depends on this number of
> iterations:
> 
> 
> double Y_fix[iter][G]
> 
> 
> 
> I have tried to increase the value of that set, but after 61, I got
> "segmentation error". If someone could tell me why it can be, will be
> a great help.

You should provide more detailed report.

Please note that all glpk api routines start indexing from 1, not from
0, so to pass an n-element array it should be declared as x[1+n], where
location x[0] is normally not used.






reply via email to

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