%
% Example 16.4: ASC Process Objective Function
%
% Bob Newell, May 1996
%------------------------------------------------------
r = [ 2:2:20 ]';
w = [ 0.1:0.1:1 ]';
n = length( r );
opcost = zeros( n, n );
%
for i = 1:n,
  for j = 1:n,
    pwr = r(i) + w(j);
	treat = 20 * w(j);
	filt = ( 0.6 / w(j) )^2 + ( r(i) / 18 )^2;
	pen = 1.2 * w(j)^2;
	opcost(j,i) = pen + 0.4 * filt + treat + pwr;
  end;
end;
%
mesh( r, w, opcost );
set( gca, 'fontsize', 16 );
ylabel( 'Wastage' );
xlabel( 'Recycle' );
zlabel( 'Operating cost' );
print -f1 -deps2 fig20-08b.eps
%
