help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] GLPK 4.38 for Java under Linux


From: Andrew Makhorin
Subject: Re: [Help-glpk] GLPK 4.38 for Java under Linux
Date: Sat, 23 May 2009 22:09:03 +0300

> I have another question about my algorithm. I am using a Branch Price
> scheme. When I add variables, I want to use the basis of the previous run
> as the first basis of the current run (I donĀ“t want to solve the model
> from scratch each time!)

If you add new column(s), glp_add_cols makes them non-basic, so the
current basis as well as the basis factorization remain valid. Note that
by default the glpk simplex solver (glp_simplex) starts the search from
the current basis defined in the problem object, so if the basis is
valid, you do not need to call lpx_warm_up.

>  When I delete columns however, it may occur that
> one of them was in the basis, that consequently is not valid any more.
> Is there a simple way for me to use the same basis in the next run in
> case it was not modified, and update this basis in the case it has lost
> at least one variable?

You can use the routine glp_get_col_stat to determine whether a column
is basic or non-basic. If the column is basic, deleting it invalidates
the basis. So if you want the simplex solver to continue the search,
you should use the routine glp_set_row_stat/glp_set_col_stat to change
the status of some appropriate non-basic row/column to GLP_BS, i.e. to
make the basis valid.

>  (I used the warm_up function and I was looking at
> its return code, but this function seems to be deprecated on the newest
> versions.)

Lpx_warm_up will be replaced by glp_warm_up, which will provide the
same functionality.





reply via email to

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