function eventOrder input Integer queue; input Integer position = 1; output Real out; end eventOrder;