예제 #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))
예제 #2
0
 def compute(self):
     curveType = self.get(SocialInfrastructureDemandCurveType)
     curvePoints = self.get(SocialInfrastructureDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #3
0
 def compute(self):
     curveType = self.get(ProductiveDemandCurveType)
     curvePoints = self.get(ProductiveDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #4
0
 def compute(self):
     curveType = self.get(HouseholdDemandCurveType)
     curvePoints = self.get(HouseholdDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #5
0
 def compute(self):
     curveType = self.get(PublicLightingFacilityCountCurveType)
     curvePoints = self.get(PublicLightingFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #6
0
 def compute(self):
     curveType = self.get(CommercialFacilityCountCurveType)
     curvePoints = self.get(CommercialFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #7
0
 def compute(self):
     curveType = self.get(EducationFacilityCountCurveType)
     curvePoints = self.get(EducationFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #8
0
 def compute(self):
     curveType = self.get(SocialInfrastructureDemandCurveType)
     curvePoints = self.get(SocialInfrastructureDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #9
0
 def compute(self):
     curveType = self.get(ProductiveDemandCurveType)
     curvePoints = self.get(ProductiveDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #10
0
 def compute(self):
     curveType = self.get(HouseholdDemandCurveType)
     curvePoints = self.get(HouseholdDemandCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #11
0
 def compute(self):
     curveType = self.get(PublicLightingFacilityCountCurveType)
     curvePoints = self.get(PublicLightingFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #12
0
 def compute(self):
     curveType = self.get(CommercialFacilityCountCurveType)
     curvePoints = self.get(CommercialFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)
예제 #13
0
 def compute(self):
     curveType = self.get(EducationFacilityCountCurveType)
     curvePoints = self.get(EducationFacilityCountCurvePoints)
     return curve.fit(curveType, curvePoints)