Exemplo n.º 1
0
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)
Exemplo n.º 2
0
 def __init__(self):
     self.electric = Electricity()
     self.water = Water()
     self.gas = Gas()
Exemplo n.º 3
0
 def __init__(self):
     self.electric = Electricity()
     self.water = Water()
     self.gas = Gas()