# HG changeset patch # User Nicolas Saunier # Date 1464062085 14400 # Node ID 9f8e9fb5621bea7997b6b5b5b71ee7fbe0217dfb # Parent ee3433fc00267f51fc94e4869b938446b297d890 minor diff -r ee3433fc0026 -r 9f8e9fb5621b python/traffic_engineering.py --- a/python/traffic_engineering.py Fri Apr 29 16:08:45 2016 -0400 +++ b/python/traffic_engineering.py Mon May 23 23:54:45 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)