Event utilities
- class ontologysim.ProductionSimulation.utilities.event_utilities.EventUtilities(simCore)
Bases:
object
transform on event onto to dict or provides additionally info to position
- calc_position_dict()
gets additional information (queueing) to a position, these information are saved in the position dict
- calc_process_dict()
gets additional information (machine) to a process, these information are saved in the process dict
- transformEventListToDict(event_list)
transform event_list to a dict, empty values are not saved
- Parameters:
event_list – [vent_name, time, ……]
- Returns:
dict
- transformEventListToFullDict(event_list)
transform event_list to a dict, empty values are saved
- Parameters:
event_list – [event_name, time, ……]
- Returns:
dict
- transformEventLoggerOntoToList(event_onto)
transform an event logger onto to a list
- Parameters:
event_onto – onto: event_logger (not normal event)
- Returns:
[event_name, time, ……]
- transformEventOntoToDict(event_onto)
saves an event_onto to a dict, the empty values are not saved
- Parameters:
onto – event_logger (not normal event)
- Returns:
dict
- transformEventOntoToFullDict(event_onto)
saves an event_onto to a dict, also the empty values are saved
- Parameters:
onto – event_logger (not normal event)
- Returns:
dict
- transfromEventOntoToList(event_onto)
- Parameters:
event_onto – onto: event_logger (not normal event)
- Returns:
Init utilities
- class ontologysim.ProductionSimulation.utilities.init_utilities.IniDict(dictInformation, time=0)
Bases:
Init
read dict and transform into configparser
Path utilities
- class ontologysim.ProductionSimulation.utilities.path_utilities.PathTest
Bases:
object
Tests the given paths
- classmethod check_dir_path(path)
transform a relative path of a dir to a full path
- Parameters:
path – path
- Returns:
full_path
- classmethod check_dir_path_current_dir_given(path, current_dir)
- Parameters:
path –
current_dir –
- Returns:
- classmethod check_file_path(path)
transform a relative path to a full path
- Parameters:
path – path
- Returns:
full_path
- classmethod check_file_path_current_dir_given(path, current_dir)
check file without current_main_dir :param path: :param current_dir: :return: string path
- classmethod check_file_path_libary(path)
- classmethod create_new_folder(path, folder_name)
creates a new folder
- Parameters:
path – str
folder_name – str
- Returns:
full path
- current_main_dir = ''
Pnml utilities
- class ontologysim.ProductionSimulation.utilities.pnml_utilities.PnmlTest
Bases:
object
Tests a given Pnml file
- classmethod check_pnml(net)
deprecated checks if the structure of the pnml is correct checked: - sink, source available? - check in and out arc - check if every place is connected
- Parameters:
net – pnml-net
- Returns:
bool
# place.name==id # transistion.name == id # transistion.label == text
# transistion.label != place
Deprecated since version 0.1.0: pm4py excluded
Sub class utilities
- class ontologysim.ProductionSimulation.utilities.sub_class_utilities.SubClassUtility
Bases:
object
given a parent class and it finds all sub classes
- classmethod get_all_subclasses(python_class)
Helper function to get all the subclasses of a class.
- Parameters:
python_class – Any Python class that implements __subclasses__()
- Returns:
[]
- classmethod get_all_subclasses_dict(python_class)
Helper function to get all the subclasses of a class.
- Parameters:
python_class – Any Python class that implements __subclasses__()
- Returns:
dict