MeasureInstrument - ptidejteam/tools4cities-metamenth GitHub Wiki
MeasureInstrument models different meters and weather stations with various sensors that measure distinct phenomena. MetamEnTh establishes relationships between meters and diverse entities, encompassing buildings, floors, rooms, open spaces, and HVAC components. This relationship between meters and other entities enables the measurement of phenomena such as power and energy consumption associated with these entities. Weather stations are essential to measure the outdoor environment conditions surrounding buildings.
Classes and Their Relationships
All classes (entities) have auto-generated IDs (UID) to uniquely identify objects created from them.
WeatherStation
This class defines weather stations that measure the outdoor environment condition of buildings.
Parent Class
None
Relationships
Buildinghas a one-to-many relationship withWeatherStation.WeatherStationalso has a one-to-many relationship withWeatherData.
Attributes
name:string, the unique name of the weather stationlocation:string, what3word location of the weather stationweather_data:List[WeatherData], a list of weather data recorded for the weather station.
Behaviours (Methods)
add_weather_data(List[WeatherData]): adds weather data recordings to the weather stationget_weather_data(search_terms: Dict) -> [WeatherData]: search for weather data based on attributes and their valuesget_weather_data_by_date(from_timestamp: str, to_timestamp: str = None) -> [WeatherData]: fetches weather data between (inclusive) from_timestamp to to_timestamp. If to_timestamp is not provided, it searches weather data from from_timestamp to the last data point available.
Meter
Meter defines the various meters in different locations and entities of a Building.
Parent Class
Relationships
- Spaces of a floor (
AbstractFloorSpace) have a one-to-one relationship withMeter. - A
Buildingcan have multipleMeter. - A
Meteralso has a one-to-many relationship withMeterMeasure.
Attributes
meter_location:string, the what3word location of the metermanufacturer:string, the manufacturer of the meter.measurement_frequency:float, the measurement frequency of the meter.measurement_unit:MeasurementUnit, the measurement unit of the meter data.meter_type:MeterType, the type of the meter.measure_mode:MeterMeasureMode, how data is measured by the meter e.g., manual or automaticdata_accumulated:bool(default is False), indicates if meter data is aggregated over a periodaccumulation_frequency:MeterAccumulationFreqency, indicates the period over which meter data is accumulated. This field is optional ifdata_accumulatedis set to False.meter_measures:List[MeterMeasure], a list of measurements recorded by the meter.
Behaviours (Methods)
add_meter_measure(meter_measure: MeterMeasure): adds a measurement for this meter.get_meter_measures(self, search_terms: Dict = None) -> [MeterMeasure]: searches meter data based on attributes and their values.get_meter_measure_by_date(from_timestamp: str, to_timestamp: str = None) ->[MeterMeasure]: fetches meter data between (inclusive) from_timestamp to to_timestamp. If to_timestamp is not provided, it searches meter data from from_timestamp to the last data point available.
MeterMeasure
MeterMeasure defines data recorded by meters in a building.
Parent Class
Relationships
Meterhas a one-to-many relationship withMeterMeasure.
Attributes
Same as AbstractDataMeasure.
Behaviours (Methods)
None
AbstractDataMeasure
This class defines data that various Meter and Sensor record. MeterMeasure and SensorData are AbstractDataMeasure.
Parent Class
None
Relationships
None
Attributes
value:float, the numerical value measured by the meter.timestamp:datetime, the timestamp when the measurement was taken.measurement_type: the type of the measurement, e.g., electricity consumption
Behaviours (Methods)
None
WeatherData
WeatherData defines data recorded by WeatherStation.
Parent Class
None
Relationships
WeatherStationhas a one-to-many relationship withWeatherData.
Attributes
data:AbstractMeasure, the binary measure (value and unit) of the weather data.timestamp:datetime, the timestamp when the weather data was recorded.
Behaviours (Methods)
None
TriggerHistory
TriggerHistory defines data recorded when Actuator is triggered.
Parent Class
Relationships
Actuatorhas a one-to-many relationship withTriggerHistory.
Attributes
trigger_type:TriggerType, the type of trigger.value:float(optional), the value associated with the trigger.timestamp:datetime, the timestamp when the trigger occurred.
Behaviours (Methods)
None
SensorData
SensorData defines data recorded for a Sensor in a built environment.
Parent Class
Relationships
Sensorhas a one-to-many relationship withSensorData.
Attributes
Same as AbstractDataMeasure.
Behaviours (Methods)
None
DamperPosition
DamperPosition defines data recorded for the position of Damper.
Parent Class
Relationships
Damperhas a one-to-many relationship withDamperPosition.
Attributes
Same as AbstractDataMeasure.
Behaviours (Methods)
None