function analyse_singleserver(root_model)
% plots relevant output values of the singleserver model

%% Generator
tg1_values = [root_model.components.gen.observed{:,1}];
g1states = [root_model.components.gen.observed{:,2}];
g1count = [g1states.counter];
figure('name','singleserver','NumberTitle','off');

subplot(3,2,1)
stairs(tg1_values,g1count);
title('Generator')

%% Queue
tproc_values = [root_model.components.queue.observed{:,1}];
procstates = [root_model.components.queue.observed{:,2}];
procq1 = [procstates.phase];
procq2 = [procstates.n];

subplot(3,2,3)
stairs(tproc_values,procq1);
title('Queue phase');
ylim([-0.5, max(procq1)+0.5])

subplot(3,2,5)
stairs(tproc_values,procq2);
title('Queue length');
ylim([-0.5, max(procq2)+0.5])

%% Server
tproc_values = [root_model.components.server.observed{:,1}];
procstates = [root_model.components.server.observed{:,2}];
procq1 = [procstates.phase];
procq2 = [procstates.entity];

subplot(3,2,4)
stairs(tproc_values,procq1);
title('Server phase');
ylim([-0.5, max(procq1)+0.5])

subplot(3,2,6)
stairs(tproc_values,procq2);
title('Server entity');
ylim([-0.5, max(procq2)+0.5])

%% Terminator
t_values = [root_model.components.term.observed{:,1}];
states = [root_model.components.term.observed{:,2}];
ni_values=[states.ni];

subplot(3,2,2)
stairs(t_values,ni_values);
title('Terminator');
