# HG changeset patch # User Nicolas Saunier # Date 1332297158 14400 # Node ID aeaaf5579b46e2a09fc37758039add25e689677f # Parent 966c2cd2bd9f45cee3057a1353faf1398da94a08 minor changes to traffic engineering diff -r 966c2cd2bd9f -r aeaaf5579b46 python/traffic_engineering.py --- a/python/traffic_engineering.py Tue Mar 06 18:44:03 2012 -0500 +++ b/python/traffic_engineering.py Tue Mar 20 22:32:38 2012 -0400 @@ -148,7 +148,7 @@ else: pass - def getPCEVolume(self): + def getPCUVolume(self): '''Returns the passenger-car equivalent for the input volume''' v = 0 for p, e in zip(self.proportions, self.equivalents): @@ -159,13 +159,12 @@ '''Represents an intersection movement with a volume, a type (through, left or right) and an equivalent for movement type''' - def __init__(self, volume, type, mvtEquivalent = 1): + def __init__(self, volume, mvtEquivalent = 1): self.volume = volume - self.type = type self.mvtEquivalent = mvtEquivalent def getTVUVolume(self): - return self.mvtEquivalent*self.volume.getPCEVolume() + return self.mvtEquivalent*self.volume.getPCUVolume() class IntersectionApproach: def __init__(self, leftTurnVolume, throughVolume, rightTurnVolume): @@ -174,7 +173,7 @@ self.rightTurnVolume = rightTurnVolume def getTVUVolume(self, leftTurnEquivalent = 1, throughEquivalent = 1, rightTurnEquivalent = 1): - return self.leftTurnVolume.getPCEVolume()*leftTurnEquivalent+self.throughVolume.getPCEVolume()*throughEquivalent+self.rightTurnVolume.getPCEVolume()*rightTurnEquivalent + return self.leftTurnVolume.getPCUVolume()*leftTurnEquivalent+self.throughVolume.getPCUVolume()*throughEquivalent+self.rightTurnVolume.getPCUVolume()*rightTurnEquivalent class LaneGroup: '''Class that represents a group of mouvements'''