Hello, to reduce memory consumption: Do not load models as text files, e.g. as a gmpl model. Instead create the model using the library functions. Provide the coefficients with either of glp_set_mat_col() glp_set_mat_row() glp_load_matrix() Do not pass any zero valued coefficient.
On a 64bit system each coefficient will occupy 80 bytes (struct GLPAIJ:8 for the value, 48 for pointers, 8 for alignment; 16 bytes used by xmalloc for memory management). Dont fortget to delete obsolete objects in the calling program after passing data to the GLPK library. If you are solving a mixed integer problem the size of the search tree will depend on the backtracking rule. Avoid breadth first search. Best regards Heinrich Schuchardt On 25.08.2015 15:54, usa usa wrote: > Hi, > > I am trying yto build a linear programming model by C# VS 2013 from > Optimization.Framework. > > The LP has 5000 constraints and 6000 decision variables. > > I got out-of-memory exceptin when I tried to solve it by GLPK. > > How to check memory consumption of a LP model in GLPK? > > When I reduce the size the LP to 5000 constraints and 200 decision > variables, I tried to change the coefficients of the LP. > > For some cases, the LP can be solved but for some cases it got > out-of-mem exception, > > How to avoid this ? > > Any help would be appreciated. > > Thanks > > > _______________________________________________ > Help-glpk mailing list > Help-glpk@gnu.org > https://lists.gnu.org/mailman/listinfo/help-glpk > _______________________________________________ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk