Thanks a lot for your help,  xypron and Andrew. I think the problem can be
solved by adding a term like |x-x_0| in my objective function where x_0 is
my initial solution, as you suggested.

I looked at glp_set_row_stat and glp_set_col_stat, but I do not understand
how they can be used to set initial values (say, for columns)? In these
functions, I can only set the status for rows/columns to be basic (GLP_BS)
or non-basic (GLP_NL).

Thanks.

--Jinwei

On Thu, Feb 21, 2008 at 4:13 PM, Andrew Makhorin <[EMAIL PROTECTED]> wrote:

> > I am wondering how we can do initialization in GLPK.
>
> > In my problems, I am optimizing several thousands of small LP
> > problems. I need their solutions to be similar to each other. However,
> > due to various noise in these problems, some of them are not feasible
> > or not easy to converge. In result, the output from GLPK for these
> > problems are not close to each other at all. One solution I am
> > thinking about is to use the solution from one problem as the initial
> > solution for the next problem. In this way, even if the next problem
> > will not converge, the result might still be close to the initial
> > solution.
>
> > Could anybody tell me how to specify the initial solution for GLPK? Or
> > is it possible to do?
>
> You can do that by specifying the initial basis which the glpk simplex
> solver will start from; see api routines glp_set_row_stat and
> glp_set_col_stat in the reference manual. However, this will not help
> you, because there is no guarantee that the final basis obtained by the
> solver will be similar to the initial one. You should formalize what
> "to be similar" means in your case. Are solutions x = (0, 1, 0, .5) and
> x' = (.5, 0, 1, 0) similar to each other? If so/not, why?
>
>


-- 
Best wishes,
Jinwei Gu
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to