[Top][All Lists]

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

Re: [Help-glpk] record_solution

From: Andrew Makhorin
Subject: Re: [Help-glpk] record_solution
Date: Thu, 19 Jan 2006 05:29:28 +0300

> Sorry, I did not mention the context of this use of record_solution; I
> was writing a version to call after fixing some integer variables with
> some heuristics, and doing a branch-and-bound on the remaining.  So it
> seems that I need to use lpx_get_mip_val, and also lpx_mip_col_val and
> lpx_mip_row_val for accessing the variables.

An integer feasible solution found with a primal heuristic should be
stored in the same way as record_solution does:

   tree->found = 1;
   tree->best = <objective value>;
   tree->mip[1,...,m] = <values of auxiliary variables>;
   tree->mip[m+1,...,m+n] = <values of structural variables>;

Routines lpx_mip_col_val and lpx_mip_row_val should not be used
within mip_driver, because corresponding data are copied to the
problem object after the search has been finished. During the search
these data are available in tree->best and tree->mip and can be
accessed directly.

Fixing variables should be performed in the same way as fix_by_red_cost

reply via email to

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