sumolib.statistics
index
c:\users\delphi\testreports\sumoextra\git\tools\sumolib\statistics.py

# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
# Copyright (C) 2012-2024 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the Eclipse
# Public License 2.0 are satisfied: GNU General Public License, version 2
# or later which is available at
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later

 
Modules
       
math
warnings

 
Classes
       
Statistics

 
class Statistics
     Methods defined here:
__init__(self, label=None, abs=False, histogram=False, printMin=True, scale=1, printDev=False, printSum=False)
__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)
meanAndStdDev(self, limit=None)
return the mean and the standard deviation optionally limited to the last limit values
mean_abs(self)
median(self)
return the median value
median_abs(self)
return the median of absolute values
normalise_to_range(self, n_min=0, n_max=1)
Normalises the stored list of values between n_min and n_max, Default: [0,1]
quartiles(self)
rank(self, fraction)
relStdDev(self, limit=None)
return the relative standard deviation optionally limited to the last limit values
toString(self, precision=2, histStyle=1, fmt=<function identity>)
histStyle
0 : not shown
1 : one line
2 : fancy
toXML(self, precision=2, tag='statistic', indent=4, label=None, fmt=<function identity>)
update(self, other)

 
Functions
       
geh(m, c)
Error function for hourly traffic flow measures after Geoffrey E. Havers
identity(value)
round(value)
setPrecision(formatstr, precision, isArray=False, preformatted=False)
sqv(self, m, c, scaling_factor=1000)
Scaling Quality Value Calculation, Ref: https://journals.sagepub.com/doi/10.1177/0361198119838849
scaling_factor:
Number of person trips per day (total, per mode, per purpose) : 1
Mean trip distance in kilometers : 10
Duration of all trips per person per day in minutes : 100
Traffic volume per hour : 1000
Traffic volume per day : 10000

 
Data
        absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)
sqrt = <ufunc 'sqrt'>
uMax = uMax
uMin = uMin