def time_slot_sensor(db): """Define sensor for time slot events.""" sensor = DBSensor(name="TimeSlot15MinSensor", event_resolution=timedelta(minutes=15)) session.add(sensor) session.flush() return sensor
def ex_post_time_slot_sensor(db): """Define sensor for time slot events known in advance (ex post).""" sensor = DBSensor( name="ExPostSensor", event_resolution=timedelta(minutes=15), knowledge_horizon=( timedelta_x_days_ago_at_y_oclock, dict(x=1, y=12, z="Europe/Amsterdam"), ), ) session.add(sensor) session.flush() return sensor
def instantaneous_sensor(db): """Define sensor for instantaneous events.""" sensor = DBSensor(name="InstantaneousSensor") session.add(sensor) session.flush() return sensor