function S0 = S0()
% Static parameters
S0.R_max = 500;     % The energy capacity of TES in MWh
S0.eff_c = 0.9;     % The charging efficiency of TES
S0.eff_d = 0.9;     % The discharging efficiency of TES
S0.rate_c = 50;     % The maximum charging rate of TES, given as MWh per time period
S0.rate_d = 50;     % The maximum discharging rate of TES, given as MWh per time period

% Initial states
S0.S.R = 0;     % Energy level of TES
S0.S.E = 210;   % Energy supply 
S0.S.D = 200;   % Energy demand
S0.S.P = 200;   % Spot electricity price
end