help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] order of basis variables


From: Andrew Makhorin
Subject: Re: [Help-glpk] order of basis variables
Date: Fri, 4 Nov 2005 23:13:39 +0300

> Still playing with the simplex tableau (ST). I'll start with a small
> example.
> Here consider the following ST, where x1-3 are structural variables 
> whereas x4-5 are slack variables, and . are some coefficient.
> 
>    | x1 x2 x3 x4 x5 |
> ---------------------
> x4 |  .  .  .  1  0 |
> x5 |  .  .  .  0  1 |
> ---------------------
>  Z |  .  .  .  0  0 |
> 
> 
> Now suppose that after some iterations of the simplex method we have the 
> optimal solution and the following ST:
> 
>    | x1 x2 x3 x4 x5 |
> ---------------------
> x2 |  .  1  0  .  . |
> x3 |  .  0  1  .  . |
> ---------------------
>  Z |  .  0  0  .  . |
> 
> Here what we want is to know that x2 is associated with x4 (1st line in 
> the ST), and x3 with x5 (2nd line).
> 
> GLPK says nothing about the order of variables returned by functions 
> like lpx_eval_tab_row. While parsing the sourcecode, it seems that the 
> "basis" array in the LPX structure gives me the right order (I checked 
> on small examples), but I wanted someone to confirm my guess. So ?

The order of variables returned by lpx_eval_tab_row and
lpx_eval_tab_col, that is, the order in which the variables are
placed in the simplex tableau, plays no role. To perform necessary
analysis it is enough to know which variables are basic, which are
non-basic, and how basic variables depends on non-basic variables.
This information can be obtained via lpx_get_row_stat/col_stat and
lpx_eval_tab_row/tab_col.







reply via email to

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