[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] GLPK warm start
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] GLPK warm start |
Date: |
Tue, 2 Oct 2001 16:55:44 +0300 |
>For this model, I need to sequentially solve a linear model with slight
>changes in the objective function and or rhs coefficients, then a warm
>start facility is required.
>
>From the documentation of GLPK is not very clear how to do it. Could
>you please let me know?
You should do the following:
1. Build your problem as LPI object using glpk api routines in the usual
way.
2. Find the optimal basis solution using api routine glp_call_rsm1.
3. Change the objective function and/or rhs and find the corresponding
basis solution using api routine glp_simplex1. In order to tell the
latter to start from the current basis (which is stored in LPI) you
should set the control parameter initb to 1. (See the description of
glp_simplex1 in the file 'newapi.txt' in the distribution.)
Note that if you repeat the step 3, the recently obtained basis solution
will be used in the next run. So, if you need to start from the optimal
basis obtained on the step 2, you should call api routines
glp_get_row_soln and glp_get_col_soln in order to obtain tags of rows
and columns (these tags keep information about the current basis), save
them somewhere, and then restore them each time before the step 3 using
api routines glp_put_row_soln and glp_put_col_soln.