pm4py.simulation.montecarlo package¶
Subpackages¶
Submodules¶
pm4py.simulation.montecarlo.outputs module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.simulation.montecarlo.outputs.Outputs[source]¶ Bases:
enum.EnumAn enumeration.
-
OUTPUT_CASES_EX_TIME= 'cases_ex_time'¶
-
OUTPUT_CASE_ARRIVAL_RATIO= 'input_case_arrival_ratio'¶
-
OUTPUT_MEDIAN_CASES_EX_TIME= 'median_cases_ex_time'¶
-
OUTPUT_PLACES_INTERVAL_TREES= 'places_interval_trees'¶
-
OUTPUT_TOTAL_CASES_TIME= 'total_cases_time'¶
-
OUTPUT_TRANSITIONS_INTERVAL_TREES= 'transitions_interval_trees'¶
-
pm4py.simulation.montecarlo.parameters module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.simulation.montecarlo.parameters.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
PARAM_CASE_ARRIVAL_RATIO= 'case_arrival_ratio'¶
-
PARAM_DEFAULT_NUM_RESOURCES_PER_PLACE= 'default_num_resources_per_place'¶
-
PARAM_DIAGN_INTERVAL= 'diagn_interval'¶
-
PARAM_ENABLE_DIAGNOSTICS= 'enable_diagnostics'¶
-
PARAM_FORCE_DISTRIBUTION= 'force_distribution'¶
-
PARAM_MAP_RESOURCES_PER_PLACE= 'map_resources_per_place'¶
-
PARAM_MAX_THREAD_EXECUTION_TIME= 'max_thread_exec_time'¶
-
PARAM_NUM_SIMULATIONS= 'num_simulations'¶
-
PARAM_PROVIDED_SMAP= 'provided_stochastic_map'¶
-
PARAM_SMALL_SCALE_FACTOR= 'small_scale_factor'¶
-
TIMESTAMP_KEY= 'pm4py:param:timestamp_key'¶
-
TOKEN_REPLAY_VARIANT= 'token_replay_variant'¶
-
pm4py.simulation.montecarlo.simulator module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.simulation.montecarlo.simulator.Variants[source]¶ Bases:
enum.EnumAn enumeration.
-
PETRI_SEMAPH_FIFO= <module 'pm4py.simulation.montecarlo.variants.petri_semaph_fifo' from '/home/docs/checkouts/readthedocs.org/user_builds/pm4py-source/checkouts/stable/pm4py/simulation/montecarlo/variants/petri_semaph_fifo.py'>¶
-
-
pm4py.simulation.montecarlo.simulator.apply(log, net, im, fm, variant=<Variants.PETRI_SEMAPH_FIFO: <module 'pm4py.simulation.montecarlo.variants.petri_semaph_fifo' from '/home/docs/checkouts/readthedocs.org/user_builds/pm4py-source/checkouts/stable/pm4py/simulation/montecarlo/variants/petri_semaph_fifo.py'>>, parameters=None)[source]¶ Performs a Monte Carlo simulation of an accepting Petri net without duplicate transitions and where the preset is always distinct from the postset
Parameters: log – Event log
net – Accepting Petri net without duplicate transitions and where the preset is always distinct from the postset
im – Initial marking
fm – Final marking
variant – Variant of the algorithm to use: - Variants.PETRI_SEMAPH_FIFO
parameters –
- Parameters of the algorithm:
Parameters.PARAM_NUM_SIMULATIONS => (default: 100) Parameters.PARAM_FORCE_DISTRIBUTION => Force a particular stochastic distribution (e.g. normal) when the stochastic map is discovered from the log (default: None; no distribution is forced) Parameters.PARAM_ENABLE_DIAGNOSTICS => Enable the printing of diagnostics (default: True) Parameters.PARAM_DIAGN_INTERVAL => Interval of time in which diagnostics of the simulation are printed (default: 32) Parameters.PARAM_CASE_ARRIVAL_RATIO => Case arrival of new cases (default: None; inferred from the log) Parameters.PARAM_PROVIDED_SMAP => Stochastic map that is used in the simulation (default: None; inferred from the log) Parameters.PARAM_MAP_RESOURCES_PER_PLACE => Specification of the number of resources available per place (default: None; each place gets the default number of resources) Parameters.PARAM_DEFAULT_NUM_RESOURCES_PER_PLACE => Default number of resources per place when not specified (default: 1; each place gets 1 resource and has to wait for the resource to finish) Parameters.PARAM_SMALL_SCALE_FACTOR => Scale factor for the sleeping time of the actual simulation (default: 864000.0, 10gg) Parameters.PARAM_MAX_THREAD_EXECUTION_TIME => Maximum execution time per thread (default: 60.0, 1 minute)
Returns: simulated_log – Simulated event log
simulation_result –
- Result of the simulation:
Outputs.OUTPUT_PLACES_INTERVAL_TREES => inteval trees that associate to each place the times in which it was occupied. Outputs.OUTPUT_TRANSITIONS_INTERVAL_TREES => interval trees that associate to each transition the intervals of time in which it could not fire because some token was in the output. Outputs.OUTPUT_CASES_EX_TIME => Throughput time of the cases included in the simulated log Outputs.OUTPUT_MEDIAN_CASES_EX_TIME => Median of the throughput times Outputs.OUTPUT_CASE_ARRIVAL_RATIO => Case arrival ratio that was specified in the simulation Outputs.OUTPUT_TOTAL_CASES_TIME => Total time occupied by cases of the simulated log
Deprecated since version 2.2.5: This will be removed in 3.0. Use the pm4py.algo.simulation.montecarlo package
Module contents¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.