help-octave
[Top][All Lists]
Advanced

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

Re: Linear Programing


From: Etienne Grossmann
Subject: Re: Linear Programing
Date: Fri, 24 Nov 2000 08:05:19 +0000
User-agent: WEMI/1.13.7 (Shimada) FLIM/1.13.2 (Kasanui) Emacs/20.7 (i386-debian-linux-gnu) (with unibyte mode)

 
  Hello,

 Jeff's program does

       max f'*x     subject to   A*x == b and x >= 0
        x

 And you want :

 LP     Linear programming.
        X=LP(f,A,b) solves the linear programming problem:

      min f'x    subject to:   Ax <= b
       x

  I think you can transform your problem into a problem that Jeff's
program can solve. The reasoning (no warranty of correctness : I would
not at all be surprised if there were some pitfall I fell in) is :

  Your problem is equivalent to (set y = A*x - b, y should be >= 0)

      max f'*x         subject to   A*x - y == b and x >= 0 and y>=0
       x

  which is equiv. to            (rewrite in vectorial form) 

      max [f',0]*[x;y] subject to   [A,-eye]*[x;y] == b and [x;y]>=0
       x

  equiv. to 
  (set x = x1 - x2 with x1 >= 0 and x2 >= 0, idem for y = y1 - y2)

      max [f',-f',0,0]*[x1;x2;y1;y2] 
       x

      subject to   [A,-A,-eye,-eye]*[x1;x2;y1;y2] == b 
      and          [x1;x2;y1;y2]>=0


  Which is the kind of problem that Jeff's function solves. 


  Etienne



-------------------------------------------------------------
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]