MicroPM4Py

Process Mining for Microcontrollers in Python

Hardware

MicroPM4Py can be virtually run on any hardware, even very old or with very low resources/power consumption or embedded systems, since it is compatible with the Python3/Micropython stacks.

MicroPM4Py has been tested at less than 1 MHz on the Unicorn emulator (CPU: Cortex M3, stack: 8 kb, RAM: 64 kb).

MicroPM4Py has been physically tested on a Micropython v1.0 lite board (Cortex M4, 128 kb RAM).

The following table estimates the RAM occupation (in bytes) of the three log structures in MicroPM4Py (version 0.0.10): reading the DFG from the XES; reading the variants; reading all the traces from the log. Generally, the numbers are competitive and among the most efficient XES importers ever done (remind the limitation: only the case ID and the activity is read).

Log nameDFG obj sizeVariants obj sizeLoaded log obj size
running-example320015682016
receipt1711222072213352
roadtraffic106963798419392280
LevelA1.xes645616368154792
BPIC17.xes29240752814411474448
BPIC15_4.xes453552488200587656
BPIC17 - Offer log.xes376829926051880
BPIC13_incidents.xes26963802161333200
BPIC15_3.xes600304600312743656
BPIC15_1.xes541824534216652696
BPIC15_5.xes555776589688703712
BPIC12.xes2066418198483352352
BPIC13_closed_problems.xes232033504226856
BPIC15_2.xes551656457496531176
BPIC13_open_problems.xes187216096122672

The following table estimates the memory usage of an use case of MicroPM4Py (version 0.0.10): from a log, the DFG is obtained and the DFG mining technique is applied to obtain a Petri net. Then, an iterator is created on the log, in order to iterate over the single traces of the log. The memory usage of the MicroPM4Py module and data structure is then measured. The following aspects are taken into account (estimations were done on a X86-64 Debian 9 with Miniconda Python 3.7):

  • The maximum size of the iterator+current trace (in bytes)
  • The size of the DFG-mined Petri net (in bytes)
  • The size of the MicroPM4Py Python module (in bytes)
  • An estimated overapproximated size (16 KB) of a kernel + Micropython interpeter running on a microcontroller (in bytes)

The values are summed to get an estimation of the memory usage of the application for such use case, for several real-life logs. Except for the BPIC 2015 logs, the memory allocation is always under 128 KB! :)

Log nameMax XES iterable sizeDFG mining net sizeMicroPM4Py module sizeMicroPython size (est.max.) MAX EST. SIZE
running-example25126384206241638445904
receipt631227328206241638470648
roadtraffic341618104206241638458528
LevelA1.xes36569952206241638450616
BPIC17.xes666441352206241638485024
BPIC15_4.xes495607576802062416384844248
BPIC17 - Offer log.xes23926760206241638446160
BPIC13_incidents.xes26965352206241638445056
BPIC15_3.xes49912108487220624163841171792
BPIC15_1.xes5159299380020624163841082400
BPIC15_5.xes54048102764820624163841118704
BPIC12.xes636830744206241638474120
BPIC13_closed_problems.xes20565160206241638444224
BPIC15_2.xes54080101251220624163841103600
BPIC13_open_problems.xes18644480206241638443352