Events

class acnportal.acnsim.events.Event(timestamp: int)

Base class for all events.

Parameters:timestamp (int) – Timestamp when an event occurs (periods)
timestamp

See args.

Type:int
event_type

Name of the event type.

Type:str
precedence

Used to order occurrence for events that happen in the same timestep. Higher precedence events occur before lower precedence events.

Type:float
type

Legacy accessor for event_type. This will be removed in a future release.

class acnportal.acnsim.events.PluginEvent(timestamp: int, ev: acnportal.acnsim.models.ev.EV)

Subclass of Event for EV plugins.

Parameters:
  • timestamp (int) – See Event.
  • ev (EV) – The EV which will be plugged in.
class acnportal.acnsim.events.UnplugEvent(timestamp: int, ev: acnportal.acnsim.models.ev.EV)

Subclass of Event for EV unplugs.

Parameters:
  • timestamp (int) – See Event.
  • ev (EV) – The EV which will be unplugged.
class acnportal.acnsim.events.RecomputeEvent(timestamp: int)

Subclass of Event for when the algorithm should be recomputed.