relationship lag scheduling - detailed calculation algorithm