Реферат: Табличный симплекс-метод
end;
function ToStr(const D : real) : string;
var S : string;
begin
str(D:6:2, S);
ToStr:=' ' + S + ' ';
end;
procedure WriteMatrixs;
procedure WriteTargetMatrix;
var i : integer;
begin
writeln(' +-----------------------------------------------------+');
write (' ¦ Target ¦');
for i:=1 to n+m do write(ToStr(TargetVector[i]),'¦'); writeln;
end;
procedure WriteMatrixA;
var i,j : integer;
begin
writeln(' +-----------------+--------+--------+--------+--------+--------+--------¦');
writeln(' ¦ Basis ¦ D.Basis¦ A 0 ¦ A 1 ¦ A 2 ¦ A 3 ¦ A 4 ¦ A 5 ¦');
writeln(' +--------+--------+--------+--------+--------+--------+--------+--------¦');
for i:=1 to m do
begin
write(' ¦ A ',BasisVector[i],' ¦',ToStr(DigitOfBasisVector[i]),'¦');
for j:=0 to m+n do write(ToStr(VectorA[i, j]),'¦'); writeln;
if i = m then writeln(' +--------+--------+--------+--------+--------+--------+--------+--------¦')
else writeln(' +--------+--------+--------+--------+--------+--------+--------+--------¦');
end;
end;