households.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:alpg 作者: GENETX 项目源码 文件源码
def __init__(self):
        self.generate()
        self.ConsumptionYearly      = profilegentools.gaussMinMax(2010,400)*config.consumptionFactor #kWh http://www.nibud.nl/uitgaven/huishouden/gas-elektriciteit-en-water.html

        age = random.triangular(65, 85, 70)
        self.Persons = [ persons.PersonRetired(age)]

        if(random.randint(1,2) == 1):
            self.Fridges = [ devices.DeviceFridge(random.randint(config.ConsumptionFridgeBigMin,config.ConsumptionFridgeBigMax)) ]
        else:
            self.Fridges = [ devices.DeviceFridge(random.randint(config.ConsumptionFridgeSmallMin,config.ConsumptionFridgeSmallMax)), devices.DeviceFridge(random.randint(config.ConsumptionFridgeSmallMin,config.ConsumptionFridgeSmallMax)) ]


        self.hasDishwasher = random.randint(0,5) < 3 #40%

        #Determine washing days
        self.generateWashingdays(random.randint(2, 3))

        #Dermine Dishwasher times
        if self.hasDishwasher:
            self.generateDishwashdays(3)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号