Abt. SIMPLEX-ALGORITHMUS
==================
Der grundlegendste aller Optimierungsalgorithmen des gesamten Operations Research-Bereiches (früher auch "Lineare Programmierung" genannt). Die hier vorgestellte Variante maximiert die lineare Zielfunktion (Kniff: Durch negative Zielvariablen könnte auch minimiert werden), sie berücksichtigt automatisch alle Nichtnegativitäts-Bedingungen und beherrscht neben den standardmäßig üblichen <= (Kleiner-gleich)-Restriktionen gleichzeitig auch >= (Größer-gleich)- und sogar == (Identisch-gleich)-Nebenbedingungen. Letztere helfen insbesondere bei sog. "Was wäre, wenn ..."-Analysen. Bitte aus den 3 Teilen zusammensetzen!
Gruss
P.S.: Es wurde vermieden, die Array-Basis A(1,1) in XProfans A![0,0] zu konvertieren, was aber noch gewisse Restrisiken beinhaltet; auch deshalb handelt es sich um eine Demo-Alpha-Version ohne jede Gewähr!
'****************************************************************
WindowTitle "LINEAR PROGRAMMING: THE SIMPLEX METHOD" '*
'* ------------------------------------------------------------ *
'* XProfan: Early Alpha Version! Use solely on your own risk! *
'* Keine wie auch immer geartete Gewähr!No Warranty whatsoever! *
'* Nutzung auf alleinige Gefahr des Anwenders / der Anwenderin! *
'* ------------------------------------------------------------ *
'* SAMPLE RUN: *
'* *
'* Maxim. Z = x1 + x2 + 3*x3 -0.5*x4 with conditions: *
'* x1 + 2*x3 <= 740 *
'* 2*x2 - 7*x4 <= 0 *
'* x2 - x3 + 2*x4 >= 0.5 *
'* x1 + x2 + x3 + x4 = 9 *
'* and *of course* all x's >= 0 *
'* *
'* Number of variables in E.F.: 4 *
'* Number of <= inequalities..: 2 *
'* Number of >= inequalities..: 1 *
'* Number of = equalities.....: 1 *
'* *
'* Input Economic Function: *
'* Coefficient # 1: 1 *
'* Coefficient # 2: 1 *
'* Coefficient # 3: 3 *
'* Coefficient # 4: -0.5 *
'* Constant term..: 0 *
'* *
'* Input constraint # 1: *
'* Coefficient # 1: 1 *
'* Coefficient # 2: 0 *
'* Coefficient # 3: 2 *
'* Coefficient # 4: 0 *
'* Constant term..: 740 *
'* Input constraint # 2: *
'* Coefficient # 1: 0 *
'* Coefficient # 2: 2 *
'* Coefficient # 3: 0 *
'* Coefficient # 4: -7 *
'* Constant term..: 0 *
'* Input constraint # 3: *
'* Coefficient # 1: 0 *
'* Coefficient # 2: 1 *
'* Coefficient # 3: -1 *
'* Coefficient # 4: 2 *
'* Constant term..: 0.5 *
'* Input constraint # 4: *
'* Coefficient # 1: 1 *
'* Coefficient # 2: 1 *
'* Coefficient # 3: 1 *
'* Coefficient # 4: 1 *
'* Constant term..: 9 *
'* ------------------------------------------------------------ *
'* ... resulting in the following Array with ArrayBase at [1,1] *
'* ------------------------------------------------------------ *
'* A[1,i]= Const x1 x2 x3 x4 *
'* 0: ---1------2-------3-------4-------5--- *
'* 1: 0.00 1.00 1.00 3.00 -0.50 *
'* 740.00 -1.00 0.00 -2.00 0.00 *
'* 0.00 0.00 -2.00 0.00 7.00 *
'* 0.50 0.00 -1.00 1.00 -2.00 *
'* 9.00 -1.00 -1.00 -1.00 -1.00 *
'* ------------------------------------------------------------ *
'* RESULT: *
'* ------------------------------------------------------------ *
'* Maximum of Economic Function = 17.025 *
'* X1 = 0.000 *
'* X2 = 3.325 *
'* X3 = 4.725 *
'* X4 = 0.950 *
'* ------------------------------------------------------------ *
'* Reference: "Numerical Recipes By W.H. Press, B. P. Flannery, *
'* S.A. Teukolsky and W.T. Vetterling, Cambridge *
'* University Press, 1986". *
'* ------------------------------------------------------------ *
'* BASIC Release 1.0 By J-P Moreau, Paris *
'* (www.jpmoreau.fr) *
'* ------------------------------------------------------------ *
'* Adapted (Demo-only) to XProfan Version 11.2a by *
'* P.Specht, Vienna/Austria *
'* www.paules-pc-forum.de/ppf/ *
'* board9-programmierung/board104-xprofan/ *
'****************************************************************
'****************************************************************
'* Program Test Simplex *
'****************************************************************
Alles anzeigen
Weiter gehts unten mit Teil 2.