コード例 #1
0
ファイル: utility.py プロジェクト: ChristophAl/nilmtk
class Utility(object):

    """Store and process utility information for a building.

    Attributes
    ----------
    electric : nilmtk Electricity object

    gas : Series, optional
        gas consumption in kWh

    water : Series, optional
        water consumption in cubic meters
    """

    def __init__(self):
        self.electric = Electricity()
        self.water = Water()
        self.gas = Gas()

    def to_json(self):
        representation = {}
        representation["electric"] = self.electric.to_json()
        representation["water"] = self.water.to_json()
        representation["gas"] = self.gas.to_json()
        return json.dumps(representation)
コード例 #2
0
ファイル: utility.py プロジェクト: ChristophAl/nilmtk
 def __init__(self):
     self.electric = Electricity()
     self.water = Water()
     self.gas = Gas()
コード例 #3
0
 def __init__(self):
     self.electric = Electricity()
     self.water = Water()
     self.gas = Gas()