sumolib.miscutils
index
/home/anton/import_LD/packages/sumo/mod18/sumo-0.23.0/tools/sumolib/miscutils.py

@file    miscutils.py
@author  Jakob Erdmann
@author  Michael Behrisch
@date    2012-05-08
@version $Id: miscutils.py 18096 2015-03-17 09:50:59Z behrisch $
 
Common utility functions
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

 
Modules
       
colorsys
math
os
random
socket
sys
time

 
Classes
       
Colorgen
Statistics
working_dir

 
class Colorgen
     Methods defined here:
__call__(self)
return constant or randomized rgb-color string
__init__(self, hsv)
byteTuple(self)
return color as a tuple of bytes each in [0,255]
floatTuple(self)
return color as a tuple of floats each in [0,1]
get_value(self, opt)

 
class Statistics
     Methods defined here:
__init__(self, label=None, abs=False, histogram=False, printMin=True, scale=1)
__str__(self)
add(self, v, label=None)
average_absolute_deviation_from_mean(self)
avg(self)
return the mean value
avg_abs(self)
return the mean of absolute values
clear(self)
count(self)
histogram(self)
mean(self)
return the median value
mean_abs(self)
return the median of absolute values
median(self)
median_abs(self)
quartiles(self)
rank(self, fraction)
relStdDev(self, limit=None)
return the relative standard deviation optionally limited to the last limit values
update(self, other)

 
class working_dir
    # temporarily change working directory using 'with' statement
 
  Methods defined here:
__enter__(self)
__exit__(self, type, value, traceback)
__init__(self, dir)

 
Functions
       
benchmark(func)
geh(m, c)
Error function for hourly traffic flow measures after Geoffrey E. Havers
getFreeSocketPort(numTries=10, minPort=8000, maxPort=50000)

 
Data
        uMax = uMax
uMin = uMin