-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
60 lines (42 loc) · 1.58 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
import src.test_tools
import src.parsers
import src.path_finder as pf
import elements
import simulation_tools
import checker
import page_generator
# Create utility classes
parser = src.parsers.BPMNParser()
page_generator = page_generator.HTMLPageGenerator()
def default_project_study():
# Define project origin file.
file_name = "ControlSystemProject.xml"
format_ = file_name.split(".")
format_ = format_[-1]
# Create project class instance
# The parse function takes in file format and
project = parser.parse(file_name, format_, False)
try:
checker.Checker.check_project(project)
except Exception as fault:
print(f"Cant use project, {fault}")
else:
# Generate page with default template and store_location
# The time limit dates are set here, they can be changed by editing dates
# ex:
# page_generator.default_page_generation(project, height_range=(2, 10, 9), velocity_range=(0.1, 2.0, 0.1))
dates = (51, 52, 53)
# default_page_generation(project, sim_count, gate_name, dates)
page_generator.default_page_generation(project, 1000, "MidProject", dates)
while True:
open_file_query = input("Do you want to open the study?[y / n]")
if not open_file_query or open_file_query == "y":
os.system(str(pf.PathFinder.get_file_path("study.html", "templates")))
break
elif open_file_query == "n":
break
else:
pass
if __name__ == '__main__':
default_project_study()