(maxima.info)Introduction to simplex


Next: Functions and Variables for simplex Prev: simplex-pkg Up: simplex-pkg
Enter node , (file) or (file)node

80.1 Introduction to simplex
============================

'simplex' is a package for linear optimization using the simplex
algorithm.

   Example:

     (%i1) load("simplex")$
     (%i2) minimize_lp(x+y, [3*x+2*y>2, x+4*y>3]);
                       9        7       1
     (%o2)            [--, [y = --, x = -]]
                       10       10      5

80.1.1 Tests for simplex
------------------------

There are some tests in the directory 'share/simplex/Tests'.

80.1.1.1 klee_minty
...................

The function 'klee_minty' produces input for 'linear_program', for which
exponential time for solving is required without scaling.

   Example:

     load(klee_minty)$
     apply(linear_program, klee_minty(6));

   A better approach:

     epsilon_sx : 0$
     scale_sx : true$
     apply(linear_program, klee_minty(10));

80.1.1.2 NETLIB
...............

Some smaller problems from netlib (<http://www.netlib.org/lp/data/>)
test suite are converted to a format, readable by Maxima.  Problems are
'adlittle', 'afiro', 'kb2' and 'sc50a'.  Each problem has three input
files in CSV format for matrix <A> and vectors <b> and <c>.

   Example:

     A : read_matrix("adlittle_A.csv", 'csv)$
     b : read_list("adlittle_b.csv", 'csv)$
     c : read_list("adlittle_c.csv", 'csv)$
     linear_program(A, b, c)$
     %[2]
     => 225494.963126615

   Results:

     PROBLEM        MINIMUM                SCALING
     adlittle       225494.963126615       no
     afiro          - 464.7531428571429    no
     kb2            - 1749.900129055996    yes
     sc50a          - 64.5750770585645     no


automatically generated by info2www version 1.2.2.9