[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Column kind violation in optimal solution
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Column kind violation in optimal solution |
Date: |
Tue, 31 Mar 2009 23:45:12 +0300 |
> I print out the solution of my problem and it is like the following
> No. Column name St Activity Lower bound Upper bound Marginal
> ------ ------------ -- ------------- ------------- -------------
> -------------
> 1 z[0][0] B 0 0 1
> 2 z[0][1] NL 0 0 1
> eps
> 3 z[0][2] B 0.25 0 1
> 4 z[0][3] B 0.75 0 1
> 5 z[1][0] NU 1 0 1
> eps
> 6 z[1][1] B 0 0 1
> 7 z[1][2] NL 0 0 1
> eps
> .............
> I have a couple of questions regarding the result.
> 1. What does columns St and Marginal mean?
"St" is the status of auxiliary/structural variable in the basic solution
found: B means "basic", NL means "non-basic, lower bound is active",
NU means "non-basic, upper bound is active". "Marginal" is the reduced
cost of auxiliary/structural variable.
> 2. Activity is the value of the column variable in the optimal solution,
> right?
Yes.
> But I have set the column kind to be binary variable by
> glp_set_col_kind(lp,Col_Num,GLP_BV); How can the variables take 0.25 and
> 0.75 in the optimal solution?
The solution you obtained is a basic optimal solution to LP relaxation
of your instance. To obtain an integer optimal solution you should call
glp_intopt immediately after glp_simplex, and then use glp_print_mip
rather than glp_print_sol.