help-octave
[Top][All Lists]
Advanced

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

Octave-forge: you get what you pay for


From: Vic Norton
Subject: Octave-forge: you get what you pay for
Date: Wed, 15 Jun 2005 09:36:56 -0400

A warning about Octave-forge: you get what you pay for.

I don't use Octave-forge. I don't generally need it for my "work".
Still, the only function on Octave-forge that I have really tested
failed to work on certain elementary problems. Obviously the creator
of the function was extremely naive about the subtleties of numerical
computation.

I am speaking of the linear programming routine lp. This function can
fail completely on relatively trivial but realistic problems. The
following test case illustrates the deficiency of lp.

   ## Problem 6
   %  Linear Programming 1: Introduction
   %  Dantzig, George B. & Thapa, Mukund N.
   %  Springer-Verlag, New York, 1997
   %  Example 1.4 (A Blending Problem)
   A6 = [
     1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
     0.2 0.5 0.3 0.3 0.3 0.6 0.4 0.1 0.1
     0.3 0.4 0.2 0.4 0.3 0.3 0.5 0.3 0.1
     0.5 0.1 0.5 0.3 0.4 0.1 0.1 0.6 0.8
   ];
   B6 = [1.0; 0.3; 0.3; 0.4];
   F6 = [4.1 4.3 5.8 6.0 7.6 7.5 7.3 6.9 7.3];
   LB6 = zeros(9, 1);
   UB6 = ones(9, 1)*Inf;
   N6 = 4;
   sol6 = lp(F6, A6, B6, LB6, UB6, N6);
   x6 = [0.5; 0.25; 0.25; 0; 0; 0; 0; 0; 0];
   assert(x6, sol6, 10*eps);

It is trivial to check that x6 is a feasible solution to Problem 6:
   A6 * x6 = B6,
   LB6 <= x <= UB6.
This computation doesn't show that x6 is optimal, that
   F6 * x6 = 4.575
is the minimum of F6 * x subject to the constraints on x. However it
does imply that Problem 6 has an optimal solution.

The last line of Problem 6, as presented above, is supposed to verify
that x6 is the optimal solution. In fact you never get to the last
line. The
   sol6 = lp(F6, A6, B6, LB6, UB6, N6)
line simply bombs. I get stuff like
   warning: lp is unreliable: the returned solution does not always
      lie within the bounds
   error: T& Array<T>::checkelem (0, 10): range error
   error: T& Array<T>::checkelem (1, 10): range error
   ...
   error: T& Array<T>::checkelem (1, 10): range error
   error: evaluating assignment expression near line 17, column 9
   error: near line 17 of file
      `/Users/vic/octave/m/tests-work/lp_prob6.m'
on my Macintosh. (Line 17, column 9 refers to the "=" in
"sol6 = lp(...);").

I reported this problem with lp to the powers that be over 4 years ago.
Nothing has been done about it. So my warning to you stands. In so far
as the Octave-forge routines go, don't believe everything you compute.

Regards,

Vic

--
*---* mailto:address@hidden
|     Victor Thane Norton, Jr.
|     Mathematician and Motorcyclist
|     Bowling Green, Ohio
*---* http://vic.norton.name



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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