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.Chrt: optimizations 6f8c6f07be9e4d26f8371adce86020533b20de03 Олёш 2020-10-05 22:39:40
dicebox.Chrt: (I hope) last optimizations 080cfa059e4e86eab9659209ec0444fe7284081e Олёш 2020-10-05 14:42:42
dicebox: Chrt is ready c71f42a245818b41b49c9ed9d82b235a713e7562 Олёш 2020-10-05 04:28:08
dicebox: WIP 680a62be35cf31854d91e96bb8debcca283fb53f Олёш 2020-10-02 02:03:44
f_models: little fix, accidentally came in mind 3944ab574ad68434d9310e25f2aff730e6204328 Олёш 2020-10-02 02:02:33
shapeshare, dicebox: let's try new names 4adeaac518cc1bd304e966c9502b19a72ec50c39 Олёш 2020-10-01 18:30:52
IS_stat: cycle fix in ISSI.delete_event_data() aa7667add8d6ebf9338d33a23c769681340c7742 Олёш 2020-09-30 23:22:41
simplex: novej bombastickej... ok, I mean, new elegant Shull object 28375fa49a07057f09f1afeb8d4916b0f1bc87ac Олёш 2020-09-30 23:18:25
blackbox, simplex: WIP f66479b0e3f8ce8866466a263cd80ba227098c82 Олёш 2020-09-29 00:57:33
blackbox, simplex: WIP 255033055fd2db7ab1445618cfe476c14b527d22 Олёш 2020-09-28 19:58:06
simplex: helper functions are prepared df48adbb92dd80421d0ec4e6c087db7919cda7c7 Олёш 2020-09-28 17:42:24
blackbox: .regen() refactoring 4064e769a19cc853028701853ff29de53782b08c Олёш 2020-09-27 01:24:34
blackbox: little refactoring c3669a2889c1b7056113c70d0b7bb1bb9aaa6593 Олёш 2020-09-26 15:13:48
IS_stat.ISSI: ZeroDivisionError fix 981eb1025f4059497172a0c6b71bee3fb9516a14 Олёш 2020-09-15 22:26:36
blackbox: BlackSimpleX is ready 683da8add2bafd4da2352b2e8fdabdb416daa02e Олёш 2020-09-15 22:25:00
blackbox: simplex optimalization WIP d81905dc1b143b6b6cbf8148a08469fe6227fea5 Олёш 2020-09-15 17:31:50
qt_plot: equal aspect option added 3c1325528bf84d42252a6e68e9649c38bbf2aa98 I am 2020-09-10 00:51:41
qt_plot: QSplitter is applied for estimation widgets 3f8733dbc62b341e1e53bb68ec044229beb86ff7 I am 2020-09-10 00:09:05
IS_stat: little fix in ISSI.get_estimations() 419c963e3188a6286af1f13fe9d69893c3036630 I am 2020-09-09 18:49:28
gl_plot: changes from qt_plot backported f6267793c711e877587ba1208b5a7638925e186d Alex 2020-09-09 17:47:48
Commit 6f8c6f07be9e4d26f8371adce86020533b20de03 - dicebox.Chrt: optimizations
Author: Олёш
Author date (UTC): 2020-10-05 22:39
Committer name: Олёш
Committer date (UTC): 2020-10-05 22:39
Parent(s): 080cfa059e4e86eab9659209ec0444fe7284081e
Signer:
Signing key:
Signing status: N
Tree: 350126cf15b745922b6419f227ccea47938fcd42
File Lines added Lines deleted
dicebox.py 66 49
File dicebox.py changed (mode: 100644) (index a55f6d7..30d74d7)
... ... class Chrt(DiceBox):
381 381
382 382 #č vyhodil jsem simplex_id'y #č vyhodil jsem simplex_id'y
383 383 bx.simplex_events = bx.get_events() bx.simplex_events = bx.get_events()
384 #č ty množiny jsou tak trošku overkill, ale budiž
385 bx.simplices_set = set()
384 386 for simplex in bx.tri.simplices: for simplex in bx.tri.simplices:
385 387 # zde jen počítame # zde jen počítame
386 388 bx.estimate_simplex(simplex) bx.estimate_simplex(simplex)
 
