|
From: | Daniel Gustafson |
Subject: | Re: [Help-glpk] Relaxed LP Results |
Date: | Fri, 24 Aug 2007 18:00:23 -0500 |
User-agent: | Thunderbird 2.0.0.6 (Windows/20070728) |
Andrew Makhorin wrote:
I'm sure I'm probably doing something wrong. Here's my code--After a successful MIP solution, I want to look at the structural variable reduced costs for some of the continuous variables (using lpx_get_col_dual). I find that they are all zero.This is because the mip presolver was used. (However, if you disable the presolver, LP solution will correspond to LP relaxation of the original MIP, not to its optimal solution.)If I resolve the problem using lpx_simplex (and fix all the binary variables at their solved values) I am able to get the correct reduced costs.Is is possible to get the reduced costs of the continuous variables without resolving as an LP problem?No, because you need reduced costs for the original formulation while the optimal mip solution reported by the solver corresponds to a subproblem which differs from the original one. In order not to solve lp you can fix *all* columns (i.e. structural variables) at their optimal values and then use the api routine lpx_warm_up to compute corresponding lp solution components.Am I on shaky theoretical grounds even asking for reduced costs on a relaxed solution? Would it make any difference if I turned the variable bounds into constraints?For what?BTW, I am experimenting with a Benders Decomposition in which the Sub Problem has some binary variables. lpx_set_class(LP, LPX_MIP); lpx_set_int_parm(LP, LPX_K_USECUTS, LPX_C_ALL); Status = lpx_intopt(LP); Status = lpx_mip_status(LP); for (int i=0;i<numcols;i++) lpx_set_col_stat(LP, i+1, LPX_NS); lpx_warm_up(LP); I'm still getting reduced costs of zero. Any suggestions? |
[Prev in Thread] | Current Thread | [Next in Thread] |