[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] record_solution
From: |
Joao Pedro Pedroso |
Subject: |
Re: [Help-glpk] record_solution |
Date: |
Mon, 16 Jan 2006 14:40:41 +0000 (WET) |
> > I am writing a version of the "record_solution" function, defined in
> > glpmip2.c, and I got confused; shouldn't the line
> > tree->best = lpx_get_obj_val(lp);
> > be replaced by
> > tree->best = lpx_get_mip_val(lp);
> > as we are dealing with MIPs?
>
> The correct line is the following:
>
> tree->best = lpx_get_obj_val(lp);
>
> because the best known MIP solution is optimal solution of LP
> relaxation (which lp points to) corresponding to a node of the
> b&b tree.
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.
Thank you,
Pedro