... ... class Chrt(DiceBox):
397 399
398 400
399 401
400
402 #č beží 99% času
401 403 def increment(bx, input_sample): def increment(bx, input_sample):
402 404 #ё ну нахрен это ваше наследование-расследование #ё ну нахрен это ваше наследование-расследование
403 405
 
... ... class Chrt(DiceBox):
425 427
426 428
427 429
428
430 #č tato funkce běží 91% času
431 # bottleneck function
429 432 def _handle_changed_triangulation(bx, input_sample): def _handle_changed_triangulation(bx, input_sample):
430 433 """ """
431 434 Triangulace zajistěně existuje Triangulace zajistěně existuje
 
... ... class Chrt(DiceBox):
446 449 # předpokladám, že se počet simplexů přidaním bodů nezměnší # předpokladám, že se počet simplexů přidaním bodů nezměnší
447 450 equal_mask = former_simplices == bx.tri.simplices[:len(former_simplices)] equal_mask = former_simplices == bx.tri.simplices[:len(former_simplices)]
448 451
452
453 #č zde spolehám na to, že pořadí indexů se nikdy nezmění
454 #č (dá se něco takovýho očekavát podle toho co jsem čet v dokumentaci)
455
449 456 #č u těch přečíslovaných zkolntrolujeme, zda fakt v té triangulaci nejsou #č u těch přečíslovaných zkolntrolujeme, zda fakt v té triangulaci nejsou
450 457 for simplex in former_simplices[~equal_mask.all(axis=1)]: for simplex in former_simplices[~equal_mask.all(axis=1)]:
451 458 #č když tam je #č když tam je
452 459 #č každopadně tohle je rychlejší než přepočet spousty simplexů #č každopadně tohle je rychlejší než přepočet spousty simplexů
453 isin = np.any(np.all(np.isin(bx.tri.simplices, simplex),axis=1))
460 #isin = np.any(np.all(np.isin(bx.tri.simplices, simplex),axis=1))
461 # few times faster
462 isin = (bx.tri.simplices == simplex).all(axis=1).any()
454 463 if not isin: if not isin:
455 464 bx._invalidate_simplex(simplex) bx._invalidate_simplex(simplex)
456 465
 
... ... class Chrt(DiceBox):
458 467
459 468 # změněné simplexy přepočítáme # změněné simplexy přepočítáme
460 469 for simplex in bx.tri.simplices[:len(former_simplices)][~equal_mask.all(axis=1)]: for simplex in bx.tri.simplices[:len(former_simplices)][~equal_mask.all(axis=1)]:
461 bx.estimate_simplex(simplex)
470 #č ty množiny jsou tak trošku overkill, ale budiž
471 if tuple(simplex) not in bx.simplices_set:
472 bx.estimate_simplex(simplex)
462 473
463 474
464 475 # teď nové simplexy # teď nové simplexy
465 476 # simplexy свежего разлива # simplexy свежего разлива
466 477 for simplex in bx.tri.simplices[len(former_simplices):]: for simplex in bx.tri.simplices[len(former_simplices):]:
467 bx.estimate_simplex(simplex)
478 #č ty množiny jsou tak trošku overkill, ale budiž
479 if tuple(simplex) not in bx.simplices_set:
480 bx.estimate_simplex(simplex)
468 481
469 482
470 483
 
