Linear Programming in APL -by c. INF,AR PROGRAMMING HAS A HISTORY OF MANY YEARS w i t h but there is no restriction on any coefficient. We assume the variab]es are in the vector X and there are several vectors and matrices to be provided. 1. 2. 3. 4. The The The The objective vector is C with C+. xX maximized array F and vector G such that G>F+. aX array H and vector U such that U<_H+.xX array 2? and vector S such that S=T+. xX Danzig's Simplex algorithm providing the first genera] solution. It is this algorithm that is implemented here. The simplest description of the aim of linear programming is that we wish to maximize a linear function ofn variables, Now create the vector R i=1 R=G,U,S,C,(pU),(pS) where the two p's are crucial, even if zero, and the array (origin 0) subject to a number ofconstxaints, typically of the form: M=F,[O]H,[O]2 ~ a~i (tpA)tR)*[O]A o V~-2~R [2] G*(((tpA)-+/V)tR,-V[O]t(-+/V),(tpA)tR [3] H*(2p~pA)pO o (0 0 ~H)~aG*(G+G=O),((tpA)-pG)pl [4] A*A,H*H,(+NG)$(+/G)t[1],['']G*O>G [5] C~C-(-pC~(l~pA)t(tpA)*-2*R)t(Q~V[l]++/G)plO0000 [6] 2~~S~(-l~pA)t-l^. X ~ B ~ S / A ) / E B R [9] G*2k(Vi[/V)=tpV*T/C-((S/C)[]~B)+..A [10] ~(O.O0001zF/V)/DONE [11] ~(O.O0001^.zZ~(,G/A)~B)/UNB [12] H~(W/X)÷(W*Z>IE-13)/Z [13] ~~S*(S^~SkWk(HiL/H)=ipB)vG [14] ~LP [15]
/lp/association-for-computing-machinery/linear-programming-in-apl-rNa4uHUPGM