Previous Page Next Page Contents

linopt::Transparent::autostep -- perform the next simplex step

Introduction

linopt::Transparent::autostep(tableau) perform the next step of the simplex algorithm for the given simplex tableau tableau.

Call(s)

linopt::Transparent::autostep(tableau)

Parameters

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

Returns

a simplex tableau of domain type linopt::Transparent or a set which contains the solution of the linear program.

Related Functions

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

Details

Example 1

The ordinary simplex tableau of a given linear program is created:

>> k := [[x + y >= 2], x, NonNegative]:
   t := linopt::Transparent(k)
                  +-                                   -+
                  |  "linopt", "restr", slk[1],  x,  y  |
                  |                                     |
                  |    "obj",     0,       0,    1,  0  |
                  |                                     |
                  |   slk[1],     -2,      1,   -1, -1  |
                  +-                                   -+

The next two steps of the simplex algorithm are executed for the given simplex tableau:

>> linopt::Transparent::autostep(t);
   linopt::Transparent::autostep(%)
                  +-                                  -+
                  |  "linopt", "restr", slk[1], x,  y  |
                  |                                    |
                  |    "obj",     -2,      1,   0, -1  |
                  |                                    |
                  |      x,       2,      -1,   1,  1  |
                  +-                                  -+
      
                   +-                                 -+
                   |  "linopt", "restr", slk[1], x, y  |
                   |                                   |
                   |    "obj",     0,       0,   1, 0  |
                   |                                   |
                   |      y,       2,      -1,   1, 1  |
                   +-                                 -+
>> delete k, t:
     

Example 2

The ordinary simplex tableau of a given linear program is created:

>> k := [[x + y >= -1, x + y <= 3], x + 2*y, NonNegative]:   
   t := linopt::Transparent(k)                     
              +-                                           -+
              |  "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  |
              +-                                           -+

If the end of the simplex algorithm is reached, linopt::Transparent::autostep returns a solution of the given linear program:

>> linopt::Transparent::suggest(t), 
   linopt::Transparent::autostep(t)
                          OPTIMAL, {x = 0, y = 0}
>> delete k, t:
     

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000