... ... class Chrt(DiceBox):
690 703 #č Našim úkolem je zjistit co je simplex zač #č Našim úkolem je zjistit co je simplex zač
691 704 #č a ty zelené ignorovat #č a ty zelené ignorovat
692 705
693 #č zde spolehám na to, že pořadí těch indexů se nikdy nezmění
694 #č (dá se něco takovýho očekavát podle toho co jsem čet v dokumentaci)
695 if not tuple(indices) in bx.simplex_stats:
696
697 # I'll use tree_space as a weigthing space
698 # It could be separeted, but I am a little bit tired
699 # from so much different spaces over there
700 event, event_id, fr, wfr = sx.get_indices_event(bx, indices, bx.tree_space)
701
702 # -1 = 'outside', 0=success, 1=failure, 2=mix
703 if event_id != 0:
704 #оӵ чылкыт f_model
705 #č do sample_simplexu musíme poslat čístý f_model
706 # we should send pure f_model to sample_simplex()
707 vertices = bx.f_model[indices]
708 print("estimate", indices)
709 h_plan, convex_hull, simplex_measure = sx.sample_simplex(vertices,\
710 model_space=bx.tri_space, sampling_space=bx.sampling_space, nis=bx.simplex_budget)
706 #č ty množiny jsou tak trošku overkill, ale budiž
707 bx.simplices_set.add(tuple(indices))
708
709
710 # I'll use tree_space as a weigthing space
711 # It could be separeted, but I am a little bit tired
712 # from so much different spaces over there
713 event, event_id, fr, wfr = sx.get_indices_event(bx, indices, bx.tree_space)
714
715 # -1 = 'outside', 0=success, 1=failure, 2=mix
716 if event_id != 0:
717 #оӵ чылкыт f_model
718 #č do sample_simplexu musíme poslat čístý f_model
719 # we should send pure f_model to sample_simplex()
720 vertices = bx.f_model[indices]
721 print("estimate", indices)
722 h_plan, convex_hull, simplex_measure = sx.sample_simplex(vertices,\
723 model_space=bx.tri_space, sampling_space=bx.sampling_space, nis=bx.simplex_budget)
724
725
726 fm = simplex_measure * fr
727 wfm = simplex_measure * wfr
728
729 #č ISSI tu nemáme, místo toho prostě ukladáme co máme do slovníku
730 bx.simplex_stats[tuple(indices)] = (event_id, simplex_measure, fm, wfm)
731
732 mask = ~h_plan.is_outside
733 if event == 'mix':
711 734
735 candidates = h_plan[mask]
736 #bx._former_candidates_recovering(candidates, convex_hull, bx.unjudged_candidates)
737 bx._former_candidates_recovering(candidates, convex_hull, bx.former_candidates)
712 738
713 fm = simplex_measure * fr
714 wfm = simplex_measure * wfr
739 candidates.event_id = np.full(len(candidates), event_id, dtype=np.int8)
740 #candidates.simplex = np.full((len(candidates), bx.nvar+1), indices)
715 741
716 #č ISSI tu nemáme, místo toho prostě ukladáme co máme do slovníku
717 bx.simplex_stats[tuple(indices)] = (event_id, simplex_measure, fm, wfm)
742 #č vyhodnotíme je
743 bx.assess_candidates(candidates)
718 744
719 mask = ~h_plan.is_outside
720 if event == 'mix':
721
722 candidates = h_plan[mask]
723 bx._former_candidates_recovering(candidates, convex_hull, bx.unjudged_candidates)
724 bx._former_candidates_recovering(candidates, convex_hull, bx.former_candidates)
725
726 candidates.event_id = np.full(len(candidates), event_id, dtype=np.int8)
727 #candidates.simplex = np.full((len(candidates), bx.nvar+1), indices)
728
729 #č vyhodnotíme je
730 bx.assess_candidates(candidates)
731
732 #č vzorky je třeba přidát ke kandidatům
733 #č jako, nic nepokazí, ale čo tam připadně bylo - přepíše
734 bx.candidates_index[tuple(indices)] = candidates
735
736
737 745 #č vzorky je třeba přidát ke kandidatům #č vzorky je třeba přidát ke kandidatům
738 #č zás nakladaní s odpadem...
739 #bx.unjudged_candidates.append(h_plan[~mask])
740 #č roušky jsou dráhé
741 bx.unjudged_candidates.append(h_plan)
746 #č jako, nic nepokazí, ale čo tam připadně bylo - přepíše
747 bx.candidates_index[tuple(indices)] = candidates
748
749
750 #č vzorky je třeba přidát ke kandidatům
751 #č zás nakladaní s odpadem...
752 #bx.unjudged_candidates.append(h_plan[~mask])
753 #č roušky jsou dráhé
754 bx.unjudged_candidates.append(h_plan)
742 755
743 756
744 757 #č vyhodil jsem simplex_id'y #č vyhodil jsem simplex_id'y
745 758 def _invalidate_simplex(bx, indices): def _invalidate_simplex(bx, indices):
746 759 simplex = tuple(indices) simplex = tuple(indices)
747 760
761 #č ten simplex tam musí být,
762 #č pokud teda bo boxu nikdo nesahá...
763 bx.simplices_set.remove(simplex)
764
748 765 if simplex in bx.simplex_stats: if simplex in bx.simplex_stats:
749 766 bx.simplex_stats.pop(simplex) bx.simplex_stats.pop(simplex)
750 767
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