Metadata-Version: 2.1
Name: simod
Version: 3.6.9
Summary: Simod is a Python tool for automated discovery of business process simulation models from event logs.
Author: David Chapela
Author-email: david.chapela@ut.ee
Requires-Python: >=3.9,<3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: PyYAML (>=6.0,<7.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: extraneous-activity-delays (>=2.1.19,<3.0.0)
Requires-Dist: hyperopt (>=0.2.7,<0.3.0)
Requires-Dist: jellyfish (>=0.11,<0.12)
Requires-Dist: log-distance-measures (>=1.0.2,<2.0.0)
Requires-Dist: lxml (>=4.9.1,<5.0.0)
Requires-Dist: matplotlib (>=3.6.0,<4.0.0)
Requires-Dist: networkx (>=3.1,<4.0)
Requires-Dist: numpy (>=1.23.4,<2.0.0)
Requires-Dist: openxes-cli-py (>=0.1.15,<0.2.0)
Requires-Dist: pandas (>=2,<3)
Requires-Dist: pendulum (>=2.1.2,<3.0.0)
Requires-Dist: pix-framework (>=0.13.5,<0.14.0)
Requires-Dist: prosimos (>=2.0.3,<3.0.0)
Requires-Dist: pydantic (>=1.10.3,<2.0.0)
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
Requires-Dist: python-multipart (>=0.0.6,<0.0.7)
Requires-Dist: pytz (>=2023.3,<2024.0)
Requires-Dist: requests (>=2.28.2,<3.0.0)
Requires-Dist: scipy (>=1.9.2,<2.0.0)
Requires-Dist: statistics (>=1.0.3.5,<2.0.0.0)
Requires-Dist: tqdm (>=4.64.1,<5.0.0)
Requires-Dist: xmltodict (>=0.13.0,<0.14.0)
Description-Content-Type: text/markdown

# Simod: Automated discovery of business process simulation models

![Simod](https://github.com/AutomatedProcessImprovement/Simod/actions/workflows/simod.yml/badge.svg)
![version](https://img.shields.io/github/v/tag/AutomatedProcessImprovement/simod)

Simod combines process mining and machine learning techniques to automate the discovery and tuning of Business Process
Simulation models from event logs extracted from enterprise information systems (ERPs, CRM, case management systems,
etc.).
Simod takes as input an event log in CSV format, a configuration file, and (optionally) a BPMN process model, and
returns a business process simulation scenario that can be simulated using
the [Prosimos](https://github.com/AutomatedProcessImprovement/Prosimos) simulator, which is embedded in Simod.

## Requirements

- Python 3.9. For Windows, [Python 3.9.13](https://www.python.org/downloads/release/python-3913/) is the last
  distribution with Windows installers.
- Java 1.8. For example,
  use [Amazon Corretto 8](https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html).
- Cargo package manager and the Rust toolchain (for Rust dependencies). Install it with [rustup.rs](https://rustup.rs/).
- _Optional_. If using Docker or compiling from source, use [Poetry](https://python-poetry.org/) for building,
  installing, and
  managing Python dependencies

| Dependency          | Version | Notes                                                                                                                                          |
|---------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------|
| Python              | 3.9     | For Windows, [Python 3.9.13](https://www.python.org/downloads/release/python-3913/) is the last distribution with Windows installers.          |
| Java                | 1.8     | For example, use [Amazon Corretto 8](https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html).                           |
| Cargo and Rust      | latest  | Install it with [rustup.rs](https://rustup.rs/).                                                                                               |
| Poetry (_optional_) | latest  | If using Docker or compiling from source, use [Poetry](https://python-poetry.org/) for building, installing, and managing Python dependencies. |

## Getting Started

### PyPI

❗️Make sure `java -version` returns `1.8` and `pip` is installed.

Then, install Simod and run it with the following commands:

```shell
pip install simod
simod optimize --config_path resources/config/sample.yml
```

Use your own configuration file instead of `resources/config/sample.yml` and specify the path to the event log in the
configuration file itself. Paths are relative to the configuration file or absolute.

PyPI project is available at https://pypi.org/project/simod/.

### Docker

```shell
docker pull nokal/simod
```

To start a container:

```shell
docker run -it -v /path/to/resources/:/usr/src/Simod/resources -v /path/to/output:/usr/src/Simod/outputs nokal/simod bash
```

Use the `resources` directory to store event logs and configuration files. The `outputs` directory will contain the
results of Simod.

From inside the container, you can run Simod with:

```shell
poetry run simod optimize --config_path <path-to-config>
```

Docker images for different Simod versions are available at https://hub.docker.com/r/nokal/simod/tags.

## Configuration file

A set of example configurations can be found in the
[resources](https://github.com/AutomatedProcessImprovement/Simod/tree/master/resources) folder along with a description
of each element:

- Basic configuration to discover the full BPS
  model ([here](https://github.com/AutomatedProcessImprovement/Simod/blob/master/resources/config/configuration_example.yml)).
- Basic configuration to discover the full BPS model, and evaluate it with a specified event
  log ([here](https://github.com/AutomatedProcessImprovement/Simod/blob/master/resources/config/configuration_example_with_evaluation.yml)).
- Basic configuration to discover a BPS model with a provided BPMN process model as starting
  point ([here](https://github.com/AutomatedProcessImprovement/Simod/blob/master/resources/config/configuration_example_with_provided_process_model.yml)).
- Complete configuration example with all the possible
  parameters ([here](https://github.com/AutomatedProcessImprovement/Simod/blob/master/resources/config/complete_configuration.yml)).

You can run any of these examples by executing the following command:

```shell
poetry run simod optimize --config_path resources/config/configuration_example.yml
```

## For developers

### Testing

Use `pytest` to run tests on the package:

```shell
poetry run pytest
```

To run unit tests, execute:

```shell
poetry run pytest -m "not integration"
```

Coverage:

```shell
poetry run pytest -m "not integration" --cov=simod
```

