help-glpk
[Top][All Lists]
Advanced

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

R: [Help-glpk] Avoid full factorization


From: Davide Anghinolfi
Subject: R: [Help-glpk] Avoid full factorization
Date: Wed, 29 Jul 2009 23:48:29 +0200

Ops, I didn't finish my previous mail, but the problem should be clear: do
you have any suggestion?

Thanks
Davide
(and sorry for multiple message)


> -----Messaggio originale-----
> Da: address@hidden [mailto:help-
> address@hidden Per conto di Davide
> Anghinolfi
> Inviato: mercoledì 29 luglio 2009 23.45
> A: address@hidden
> Oggetto: [Help-glpk] Avoid full factorization
> 
> Hi.
> When relaxing a set of variables previously fixed to a value, the
> variables
> remain non in basis (the status is changed from 'fixed' to 'on lower
> bound'). When I reoptimize, the primal takes a lot of iterations to
> reach
> feasibility and then the optimal solution.
> Trying to solve the problem, I used the following code that puts in the
> basis the columns relaxed. I did it with the aid of the
> glp_eval_tab_col and
> lpx_prim_ratio_test (to know which column must go non in basis). The
> problem
> is that in this code I need to factorize the basis each time I change
> it
> (else glp_eval_tab_col doesn't work) and this could be time consuming.
> I
> guess that the simplex
> 
> 
> int len = glp_eval_tab_col(lp, i+m, ind, val);
> if (len==0)
>       continue;
> int exitFromBasis = lpx_prim_ratio_test(lp, len, ind, val, 1,
> parm.tol_dj);
> if (exitFromBasis == 0)
>       continue;
> 
> glp_set_col_stat(lp, i, GLP_BS);
> if (exitFromBasis <= m)
>       glp_set_row_stat(lp, exitFromBasis, GLP_NL);
> else
>       glp_set_col_stat(lp, exitFromBasis - m, GLP_NL);
> glp_factorize(lp);
> 
> --
> Davide Anghinolfi, PhD
> DIST - University of Genoa
> Via Opera Pia 13, 16145 Genova - Italy
> Tel: +39 010 353 2284
> Cell: +39 349 157 86 60
> e-mail: address@hidden
> 
> 
> 
> 
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk





reply via email to

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