Example #1
0
def animateNormalSavingsModel():
    model = models.ChatterjeeSavingsModel(savingsFunc=models.normalSavingsCoefficient(0.1, 0.05),
                                          startingMoney=1.0,
                                          numAgents=2000)
    return _animateModel(model, "normal-savings.avi",
                         title="Normal Savings Coefficient Mean 0.1, Std. Deviation 0.05",
                         numSteps=100000, 
                         lower=0.0,
                         upper=4.0,
                         yMax=500,
                         numBins=20)
Example #2
0
 def make(params):
     mean, varPerMean = params
     return models.ChatterjeeSavingsModel(savingsFunc=models.normalSavingsCoefficient(mean, mean*varPerMean),
                                          startingMoney=1.0,
                                          numAgents=2000)