AutomatedProcessImprovement / Simod

Simod is a tool for automated BPS model discovery
Apache License 2.0
41 stars 7 forks source link

Add option to model inter-arrival times with histogram sampling #93

Closed david-chapela closed 1 year ago

david-chapela commented 1 year ago

Currently, the only way to model inter-arrival times is through a parametric distribution (normal, exponential, etc.). In this way, SIMOD is discovering the best fitting distribution and specifying to Prosimos.

Add an option in the configuration to either use parametric distributions, or use the observed one from the training log. The workflow should be the following:

  1. Compute the arrival times: first start time of each process case.
  2. Compute the inter-arrival times: the time from each arrival timestamp to the next one (discarding the non-working time). For example, if the current arrival is at 13.00 and the next one is at 17.00, but the arrival calendar specifies that 14.00-16.00 is non-working time, the inter-arrival would be 2 hours (13.00-14.00 and 16.00-17.00).
  3. Get the distribution of inter-arrivals:
    1. Use a parametric distribution: call to get_best_fitting_distribution() from pix_utils and then to distribution.to_prosimos_distribution().
    2. Use the observed histogram: call to get_observations_histogram() from pix_utils.
david-chapela commented 1 year ago

To discard the non-working time within one arrival and the next one, you can check how it is done in Prosimos: this function.