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