Skip to main content
. Author manuscript; available in PMC: 2018 Jul 1.
Published in final edited form as: ACM Trans Model Comput Simul. 2017 Jul;27(2):7. doi: 10.1145/2987373

ALGORITHM 3.

Steps for processing a RB-message, tail refers to the element with the greatest timestamp in a queue

Input: The RB-message rb
if rb.channel.ICPQ.tail.st < rb.st then
  Remove events with send time greater than or equal to rb.st in ICEQ and LPEQ;
  for event es in SubmitTrack do
    if es.channel == rb.channel & es.strb.st then
      Remove es in TEQ;
    end
  end
  if rb.channel.submit.strb.st then
    rb.channel submits its smallest event to upper level queue and updates submit;
  end
else
  Search cut-point ecut in rb.channel.ICPQ;
  rbt = −1;
  if ecut is not NIL then
    rbt = ecut.rt;
  else
    rbt = rb.st;
  end
  rb.targetLP rolls back to a time point prior to rbt according to algorithm 4;
end
smallest = the smallest event in LPEQ;
if submitTrack is empty | smallest.rt < submitTrack.top.rt then
  Submit smallest to TEQ and push it to submitTrack;
end