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)
blackbox, OptimizedCensoredSampling: little refactoring, a little better performance 9825bf5531f52acb2af3bdc3b10b4c8c67101300 Олёш 2020-08-22 23:45:44
g_models: four_branch_2D refactored into the class FourBranch2D 5c60519a95121530e97e0a452b2c4ab8926c46fd I am 2020-08-21 21:45:14
LHS turned off, new test function 'Sball' 22057718d681144478dc5ea2b4e94c60394eb4c9 Miroslav Vořechovský 2020-08-13 15:53:55
gl_plot: ready 4c52875c06ecd32dddbbcb9d3638033ece5fb34b Alex 2020-08-11 01:42:53
gl_plot: SimplexEstimationWidget now almost works d25a5a4048d55090c53d63368882f3ae4027236f Alex 2020-08-10 23:34:29
gl_plot: už je to hustý ebcbd27e880f61bece09e126617cf46554f3a41d Alex 2020-08-10 18:26:44
gl_plot: WIP e9032c2b108b42630e8ae894ab9badf4ac4d2064 Alex 2020-08-10 07:27:45
gl_plot: WIP b746a2b7f175681bafbbabb4de8eaae673afdf9b Alex 2020-08-10 01:28:45
blackbox: optimized MinEnergy 6fc8e8bdf4ef1bfd2ae2a02a9b1231310794c0f2 Олёш 2020-08-08 00:09:10
blackbox: MinEnergyCensoredSampling: čístění -2 52ee13ca64742637edf6d05fd8c704f7bfd91cbe Олёш 2020-08-07 03:18:11
blackbox: MinEnergyCensoredSampling: candidates reworked to be more transparent 75018f40179a33136230a58bc03da52951e51f55 Олёш 2020-08-07 01:07:07
blackbox: little fix of p_outside in MinEnergyBlaBlaCensoringSampling f9defafad5f773f7715ed652a69434d5f06c48a3 Олёш 2020-08-06 22:10:32
qt_plot: CandidatesWidget added 1ae7241fe13df91c6df48324cd55774e8243c812 Олёш 2020-08-06 18:38:51
blackbox: KechatoTwoPointLukiskon added 2f2bb89e4a57742a7caf34375d5ce1b237d482c7 Олёш 2020-08-06 10:49:57
candybox: SettingWithCopyWarning disabled ac6951c3e667d3ba1cd128b1596955284439d53e Олёш 2020-08-06 10:46:10
blackbox: MinEnergyCensoredSampling is ready ba76383a0723c364aa44b79df51a320c0b8361cd Олёш 2020-08-04 10:12:25
blackbox: KechatoLukiskon comed back! 01237377ef931193951b7446561c88b4e10c0dae Олёш 2020-08-04 00:56:09
blackbox: WIP 897b4334a6a605702f9a3bfdccf57165a5dc1867 Олёш 2020-08-03 21:33:23
blackbox: WIP a59af121f46e67e275b39858ba38131c0002077d Олёш 2020-08-03 02:00:41
lukiskon comed back! blackbox WIP 2fc15ae88e89a4208149099a9e898e1a7448de31 Олёш 2020-08-02 21:56:24
Commit 9825bf5531f52acb2af3bdc3b10b4c8c67101300 - blackbox, OptimizedCensoredSampling: little refactoring, a little better performance
Author: Олёш
Author date (UTC): 2020-08-22 23:45
Committer name: Олёш
Committer date (UTC): 2020-08-22 23:45
Parent(s): 5c60519a95121530e97e0a452b2c4ab8926c46fd
Signer:
Signing key:
Signing status: N
Tree: c6bfb0a80879342659c5eb7ecfadcac454352a7b
File Lines added Lines deleted
blackbox.py 44 34
File blackbox.py changed (mode: 100644) (index 2f67a3e..4a921c5)
... ... class OptimizedCensoredSampling(MinEnergyCensoredSampling):
1337 1337
1338 1338
1339 1339
1340
1341 if len(bx.unjudged_candidates) > 0:
1342 #č prohrabeme odpad
1343 candidates = bx.unjudged_candidates.pop()
1344 for i in range(len(bx.former_candidates)):
1345 candidates.add_sample(bx.former_candidates.pop())
1346 for i in range(len(bx.unjudged_candidates)):
1347 candidates.add_sample(bx.unjudged_candidates.pop())
1340 #č prohrabeme odpad
1341 bx._judge_unjudged(bx.unjudged_candidates)
1342 bx._judge_unjudged(bx.former_candidates)
1348 1343
1349 1344
1350 mask = bx.is_outside(candidates)
1351 candidates = candidates[mask]
1352 1345
1353 1346
1347 else:
1348 bx._logger('Triangulace (zatím?) neexistuje')
1349 bx.regen()
1350
1351
1352
1353 def _judge_unjudged(bx, list):
1354 for i in range(len(list)):
1355 candidates = list.pop()
1356 bx.is_outside(candidates)
1357
1358 mask = candidates.is_outside
1359 if np.any(mask): #č pokud aspoň jeden bydlí mimo Brno
1360 candidates = candidates[mask]
1354 1361 candidates.simplex = candidates.event = np.full(len(candidates), -1, dtype=np.int8) candidates.simplex = candidates.event = np.full(len(candidates), -1, dtype=np.int8)
1355
1356
1357 1362 #č vyhodnotíme #č vyhodnotíme
1358 1363 bx.assess_candidates(candidates) bx.assess_candidates(candidates)
1359 1364 #č vzorky je třeba přidát ke kandidatům #č vzorky je třeba přidát ke kandidatům
1360 1365 # jako, nic nepokazí, ale čo tam připadně bylo - přepíše # jako, nic nepokazí, ale čo tam připadně bylo - přepíše
1361 1366 bx.candidates_index[-1].add_sample(candidates) bx.candidates_index[-1].add_sample(candidates)
1362
1363
1364
1365
1366 else:
1367 bx._logger('Triangulace (zatím?) neexistuje')
1368 bx.regen()
1369
1370 1367
1371 1368
1372 1369
1373 1370 def estimate_outside(bx): def estimate_outside(bx):
1374 1371 # předpokládám, že triangulece jíž existuje # předpokládám, že triangulece jíž existuje
1375
1372
1376 1373 # -1 = 'out', 0=success, 1=failure, 2=mix # -1 = 'out', 0=success, 1=failure, 2=mix
1377 1374 #current outside probability estimation #current outside probability estimation
1378 1375 try: try:
 
