Ejemplo n.º 1
0
 def test_curveCache(self):
     'Ensure that curve caching works properly'
     # Prepare simple curve settings
     curvePack1 = 'ZeroLinear', ((0, 1), (1, 1))
     curvePack2 = 'ZeroLogistic', ((0, 1), (1, 1))
     # Fit curves
     c1 = curve.fit(*curvePack1)
     c2 = curve.fit(*curvePack2)
     c3 = curve.fit(*curvePack1)
     # Make sure that we are getting the same exact curve
     self.assertNotEqual(id(c1), id(c2))
     self.assertEqual(id(c1), id(c3))
Ejemplo n.º 2
0
 def compute(self):
     curveType = self.get(SocialInfrastructureDemandCurveType)
     curvePoints = self.get(SocialInfrastructureDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 3
0
 def compute(self):
     curveType = self.get(ProductiveDemandCurveType)
     curvePoints = self.get(ProductiveDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 4
0
 def compute(self):
     curveType = self.get(HouseholdDemandCurveType)
     curvePoints = self.get(HouseholdDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 5
0
 def compute(self):
     curveType = self.get(PublicLightingFacilityCountCurveType)
     curvePoints = self.get(PublicLightingFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 6
0
 def compute(self):
     curveType = self.get(CommercialFacilityCountCurveType)
     curvePoints = self.get(CommercialFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 7
0
 def compute(self):
     curveType = self.get(EducationFacilityCountCurveType)
     curvePoints = self.get(EducationFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 8
0
 def compute(self):
     curveType = self.get(SocialInfrastructureDemandCurveType)
     curvePoints = self.get(SocialInfrastructureDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 9
0
 def compute(self):
     curveType = self.get(ProductiveDemandCurveType)
     curvePoints = self.get(ProductiveDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 10
0
 def compute(self):
     curveType = self.get(HouseholdDemandCurveType)
     curvePoints = self.get(HouseholdDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 11
0
 def compute(self):
     curveType = self.get(PublicLightingFacilityCountCurveType)
     curvePoints = self.get(PublicLightingFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 12
0
 def compute(self):
     curveType = self.get(CommercialFacilityCountCurveType)
     curvePoints = self.get(CommercialFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
Ejemplo n.º 13
0
 def compute(self):
     curveType = self.get(EducationFacilityCountCurveType)
     curvePoints = self.get(EducationFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)