help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] GLPK got out-of-memory exception when solving linear pro


From: Heinrich Schuchardt
Subject: Re: [Help-glpk] GLPK got out-of-memory exception when solving linear programming models
Date: Tue, 25 Aug 2015 19:24:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk
> 



reply via email to

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