function [F] = myfunc7 (x)
global beta gamma P y Uau Upr
w=x(1:7,1);
c1=x(8:14,1);
uc=(c1.^(1-gamma))/(1-gamma);
F(1:7,1) = uc + beta*P*w - w;
F(8:11,1)   = [1 0 0 0 0 0 1; 0 1 0 0 0 1 0; 0 0 1 0 1 0 0; 0 0 0 2 0 0 0]*c1 - 1;
F(12,1)   = w(5) - max(Uau(5),Upr);
F(13,1)   = w(6) - max(Uau(6),Upr);
F(14,1)   = w(7) - max(Uau(7),Upr);
