% Testing the effect of different time step functions on the delta between
% actual and resulting excess electricity (to derive which time step
% algorithm and how many time steps are a suitable compromise between
% computing efficiency and accuracy
functiontimeStepDiff(s,g,powerData)
[residualLoad,powerYear]=vrePower(powerData,s.onShore,s.offShore,s.photoV,s.demandPower,s.MustRun,s.RENMustRun);%Calculation of hourly residual load and other power metrics
[residualLoad,powerYear]=vrePower(powerData,s.onShore,s.offShore,s.photoV,s.demandPower,s.MustRun,s.RENMustRun);%Calculation of hourly residual load and other power metrics
figure()
holdon
iMax=60;
fori=1:3
s.weatherYear=i;
z(i).surplusPowerVar=surplusPower(g,s,residualLoad,powerYear);%Calculation of surplus power (TWh) per year and time step