// Affine Scaling // This a method due to Vanderbei e.a. in the 1980s. function affinescaling (A:real, b:real column, c: real vector, gamma:positive number=0.9, x:real column=none, history=false, infinite=1/epsilon) ## Minimize c.x with A.x=b using an inner method ## ## The method used it due to Vanderbei e.a. It takes the current ## solution x to (1,...,1) and uses a direction c projected to the ## kernel of A. ## ## The start vector x must be an inner vector. If it is missing, an ## additional variable is used, and A is expanded such that ## x=(1,...,1) is a feasible start point. ## ## A : mxn matrix ## b : 1xm column vector ## c : nx1 row vector ## gamma : 00); lambda=gamma/max(v[i]'); tx=x/d'-lambda*v; x=d'*tx; znew=c.x; if history then X=X|x; endif; while znew