Previous Page Next Page Contents

linopt::Transparent::suggest -- suggest the next step in the simplex algorithm

Introduction

linopt::Transparent::suggest(tableau) suggests the next step in the simplex algorithm for the given simplex tableau tableau.

Call(s)

linopt::Transparent::suggest(tableau)

Parameters

tableau - a simplex tableau of domain type linopt::Transparent

Returns

a sequence of 2 identifiers, the identifier OPTIMAL or the string "linopt::Transparent::phaseII_tableau".

Related Functions

linopt::Transparent, linopt::Transparent::autostep, linopt::Transparent::convert, linopt::Transparent::dual_prices, linopt::Transparent::phaseI_tableau, linopt::Transparent::result, linopt::Transparent::simplex, linopt::Transparent::userstep

Details

Example 1

We have a look at a linear program where the ordinary simplex tableau of the given problem is not the last tableau during the computation of the simplex algorithm. Looking at the ordinary simplex tableau we see that the element of the slk[2]-labeled row and the x-labeled column is a pivot element:

>> k := [{3*x + 4*y - 3*z <= 23, 5*x - 4*y - 3*z <= 10, 
          7*x + 4*y + 11*z <= 30}, -x + y + 2*z, NonNegative]:
   t := linopt::Transparent(k);
   linopt::Transparent::suggest(t)
        +-                                                       -+
        |  "linopt", "restr", slk[1], slk[2], slk[3],  z,  x,  y  |
        |                                                         |
        |    "obj",     0,       0,      0,      0,    2, -1,  1  |
        |                                                         |
        |   slk[1],     30,      1,      0,      0,   11,  7,  4  |
        |                                                         |
        |   slk[2],     10,      0,      1,      0,   -3,  5, -4  |
        |                                                         |
        |   slk[3],     23,      0,      0,      1,   -3,  3,  4  |
        +-                                                       -+
      
                                 slk[2], x
>> delete k, t:
     

Example 2

Here the ordinary simplex tableau still contains the solution of the linear program if the linear objective function is to minimize (see linopt::Transparent for more information):

>> k := [[x+y>=-1, x+y<=3], x+2*y, NonNegative]:   
   t := linopt::Transparent(k);                      
   linopt::Transparent::suggest(t)
              +-                                           -+
              |  "linopt", "restr", slk[1], slk[2],  x,  y  |
              |                                             |
              |    "obj",     0,       0,      0,    1,  2  |
              |                                             |
              |   slk[1],     1,       1,      0,   -1, -1  |
              |                                             |
              |   slk[2],     3,       0,      1,    1,  1  |
              +-                                           -+
      
                                  OPTIMAL
>> delete k, t:
     

Example 3

Here we explicitly start the first phase of the simplex algorithm. If we want a solution of the original linear program we have to apply the second phase of the simplex algorithm:

>> k := [{3*x + 4*y - 3*z <= 23, 5*x -4*y -3*z <= 10,
          7*x + 4*y + 11*z <= 30}, -x + y + 2*z, NonNegative]:
   t := linopt::Transparent(k):
   t := linopt::Transparent::phaseI_tableau(t):
   t := linopt::Transparent::simplex(t):
   linopt::Transparent::suggest(t)
                  "linopt::Transparent::phaseII_tableau"
>> delete k, t:
     

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000