pm4py.ocel.discover_ocdfg#

pm4py.ocel.discover_ocdfg(ocel: OCEL, business_hours: bool = False, business_hour_slots: List[Tuple[int, int]] | None = [(25200, 61200), (111600, 147600), (198000, 234000), (284400, 320400), (370800, 406800)]) Dict[str, Any][source]#

Discovers an Object-Centric Directly-Follows Graph (OC-DFG) from an object-centric event log.

Object-centric directly-follows multigraphs are a composition of directly-follows graphs for each object type. These graphs can be annotated with different metrics considering the entities of an object-centric event log (i.e., events, unique objects, total objects).

Reference paper: Berti, Alessandro, and Wil van der Aalst. “Extracting multiple viewpoint models from relational databases.” Data-Driven Process Discovery and Analysis. Springer, Cham, 2018. 24-51.

Parameters:
  • ocel (OCEL) – Object-centric event log.

  • business_hours (bool) – Enable the usage of business hours if set to True.

  • business_hour_slots (Optional[List[Tuple[int, int]]]) – Work schedule of the company, provided as a list of tuples where each tuple represents one time slot of business hours. Each tuple consists of a start and an end time given in seconds since week start, e.g., [(25200, 61200), (9072, 43200), (46800, 61200)] meaning that business hours are Mondays 07:00 - 17:00, Tuesdays 02:32 - 12:00, and Wednesdays 13:00 - 17:00.

Returns:

OC-DFG discovery result.

Return type:

Dict[str, Any]

import pm4py

ocdfg = pm4py.discover_ocdfg(ocel)