-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
61 lines (45 loc) · 1.76 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
60
61
"""
Created on Tuesday Dec 4 18:00 2018
@author: mate.pentek@tum.de
Partially based on the BSc Thesis of Benedikt Schatz (TUM, Statik 2018)
"""
from matplotlib import pyplot as plt
from os.path import join as join_path
from utilities.plot_utilities import save_to_pdf
from analysis import Analysis
from cremona_plan import cremona_plan
# select the desired input file by index from the list
input_files = {1: 'sample_input',
2: 'sample_input_mod1',
3: 'sample_input_mod2',
4: 'double_arch_kinematic_top_load',
5: 'double_arch_kinematic_top_load_mod1',
6: 'double_arch_kinematic_bottom_load',
7: 'double_arch_top_load',
8: 'double_arch_bottom_load',
9: 'double_arch_kinematic_top_load_mod2',
10: 'BC_belastet ', # not in equilibrium
11: 'geknicktes_System',
12: 'simple system',
13: 'Beispiel_theorie',
14: 'Beispiel_Programmierung'}
selected_file_idx =14
##
##
# filename for import
input_folder = 'input'
input_file_name = input_files[selected_file_idx] + '.json'
json_name = join_path(input_folder, input_file_name)
# output settings
output_folder = 'output'
output_file_name_prefix = 'report_'
# create analysis and run
#sample_analysis = Analysis(json_name,echo_level=1)
sample_analysis = Analysis(json_name)
sample_analysis.solve_system()
sample_cremona_plan = cremona_plan(sample_analysis)
sample_analysis.postprocess(sample_cremona_plan)
save_to_pdf(join_path(output_folder, output_file_name_prefix +
input_files[selected_file_idx]))
# save_to_pdf(output_file_path) PM
plt.show()