Skip to main content

TVAW Nets implementation

Project description

TVAW Miner: Typed Petri Nets with Variable Weight Arcs

Authors: Sergeev I.I., Lomazova I. A. Scope: Object-Centric Process Mining

Overview

TVAW Lib - an open-source Python library for the discovery, analysis, and evaluation of Typed Petri Nets with Variable Weight Arcs (TVAWs). The tool extends classical Petri net–based process mining by supporting typed tokens and variable arc weights, enabling richer modeling of object-centric and multi-entity processes.

The framework is currently built on top of the PM4Py ecosystem, with planned native integration in future releases.

Motivation

Traditional process discovery techniques often assume homogeneous tokens and fixed arc semantics, limiting their applicability in object-centric settings. TVAWs generalize these models by:

  • Introducing typed tokens to distinguish object classes,
  • Allowing variable arc weights to capture flexible consumption/production rules,
  • Supporting fine-grained behavioral constraints across interacting entities.

This aligns with recent advances in object-centric process mining .

Features

  1. Discovery of TVAW models from event logs
  2. Conformance checking (precision and other metrics)
  3. Metric computation for model quality evaluation
  4. Visualization for visual analysis
  5. Integration with PM4Py pipelines

Usage

TVAW Discovery & evaluation

In code:

ocel = pm4py.read_ocel(ocel_path)
net, im, fm = discover_tvaw(ocel)

Then visualize with:

tvaw_gviz = visualize_tvaw(net)
ocpn_visualizer.save(tvaw_gviz, f"{out_path_dir}/tvaw.png")

With CLI:

Create n virtual environments:

# For main discovery
python3 -m venv venv
pip3 install -r requirements.txt

# For analysis
python3 -m venv venv1
pip3 install -r precision/requirements.txt

# For testing
python3 -m venv venv2
pip3 install -r requirements_test.txt
source ./venv2/bin/activate && python3 test.py \
    --logs-dir ./test/jsonocel \
    --results-dir ./results/logistics \
    --compare-python ./venv/bin/python  \
    --precision-python ./venv1/bin/python \
    --compare-script ./produce_comparison.py \
    --precision-script ./precision/calc_precision.py

OCEL Generation

Example:

python3 ./gen_tvaw_logs.py test/gen_configs/cars_min.json test/jsonocel/cars_min.jsonocel

Architecture

The tool is structured into the following components:

  1. Discovery Module: Constructs TVAWs from event logs
  2. Models layer: Defines the base structures
  3. Evaluation Module: Computes precision, and structural metrics (fitness is proven to be = 1)
  4. Visualization Module: Provides visualization capabilities

Theoretical Foundations

The theoretical basis for TVAWs are defined in the “Typed Petri Nets with Variable Arc Weights” paper by Irina A. Lomazova, Alexey A. Mitsyuk, and Andrey Rivkin. For the details of the discovery approach, see the docs folder

Roadmap

  • Full integration into PM4Py
  • Advanced visualization of TVAW models
  • Performance optimization for large-scale logs
  • Support for real-time process monitoring

Contributing

Contributions are welcome. A PR shall contain documentation, review instructions and tests. Each contribution should have a particular defined and developed scope.

Please submit PRs or open issues for discussion.

License

This project is licensed under the MIT License.

MIT License

Copyright (c) 2026

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

Acknowledgments

This work is inspired by foundational research in process mining and Petri nets, particularly in object-centric modeling and evaluation frameworks .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tvaw_lib-1.0.0.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvaw_lib-1.0.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file tvaw_lib-1.0.0.tar.gz.

File metadata

  • Download URL: tvaw_lib-1.0.0.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for tvaw_lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 50a14519d8ceecc8ca8378d4fe70864c2f947f88e9a8dfbf686b574988d88dbc
MD5 1535203fbd0cf0cb1d7305459989a338
BLAKE2b-256 24f3722edc75629ed526c855da71825eefbe1cec2d977e687b71cae64193db96

See more details on using hashes here.

File details

Details for the file tvaw_lib-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tvaw_lib-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for tvaw_lib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36b75e86aac63c9511c71020065d046997ae4bc83f989b942dc949d12ccbc572
MD5 dfe9cf185c8e8860089b6de162ac1b2a
BLAKE2b-256 f76f565b6c81c6932e6c2b0271384302778147fa47760b83724416ee08741b0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page