# HG changeset patch # User Nicolas Saunier # Date 1464062106 14400 # Node ID 2ffaf1a7cde9ebbfc1a1c6a7953cfb38a55a9663 # Parent 9f8e9fb5621bea7997b6b5b5b71ee7fbe0217dfb# Parent 8eb8a6bd70e8a2442a05e59fb167d9628ee0a50b merged diff -r 8eb8a6bd70e8 -r 2ffaf1a7cde9 python/traffic_engineering.py --- a/python/traffic_engineering.py Mon May 02 15:03:19 2016 -0400 +++ b/python/traffic_engineering.py Mon May 23 23:55:06 2016 -0400 @@ -309,7 +309,11 @@ def uniformDelay(cycleLength, effectiveGreen, saturationDegree): '''Computes the uniform delay''' - return 0.5*cycleLength*(1-float(effectiveGreen)/cycleLength)/(1-float(effectiveGreen*saturationDegree)/cycleLength) + return 0.5*cycleLength*(1-float(effectiveGreen)/cycleLength)**2/(1-float(effectiveGreen*saturationDegree)/cycleLength) + +def randomDelay(volume, saturationDegree): + '''Computes the random delay = queueing time for M/D/1''' + return saturationDegree**2/(2*volume*(1-saturationDegree)) def incrementalDelay(T, X, c, k=0.5, I=1): '''Computes the incremental delay (HCM)