% Papageorgiou, 1996
%
% x0 = 2
% goals: S* = [0.5 0.5]'
% weights: w = [0.5 0.5]'
% xo = 0.1429
% S(xo) = [1.0102 1.0102]'

global w

xo=[];
So=[];
F1=[];
F2=[];
for w=0:0.01:1
   [x,S,ns,lambda]=sqp('test21','restr21',[2 0]);
   xo=[xo x];
   So=[So S];
   F1=[F1 1+0.5*x(1).^2];
   F2=[F2 4*(x(1)-0.5).^2+0.5];
end
w=[0:0.01:1];

plot(w,xo(1,:),'o'); xlabel('w'); ylabel('x');
figure(2);plot(xo(1,:),F1,'bo',xo(1,:),F2,'ro'); hold on
plot(xo(1,:),xo(2,:)); xlabel('x'); legend('F_1','F_2','\gamma')
figure(3);plot(F1,F2); xlabel('F_1'); ylabel('F_2');
