iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
dicebox.Razitko: new DiceBox d9c1c9cdec94601bce9e81861ce1d4dfb5393481 I am 2021-02-05 08:04:28
simplex.Triangulation: little changes dc1efc3a081073d57be0f7a06330eb97f9634447 I am 2021-02-05 08:02:57
schemes: fix 126ba1c061474b3a9c02ce66d109ef6f8a39703a Alex 2021-02-03 08:28:28
schemes: new module af427a6a8c5e26f5b4a5930af188e40c882f9863 I am 2021-02-03 08:00:06
simplex: rework Triangulation, add FullCubatureTriangulation bdbb5a64a868cbf7c60d2bfeb8729e54bc81d347 I am 2021-02-03 05:14:32
dicebox: empty simplex fix 9b3b24a268a4d238ec6946f33d2c6ffe7d57dbfe Alex 2021-01-28 11:07:32
qt_plot.SimplexErrorGraph: finish 6fce1097d34c86c9b30c749e5b8cc2e4d8e7541d I am 2021-01-26 11:36:13
stm_df: finish get_tri_data_frame() 454bd2725a75f5a3f3851998693c4f85630fb30b I am 2021-01-22 20:43:36
stm_df: WIP bd99b8f3b8623a65c0bf0e3c22d9e67d8bce6a2c Alex 2021-01-21 15:27:11
stm_df: WIP f61a963c04764066bdd2bb9a363c51ec1c4fb389 Alex 2021-01-18 10:01:23
dicebox.Chrt: add design support 7426717fe5b3bbf299e44a92b2aca2672b752042 Alex 2021-01-15 09:30:28
design_proof_of_concept a1c9fc6ce6739e745382bdc1bfc6183a8c2a2f16 Alex 2021-01-14 22:58:01
estimation: rework simplex estimations, add cubature and design support 01dc64d5fa9afeda8326b90a71af71ede46fd8f8 Alex 2021-01-14 21:41:12
simplex.Triangulation: WIP 44bdae7876aac717f3d34c4bc6c818fc4ec65169 Alex 2021-01-13 10:43:59
simplex.Triangulation: WIP 47fe5e817878bc6bfd43db208d256a60ee573f9c Alex 2021-01-12 15:41:32
simplex.Triangulation: WIP 57f90b4ae9608d3f2fb5bc081934fa17523998f5 Alex 2021-01-10 11:12:30
simplex.get_failure_ratio() added 65e2940cfa549236cfb09a0e7cadb576a471070f Alex 2021-01-09 09:40:12
simplex.Shull: design support added fe2c0c6b23b32ce99aaa0f824424b32694978615 Alex 2021-01-07 14:22:58
IS_stat: add IS_norm() method 6d1d11c4591143a26c92551ec3f722ea642711ae Alex 2021-01-07 05:33:21
misc: add comment 3d735585d49ac9d5f831b860cf95d3f41fd0d93e I am 2021-01-04 10:29:24
Commit d9c1c9cdec94601bce9e81861ce1d4dfb5393481 - dicebox.Razitko: new DiceBox
Author: I am
Author date (UTC): 2021-02-05 08:04
Committer name: I am
Committer date (UTC): 2021-02-05 08:04
Parent(s): dc1efc3a081073d57be0f7a06330eb97f9634447
Signer:
Signing key:
Signing status: N
Tree: 42e08138d6b11ca524c839d578d76c98f40ed04d
File Lines added Lines deleted
dicebox.py 178 0
File dicebox.py changed (mode: 100644) (index a800509..c99ff6d)
... ... class Erjee(Chrt):
919 919
920 920
921 921
922
923
924
925
926
927
928 # MinEnergyCensoredSampling
929 class Razitko(Erjee):
930 #č už mě to dědění nebaví
931 #ё без поллитры было не разобраться, что этот слоёный пирог делал
932 def __init__(bx, sample_object, scheme, tri_space='Rn', tree_space=None,\
933 sampling_space=None, kechato_space='U', potencial='psee',\
934 p_norm=2, budget=1000, \
935 LHS_correction=False, design=None):
936
937 bx.scheme = scheme
938 bx.tri_space = tri_space
939 if tree_space is None:
940 bx.tree_space = tri_space
941 else:
942 bx.tree_space = tree_space
943
944 if sampling_space is None:
945 bx.sampling_space = tri_space
946 else:
947 bx.sampling_space = sampling_space
948
949
950 bx.kechato_space = kechato_space
951 bx.budget = budget
952 bx.p_norm = p_norm
953 bx.potencial = potencial
954 bx.LHS_correction = LHS_correction
955 bx.design = design
956
957 # for current candidates
958 # kandidaty musí být 'judged' a 'assessed'
959 # viz. regen()
960 #bx.candidates_index = dict()
961 # krám, přece třidíme odpad!
962 bx.former_candidates = []
963 bx.unjudged_candidates = []
964
965 super().__init__(sample_object)
966
967 # přidávání vzorků musí bejt explicitní!
968 # def add_sample(bx, input_sample):
969 # bx._logger(msg="we have got new data:", data=input_sample)
970 # bx.sample_box.add_sample(input_sample)
971 # # tohle musí převest rozdělení vstupního vzorku na vlastní rozdělení skříňky
972 # #inner_sample = bx.sample_box.new_sample(input_sample)
973 # #bx.increment(inner_sample)
974
975 def init_parameters(bx):
976 """
977 Returns dictionary of parameters the DiceBox was initialized with
978 """
979 return {'sample_object':bx.sample_box, 'scheme':bx.scheme.name,\
980 'tri_space':bx.tri_space, 'tree_space':bx.tree_space,\
981 'sampling_space':bx.sampling_space, 'kechato_space':bx.kechato_space,\
982 'potencial':bx.potencial, 'p_norm':bx.p_norm, 'budget':bx.budget,\
983 'LHS_correction':bx.LHS_correction, 'design':str(bx.design)}
984
985 def _regen_inside(bx):
986 failsi = bx.failsi
987 if np.any(failsi) and not np.all(failsi):
988 #bx._logger(msg="triangulation started")
989 bx.__regen_inside()
990 else:
991 #č jíž není nutný
992 #bx.simplex_stats = dict() # for .get_pf_estimation()
993 bx._logger(msg="triangulation skipped")
994
995 def __regen_inside(bx):
996 # create .tri triangulation
997 if bx.nsim > bx.nvar + 1: # incremental triangulation require one more point
998 try:
999 # I'll use tri_space as a weigthing space
1000 # It could be separeted, but I am a little bit tired
1001 # from so much different spaces over there
1002 bx.Tri = sx.FastCubatureTriangulation(bx.samplebox, bx.scheme,\
1003 tri_space=bx.tri_space, issi=bx.siss, \
1004 weighting_space=bx.tri_space, incremental=True,\
1005 on_add_simplex=bx._on_add_simplex,\
1006 on_delete_simplex=bx._invalidate_simplex)
1007
1008 bx.Tri.integrate()
1009 #č tri - Deloneho triangulace
1010 bx.tri = bx.Tri.tri #č všichní tam očekávajou QHull
1011
1012 except BaseException as e:
1013 #č chcu zachytit spadnuti QHull na začatku,
1014 #č kdy ještě není dostatek teček.
1015 #č Jinak je třeba nechat QHull spadnout
1016 if bx.nsim > 2*bx.nvar + 3:
1017 #č no to teda ne!
1018 raise
1019 else:
1020 #č lze přípustit chybu triangulace
1021 bx._logger(msg='triangulation failed')
1022
1023
1024 #č tato funkce běží 91% času
1025 # bottleneck function
1026 def _handle_changed_triangulation(bx, input_sample):
1027 """
1028 Triangulace zajistěně existuje
1029 """
1030 bx.Tri.update()
1031
1032
1033 def get_pf_estimation(bx):
1034 #č dle toho, čo vidím v kódu (spouští nás .increment())
1035 #č přinejmenším konvexní obálka
1036 #č zajištěně existuje
1037 if 'tri' in dir(bx):
1038 return bx.Tri.get_pf_estimation()
1039
1040 #оӵ триангуляци ӧвӧл, иськем...
1041 #č dostaneme vyrovnané odhady Brna-města (-2) a Brna-venkova (-1)
1042 pf_inside = bx.siss.estimations[-2]
1043 pf_outside = bx.siss.estimations[-1]
1044
1045 if np.all(bx.failsi):
1046 #č veškerej vnitršek je v poruše
1047 # -1=outside, 0=success, 1=failure, 2=mix
1048 return {'TRI_estimation': {-1:pf_outside, 0:0, 1:pf_inside, 2:0}, \
1049 'vertex_estimation' : pf_inside, \
1050 'weighted_vertex_estimation' : pf_inside}
1051
1052 else:
1053 #č vnitršek je asi v pořadku
1054 # -1=outside, 0=success, 1=failure, 2=mix
1055 return {'TRI_estimation': {-1:pf_outside, 0:pf_inside, 1:0, 2:0}, \
1056 'vertex_estimation' : 0, \
1057 'weighted_vertex_estimation' : 0}
1058
1059
1060 #č bejvalej .estimate_simplex()
1061 #č teď je to kolbek, který volá Triangulation
1062 def _on_add_simplex(bx, box=None, indices=None, simplex=None, nodes=None, cell_stats=None):
1063 if cell_stats['event'] == 'mix':
1064 candidates = CandyBox(nodes, event_id=np.full(len(nodes), 2, dtype=np.int8))
1065
1066 #č vyhodnotíme je
1067 bx.assess_candidates(candidates)
1068
1069 #č vzorky je třeba přidát ke kandidatům
1070 #č jako, nic nepokazí, ale čo tam připadně bylo - přepíše
1071 bx.candidates_index[tuple(indices)] = candidates
1072
1073 # callback
1074 #č sx.on_delete_simplex(indices=indices)
1075 def _invalidate_simplex(bx, indices):
1076 simplex = tuple(indices)
1077
1078 if simplex in bx.candidates_index:
1079 bx.candidates_index.pop(simplex)
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
922 1100 class FullSimpleX: class FullSimpleX:
923 1101 def export_estimation(bx): def export_estimation(bx):
924 1102 bx.siss.get_estimations() bx.siss.get_estimations()
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main