Modeling

From wiki
Revision as of 23:29, 10 December 2018 by Hdridder (talk | contribs)
Jump to navigation Jump to search

Mostly based on this paper

Eyeopeners

Store results in a list.

for a in range(100):
    funcAresults[a] = functionAcall(bla,bla)
    funcBresults[a] = functionBcall(bla,bla)

ModSimPy is using Series from Pandas to store results. This adds handy functions.

results.mean()
Return the mean (average) for the items in results

I have not studied the pandas Series yet but this works:

from modsim import *
results = TimeSeries()
for a in range(100):
    results[a] = functioncall(bla,bla)

TimeSeries is a modified version (subclass) of the pandas.Series class.