Skip to content

Commit

Permalink
Extract case_arrival_model to pix-framework.discovery.case_arrival
Browse files Browse the repository at this point in the history
  • Loading branch information
iharsuvorau committed May 19, 2023
1 parent edfbfa9 commit 9a24587
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 179 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "simod"
version = "3.5.0"
version = "3.5.1"
authors = ["Manuel Camargo", "Ihar Suvorau", "David Chapela"]
description = "Simod is a Python tool for automated discovery of business process simulation models from event logs."

Expand Down
2 changes: 1 addition & 1 deletion src/simod/optimization/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pandas as pd
from extraneous_activity_delays.config import SimulationModel
from pix_framework.discovery.case_arrival import discover_case_arrival_model
from pix_framework.discovery.gateway_probabilities import GatewayProbabilities
from pix_framework.filesystem.file_manager import get_random_folder_id, get_random_file_id, create_folder

Expand All @@ -20,7 +21,6 @@
from simod.settings.simod_settings import SimodSettings, PROJECT_DIR
from simod.settings.temporal_settings import CalendarSettings
from simod.simulation.parameters.BPS_model import BPSModel
from simod.simulation.parameters.case_arrival_model import discover_case_arrival_model
from simod.simulation.parameters.miner import mine_parameters
from simod.simulation.parameters.resource_model import discover_resource_model
from simod.simulation.prosimos import simulate_and_evaluate
Expand Down
2 changes: 1 addition & 1 deletion src/simod/simulation/parameters/BPS_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from pathlib import Path
from typing import Optional, List

from pix_framework.discovery.case_arrival import CaseArrivalModel
from pix_framework.discovery.gateway_probabilities import GatewayProbabilities

from simod.simulation.parameters.case_arrival_model import CaseArrivalModel
from simod.simulation.parameters.resource_model import ResourceModel


Expand Down
169 changes: 0 additions & 169 deletions src/simod/simulation/parameters/case_arrival_model.py

This file was deleted.

3 changes: 1 addition & 2 deletions src/simod/simulation/parameters/miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pandas as pd
from networkx import DiGraph
from pix_framework.calendar.resource_calendar import RCalendar
from pix_framework.discovery.case_arrival import discover_case_arrival_calendar, discover_inter_arrival_distribution
from pix_framework.discovery.gateway_probabilities import GatewayProbabilitiesDiscoveryMethod, GatewayProbabilities, \
compute_gateway_probabilities
from pix_framework.io.bpm_graph import BPMNGraph
Expand All @@ -16,8 +17,6 @@
from simod.simulation.calendar_discovery import resource as resource_calendar
from simod.simulation.calendar_discovery.resource import full_day_schedule, working_hours_schedule, \
UNDIFFERENTIATED_RESOURCE_POOL_KEY
from simod.simulation.parameters.case_arrival_model import discover_case_arrival_calendar, \
discover_inter_arrival_distribution
from simod.simulation.parameters.intervals import Interval, intersect_intervals, prosimos_interval_to_interval_safe, \
pd_interval_to_interval
from simod.simulation.parameters.resource_activity_performances import ActivityResourceDistribution, \
Expand Down
2 changes: 1 addition & 1 deletion tests/test_calendars.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import pandas as pd
import pytest
from pix_framework.discovery.case_arrival import discover_case_arrival_calendar
from pix_framework.input import read_csv_log
from pix_framework.log_ids import APROMORE_LOG_IDS
from prosimos.resource_calendar import CalendarFactory

from simod.discovery.resource_pool_discoverer import ResourcePoolDiscoverer
from simod.event_log.utilities import read, convert_xes_to_csv
from simod.simulation.parameters.case_arrival_model import discover_case_arrival_calendar


@pytest.mark.integration
Expand Down
2 changes: 1 addition & 1 deletion tests/test_discovery/test_inter_arrival_distribution.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest
from pix_framework.discovery.case_arrival import discover_inter_arrival_distribution
from pix_framework.log_ids import DEFAULT_XES_IDS

from simod.event_log.utilities import read
from simod.simulation.parameters.case_arrival_model import discover_inter_arrival_distribution

test_cases = [
{
Expand Down
4 changes: 2 additions & 2 deletions tests/test_process_structure/test_optimizer.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import pytest
from pix_framework.discovery.case_arrival import discover_case_arrival_model
from pix_framework.filesystem.file_manager import get_random_folder_id, create_folder
from pix_framework.log_ids import DEFAULT_XES_IDS

from simod.event_log.event_log import EventLog
from simod.control_flow.optimizer import ControlFlowOptimizer
from simod.control_flow.settings import HyperoptIterationParams
from simod.event_log.event_log import EventLog
from simod.settings.control_flow_settings import ControlFlowSettings
from simod.settings.simod_settings import PROJECT_DIR
from simod.settings.temporal_settings import CalendarSettings
from simod.simulation.parameters.BPS_model import BPSModel
from simod.simulation.parameters.case_arrival_model import discover_case_arrival_model
from simod.simulation.parameters.resource_model import discover_resource_model

structure_config_sm3 = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_simulation/test_calendar_discovery.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import pytest
from pix_framework.calendar.resource_calendar import RCalendar
from pix_framework.discovery.case_arrival import discover_case_arrival_calendar
from pix_framework.input import read_csv_log
from pix_framework.log_ids import APROMORE_LOG_IDS

from simod.simulation.calendar_discovery.resource import discover_undifferentiated, discover_per_resource_pool, \
discover_per_resource
from simod.simulation.parameters.case_arrival_model import discover_case_arrival_calendar


@pytest.mark.integration
Expand Down

0 comments on commit 9a24587

Please sign in to comment.