function constantwattksi = constantwattksi(modelZA,modelMA,Z,P,ds)
%constantwatt(model,Z,P) selects the values from the model in the operation points
%with the same power input P. The distance on the constant power curve is
%ds. Normally ds is taken as 1. Z is the transmission rate of the given
%model.
c=P*3.6*Z;
vmax=25;
Tmax=75;
Tmin=c/vmax;
vmin=c/Tmax;
y(1)=Tmax;
ynew(1)=y(1);
%x=vmin:0.1:vmax;
x(1)=vmin;
k=1;
while x(k)<vmax
dx(k)=ds/(sqrt(1+c^2/x(k)^4));
x(k+1)=x(k)+dx(k);
k=k+1;
end
xnew=x;
ynew=c./xnew;
Xnew=[xnew',ynew'];
YZA=simlssvm(modelZA,Xnew);
YMA=simlssvm(modelMA,Xnew);
constantwattksi=1-YZA./YMA;