function [k,t]=sun20110828
t1=cputime;
x0=[0 0 0 0 0]';%[0,2.5,2.5,2.5,2.5]';
y0=5;

ka=70;
A=ka*[1,1,1,1,1];
b=ka*10;
M=[0.726 -0.949 0.266 -1.193 -0.504;
    1.645 0.678 0.333 -0.217 -1.443;
    -1.016 -0.225 0.769 0.934 1.007;
    1.063 0.567 -1.144 0.550 -0.548;
    -0.259 1.453 -1.073 0.509 1.026];
q=[5.308 0.008 -0.938 1.024 -1.312]';
rho=20;
tau=0.85;
gamma=1.98;
beta1=0.006;
beta=beta1;

k=0;

f0=M*x0+rho*atan(x0-2)+q;
b01=x0-beta*(f0-A'*y0);
a01=max(0,b01);e01=x0-a01;
e02=beta*(A*(x0-e01)-b);
e0=[e01',e02']';
while min(norm(e0,2),norm(e0,2)/beta)>1e-6&k<=1000
x00=x0-e01;
f00=M*x00+rho*atan(x00-2)+q;
d01=e01+beta*A'*e02-beta*f0+beta*f00;
d02=e02;
d0=[d01',d02']';
phi=norm(e0,2)^2+beta*e02'*A*e01-beta*e01'*(f0-f00);
rho0=tau*phi/norm(d0,2)^2;
b001=x0-gamma*rho0*d01;

x1=max(0,b001);
y1=y0-gamma*rho0*d02;

k=k+1;
x0=x1;
y0=y1;

beta=beta1;
f0=M*x0+rho*atan(x0-2)+q;
b01=x0-beta*(f0-A'*y0);
a01=max(0,b01);e01=x0-a01;
e02=beta*(A*(x0-e01)-b);
e0=[e01',e02']';

end
t=cputime-t1;
d=[2,2,2,2,2]';
norm(x0-d,2)