... ... class OptimizedCensoredSampling(MinEnergyCensoredSampling):
1384 1381 if p_out == 0: if p_out == 0:
1385 1382 p_out = 1/(bx.nsim + 1) p_out = 1/(bx.nsim + 1)
1386 1383 bx._logger(msg="suppose p_out=1/(bx.nsim + 1)="+str(p_out)) bx._logger(msg="suppose p_out=1/(bx.nsim + 1)="+str(p_out))
1387
1384
1385 #
1386 # get candidates!
1387 #
1388 1388 if p_out > 0.5: if p_out > 0.5:
1389 1389 # zužovat nechceme # zužovat nechceme
1390 1390 # trapit sa generacema taky ne # trapit sa generacema taky ne
1391 1391 candidates = IS_stat.IS(bx.f, bx.h, space_from_h='R', space_to_f=bx.sampling_space, Nsim=bx.budget) candidates = IS_stat.IS(bx.f, bx.h, space_from_h='R', space_to_f=bx.sampling_space, Nsim=bx.budget)
1392 1392
1393 1393 # nevím co tam bylo za h-ko, ale nechť IM zůstane 1 # nevím co tam bylo za h-ko, ale nechť IM zůstane 1
1394 implicit_multiplicator = 1
1394 #implicit_multiplicator = 1
1395 1395
1396 else: # tak deme... trapit sa generacema
1396 else: # tak jdeme... trapit sa generacema
1397 1397
1398 1398 sampling_r, __ = bx.sball.get_r_iteration(p_out) sampling_r, __ = bx.sball.get_r_iteration(p_out)
1399 1399 # asi tam bylo sampling_r/bx.base_r, že? # asi tam bylo sampling_r/bx.base_r, že?
1400 1400 # u stats.norm zadáváme směrodatnou odchylku, je to asi správné # u stats.norm zadáváme směrodatnou odchylku, je to asi správné
1401 1401 h = f_models.UnCorD([stats.norm(0, sampling_r/bx.base_r) for i in range(bx.nvar)]) h = f_models.UnCorD([stats.norm(0, sampling_r/bx.base_r) for i in range(bx.nvar)])
1402
1403 # for IS_stats
1404 #svar = (sampling_r/bx.base_r)**2 # svar like sampling_variance
1405 # něco takovýho bych nahrubo placnul
1406 #implicit_multiplicator = svar**bx.nvar * np.exp(bx.nvar/svar - bx.nvar)
1407
1408 1402 candidates = IS_stat.IS(bx.f, h, space_from_h='R', space_to_f=bx.sampling_space, Nsim=bx.budget) candidates = IS_stat.IS(bx.f, h, space_from_h='R', space_to_f=bx.sampling_space, Nsim=bx.budget)
1409 1403
1410
1404 bx.is_outside(candidates)
1405 candidates = candidates[candidates.is_outside]
1406
1407
1408 #č řeším problém, že při načítaní ze souboru
1409 #č blackbox nemá adekvatní odhad Brno-venkova
1410 while len(candidates) < 2:
1411 p_out = p_out/2
1412 bx._logger(msg="suppose p_out="+str(p_out))
1413
1414 sampling_r, __ = bx.sball.get_r_iteration(p_out)
1415 # asi tam bylo sampling_r/bx.base_r, že?
1416 # u stats.norm zadáváme směrodatnou odchylku, je to asi správné
1417 h = f_models.UnCorD([stats.norm(0, sampling_r/bx.base_r) for i in range(bx.nvar)])
1418 candidates = IS_stat.IS(bx.f, h, space_from_h='R', space_to_f=bx.sampling_space, Nsim=bx.budget)
1419
1420 bx.is_outside(candidates)
1421 candidates = candidates[candidates.is_outside]
1422
1411 1423
1412 mask = bx.is_outside(candidates)
1413 candidates = candidates[mask]
1414 1424
1415 1425 #č necháme ISSI trapit sa pravděpodobnostma #č necháme ISSI trapit sa pravděpodobnostma
1416 1426 bx.siss.add_single_event_data(candidates.w, event=-1, nis=bx.budget) bx.siss.add_single_event_data(candidates.w, event=-1, nis=bx.budget)
 
... ... class OptimizedCensoredSampling(MinEnergyCensoredSampling):
1438 1448 # N=nsim # N=nsim
1439 1449 NxN = A @ x.T + np.atleast_2d(b).T NxN = A @ x.T + np.atleast_2d(b).T
1440 1450 mask = np.any(NxN > 0, axis=0) mask = np.any(NxN > 0, axis=0)
1441 return mask
1451 candidates.is_outside = mask
1442 1452
1443 1453
1444 1454
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