Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SR2ML from GitLab Repo to GitHub Repo #2

Merged
merged 135 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
7b07e13
edtis
mandd Nov 14, 2019
d2a3f16
edtis
mandd Nov 14, 2019
974f2bb
add PRA models and tests
wangcj05 Nov 18, 2019
99de46d
update README
wangcj05 Nov 18, 2019
86ae616
update docs
wangcj05 Nov 18, 2019
95293c0
add sqa documents
wangcj05 Nov 21, 2019
9068d91
mv docs doc
wangcj05 Nov 21, 2019
38559f7
add init file
wangcj05 Nov 27, 2019
8009267
update tests with plugin name extension
wangcj05 Nov 27, 2019
aaa140e
Merge branch 'master' of hpcgitlab.hpc.inl.gov:mandd/SR2ML
wangcj05 Nov 27, 2019
b12ad28
edit
mandd Jan 16, 2020
16177ac
edits
mandd Jan 16, 2020
27f7546
update requirement lists
wangcj05 Jan 16, 2020
9fb587f
update SDD
wangcj05 Jan 16, 2020
f5df938
update requirement list
wangcj05 Jan 16, 2020
555b2b3
add more requirement tests
wangcj05 Jan 16, 2020
fca31c1
add CR scheme, sqa status dashboard, and make file
wangcj05 Jan 16, 2020
eb43346
add license file
wangcj05 Jan 20, 2020
7e0c954
initial implementation of reliability models
wangcj05 Feb 6, 2020
b5f4d40
fix some typos and bugs, and initial implementation works
wangcj05 Feb 6, 2020
2863af6
some cleanup
wangcj05 Feb 6, 2020
995f888
add docstrings
wangcj05 Feb 6, 2020
fddb517
some update
wangcj05 Feb 7, 2020
d87e86b
add ErlangianModel
wangcj05 Feb 7, 2020
53c819e
add gamma model
wangcj05 Feb 7, 2020
aed42ec
updates
wangcj05 Feb 7, 2020
6db2c26
add more functions
wangcj05 Feb 7, 2020
ad483b6
add lognorm
wangcj05 Feb 7, 2020
f87f8fb
add weibull model
wangcj05 Feb 7, 2020
0ed2836
add bathtub model
wangcj05 Feb 7, 2020
f030424
update bathtub model
wangcj05 Feb 7, 2020
18a1cd5
update tests
wangcj05 Feb 7, 2020
ab872fe
update tests
wangcj05 Feb 7, 2020
9990b3c
update test
wangcj05 Feb 10, 2020
9fe7ca6
add time delay parameters
wangcj05 Feb 10, 2020
3a9fa35
clean up
wangcj05 Feb 10, 2020
3e429a8
add checks for input parameters
wangcj05 Feb 10, 2020
d98313b
using mask for weibull failure rate calculation
wangcj05 Feb 10, 2020
94f8ef7
update failure rate calculation in expon
wangcj05 Feb 10, 2020
c81ad27
clean up and add mask method for bathtub functions calculation
wangcj05 Feb 10, 2020
d50738f
fatigue life model
wangcj05 Feb 10, 2020
7aab801
add normal model
wangcj05 Feb 10, 2020
1b8b3d6
add Power Law Model
wangcj05 Feb 11, 2020
436c659
add log linear model
wangcj05 Feb 11, 2020
e3cd1fe
update tests
wangcj05 Feb 11, 2020
1cf0ff9
add exponential weibull model
wangcj05 Feb 11, 2020
53fe61c
add documentation for reliability models
wangcj05 Feb 12, 2020
c47a8a9
add ensemble model to test time dependence
wangcj05 Feb 12, 2020
0e1459b
update timeDepReliability test
wangcj05 Feb 12, 2020
79cc407
update test info
wangcj05 Feb 12, 2020
2681d15
update docstrings
wangcj05 Feb 18, 2020
597b0da
update doc
wangcj05 Feb 19, 2020
56b43cc
update docstrings
wangcj05 Feb 19, 2020
fe4cbc2
Merge branch 'wangc/reliability' into 'master'
wangcj05 Feb 25, 2020
9bedf03
update user manual
wangcj05 Feb 27, 2020
9b24284
add user manual for reliability models
wangcj05 Feb 27, 2020
74ac146
add descriptions for reliability and failure rate models
wangcj05 Feb 27, 2020
d7e2714
Add descriptions for aging models
wangcj05 Feb 27, 2020
9d6c508
manual updates for reliability models
wangcj05 Feb 28, 2020
a149ffb
first draft version of reliability models
wangcj05 Feb 28, 2020
ceb4120
address comments
wangcj05 Mar 4, 2020
a1210b6
Merge branch 'wangc/reliability_manual' into 'master'
mandd Mar 4, 2020
53896f2
update user manual according to editor review
wangcj05 Mar 11, 2020
819c237
some updates
wangcj05 Mar 11, 2020
61ce8a4
regold
wangcj05 Mar 11, 2020
6bd1743
add rel_err for tests
wangcj05 Mar 12, 2020
a82c4c7
skip test for windows due to numerical errors
wangcj05 Mar 12, 2020
d3f2c2a
edit
wangcj05 Mar 25, 2020
97a84d8
fixed for new quantile
alfoa Apr 15, 2020
34cfc55
Merge branch 'alfoa/update_gold_for_new_quantile_fix' into 'master'
wangcj05 Apr 15, 2020
f2550b4
add gitlab issue and merge request tempaltes, gitlab ci
wangcj05 Apr 15, 2020
4d3d00a
Update README.md
wangcj05 Apr 16, 2020
0f8e613
maintenance model structure
mandd Apr 29, 2020
daa0c80
draft of first maintenance model
mandd May 4, 2020
6f7f0f2
edits
mandd May 4, 2020
a652b30
edits
mandd May 4, 2020
64bd478
added test
mandd May 5, 2020
bd637d5
edits
mandd May 5, 2020
09de363
edits after congjian comments
mandd May 13, 2020
3724ebd
model finalized
mandd May 14, 2020
5695b32
added tests
mandd May 14, 2020
d8f0893
edits
mandd May 14, 2020
1beae9e
edits
mandd May 15, 2020
41c7e56
edits
mandd May 15, 2020
a3b3e8b
edits
mandd May 15, 2020
8abbff4
edits
mandd May 15, 2020
053f153
edits
mandd May 15, 2020
f2de6d8
edits
mandd May 15, 2020
bc0435f
edits
mandd May 15, 2020
fef1999
edits
mandd May 15, 2020
7d34a64
edits
mandd May 15, 2020
4fa31f5
edits
mandd May 15, 2020
526f49c
edits
mandd May 15, 2020
b29bd55
edits
mandd May 15, 2020
3696936
edits
mandd May 15, 2020
637900d
edits
mandd May 15, 2020
47b8f56
edits
mandd May 15, 2020
48cd444
edits
mandd May 15, 2020
186f87f
fix some errors
wangcj05 May 16, 2020
97b2c61
Updating CI to fix issue finding plugins.
joshua-cogliati-inl May 15, 2020
1efb9c2
Merge branch 'update_ci' into 'master'
wangcj05 May 18, 2020
018e83d
Merge branch 'wangc/fix' into 'mandd/maintenanceModels'
mandd May 18, 2020
b26dcd1
edits
mandd May 18, 2020
114520f
Merge branch 'mandd/maintenanceModels' of hpcgitlab.hpc.inl.gov:RAVEN…
mandd May 18, 2020
f60c574
edits
mandd May 19, 2020
3582878
edits
mandd May 19, 2020
9c93bc2
comment fixes
mandd May 19, 2020
9e6b220
comment fixes and manual
mandd May 20, 2020
4ea4361
Merge remote-tracking branch 'origin/master' into mandd/maintenanceMo…
mandd May 20, 2020
3bf85c7
edits
mandd May 20, 2020
cc85dd4
edits
mandd May 22, 2020
2ef3d05
edits
mandd May 28, 2020
ea9780d
Merge branch 'mandd/maintenanceModels' into 'master'
wangcj05 May 28, 2020
ad33498
update ci
wangcj05 Jul 7, 2020
9469188
Merge branch 'wangc/update_ci' into 'master'
mandd Jul 7, 2020
eaa005c
add notice and update readme
wangcj05 Aug 12, 2020
d7cee38
update licence
wangcj05 Aug 12, 2020
a910e15
regold due to update calculations of percentile
wangcj05 Oct 13, 2020
59bce62
Merge branch 'wangc/update' into 'master'
mandd Oct 20, 2020
f24e708
update readme and copyright notice
wangcj05 Oct 27, 2020
9702bc5
update copyright for python codes
wangcj05 Nov 9, 2020
0130e15
Merge branch 'wangc/update_copyright' into 'master'
mandd Nov 11, 2020
43303ea
Merge branch 'master' into wangc/open_source
wangcj05 Nov 30, 2020
2f89366
update introduction for user manual
wangcj05 Nov 30, 2020
944440b
fix typo
wangcj05 Nov 30, 2020
40f5908
updates
wangcj05 Nov 30, 2020
03373a3
update sqa docs
wangcj05 Nov 30, 2020
d061135
Merge branch 'wangc/open_source' into 'master'
mandd Nov 30, 2020
9154fcd
manual edits
mandd Dec 4, 2020
844df38
Merge branch 'mandd/manualReview' into 'master'
wangcj05 Dec 7, 2020
efbccc4
update manual
wangcj05 Dec 14, 2020
9bdeb35
Merge branch 'update_manual' into 'master'
mandd Dec 14, 2020
110ebbd
add STI Number
wangcj05 Dec 14, 2020
4f5346d
Merge branch 'update_manual' into 'master'
mandd Dec 14, 2020
7aa9095
Merge branch 'master' of github.com:idaholab/SR2ML into wangc/sr2ml_g…
wangcj05 Jan 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.libs
*.dylib
*.la
*.lo
*.d
*.o
*.a
*-opt
*-dbg
*-oprof
*-devel
*.e
*.csv
*.so
*~
*.ctf
*.png
*.toc
*.log
*.out
*.aux
*.pdf
*.bbl
*.blg

# eclipse
.project
.cproject

#osx
.DS_Store

# python
*.pyc
*.pyo

# vim
*~
*.swp

49 changes: 49 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
before_script:
# Print out python version for debugging
- python -V
# clone raven
- git clone https://github.com/idaholab/raven.git
- cd raven
# we technically still need moose for running the tests, currently
- git checkout master
- git clean -xfd
- if which conda 2> /dev/null; then
echo "Conda found!";
conda update conda;
else
echo "ERROR Conda not found!";
exit 404;
fi
# create libraries or create them
- ./scripts/establish_conda_env.sh --install --conda-defs $HOME/miniconda2/etc/profile.d/conda.sh
- ./build_raven
# Install plugin branch ...
- cd scripts
- python install_plugins.py -s `pwd`/../../
# return to project path main dir
- cd ../..

user_manual:
script:
- cd doc/user_manual/
- make
- cd ../../
artifacts:
paths:
- doc/user_manual/user_manual.pdf

sqa:
script:
- cd doc/sqa/
- ./make_docs.sh
- cd ../../
artifacts:
paths:
- doc/sqa/sqa_built_documents/

test:
script:
- echo PATH $PATH
- cd raven
- ./run_tests --library-report
- ./run_tests -j4 --plugins
25 changes: 25 additions & 0 deletions .gitlab/issue_templates/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--------
Issue Description
--------
##### Please describe your issue here.




----------------
For Change Control Board: Issue Review
----------------
This review should occur before any development is performed as a response to this issue.
- [ ] 1. Is it tagged with a type: defect or task?
- [ ] 2. Is it tagged with a priority: critical, normal or minor?
- [ ] 3. If it is a defect, can it cause wrong results for users? If so a detailed description should be provided.
- [ ] 4. Is a rationale provided? (Such as explaining why the task is needed or why current code is wrong.)

-------
For Change Control Board: Issue Closure
-------
This review should occur when the issue is imminently going to be closed.
- [ ] 1. If the issue is a defect, is the defect fixed?
- [ ] 2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
- [ ] 3. If the issue can impact users, has the detailed description been written?
- [ ] 4. If the issue is being closed without a merge request, has an explanation of why it is being closed been provided?
19 changes: 19 additions & 0 deletions .gitlab/merge_request_templates/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--------
Pull Request Description
--------
##### What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)


##### What are the significant changes in functionality due to this change request?


----------------
For Change Control Board: Change Request Review
----------------
The following review must be completed by an authorized member of the Change Control Board.
- [ ] 1. Review all computer code.
- [ ] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual.
- [ ] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the [wiki](https://github.com/idaholab/raven/wiki/RAVEN-Code-Standards#python) for details.
- [ ] 4. Regression tests have to complete successfully.
- [ ] 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large test.
- [ ] 6. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.
37 changes: 37 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
This project contains code from Idaho National Laboratory's SR2ML Project
Github URL : idaholab/SR2ML

Licensed under Apache License.


© 2020 Battelle Energy Alliance, LLC
ALL RIGHTS RESERVED

Prepared by Battelle Energy Alliance, LLC
Under Contract No. DE-AC07-05ID14517
With the U. S. Department of Energy

NOTICE: This computer software was prepared by Battelle Energy
Alliance, LLC, hereinafter the Contractor, under Contract
No. AC07-05ID14517 with the United States (U. S.) Department of
Energy (DOE). The Government is granted for itself and others acting on
its behalf a nonexclusive, paid-up, irrevocable worldwide license in this
data to reproduce, prepare derivative works, and perform publicly and
display publicly, by or on behalf of the Government. There is provision for
the possible extension of the term of this license. Subsequent to that
period or any extension granted, the Government is granted for itself and
others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide
license in this data to reproduce, prepare derivative works, distribute
copies to the public, perform publicly and display publicly, and to permit
others to do so. The specific term of the license can be identified by
inquiry made to Contractor or DOE. NEITHER THE UNITED STATES NOR THE UNITED
STATES DEPARTMENT OF ENERGY, NOR CONTRACTOR MAKES ANY WARRANTY, EXPRESS OR
IMPLIED, OR ASSUMES ANY LIABILITY OR RESPONSIBILITY FOR THE USE, ACCURACY,
COMPLETENESS, OR USEFULNESS OR ANY INFORMATION, APPARATUS, PRODUCT, OR
PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY
OWNED RIGHTS.

Authors:
Diego Mandelli
Congjian Wang

51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SR2ML: Safety Risk and Reliability Model Library

SR2ML is a software package which contains a set of safety and reliability models
designed to be interfaced with the INL developed RAVEN code. These models can be
employed to perform both static and dynamic system risk analysis and determine risk
importance of specific elements of the considered system. Two classes of reliability
models have been developed; the first class includes all classical reliability models
(Fault-Trees, Event-Trees, Markov models and Reliability Block Diagrams) which have
been extended to deal not only with Boolean logic values but also time dependent
values. The second class includes several components aging models. Models of these
two classes are designed to be included in a RAVEN ensemble model to perform time
dependent system reliability analysis (dynamic analysis). Similarly, these models
can be interfaced with system analysis codes to determine failure time of systems
and evaluate accident progression (static analysis).


## Available Safety Risk and Reliability Models
- Event Tree (ET) Model
- Fault Tree (FT) Model
- Markov Model
- Reliability Block Diagram (RBD) Model
- Data Classifier
- Event Tree Data Importer
- Fault Tree Data Importer
- Reliability models with time dependent failure rates

## Installation and How to Use?

Please check: https://github.com/idaholab/raven/wiki/Plugins

### Other Software
Idaho National Laboratory is a cutting edge research facility which is a constantly producing high quality research and software. Feel free to take a look at our other software and scientific offerings at:

[Primary Technology Offerings Page](https://www.inl.gov/inl-initiatives/technology-deployment)

[Supported Open Source Software](https://github.com/idaholab)

[Raw Experiment Open Source Software](https://github.com/IdahoLabResearch)

[Unsupported Open Source Software](https://github.com/IdahoLabCuttingBoard)


### Licensing
-----
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

### Developers
-----
By contributing to this software project, you are agreeing to the following terms and conditions for your contributions:

You agree your contributions are submitted under the Apache license. You represent you are authorized to make the contributions and grant the license. If your employer has rights to intellectual property that includes your contributions, you represent that you have received permission to make contributions and grant the required license on behalf of that employer.
9 changes: 9 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2020, Battelle Energy Alliance, LLC
# ALL RIGHTS RESERVED
from SR2ML.src import ETModel
from SR2ML.src import FTModel
from SR2ML.src import GraphModel
from SR2ML.src import MarkovModel
# from SR2ML.src import TDFailureRateReliabilityModel
from SR2ML.src import ReliabilityModel
from SR2ML.src import MaintenanceModel
Binary file not shown.
Binary file added doc/sqa/CR_scheme.pptx
Binary file not shown.
Binary file added doc/sqa/SR2ML_SQA_Status_Dashboard.pptx
Binary file not shown.
92 changes: 92 additions & 0 deletions doc/sqa/make_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/bin/bash

SCRIPT_NAME=`readlink $0`
if test -x "$SCRIPT_NAME";
then
SCRIPT_DIRNAME=`dirname $SCRIPT_NAME`
else
SCRIPT_DIRNAME=`dirname $0`
fi
SCRIPT_DIR=`(cd $SCRIPT_DIRNAME; pwd)`
cd $SCRIPT_DIR

VERB=0
for i in "$@"
do
if [[ $i == "--verbose" ]]
then
VERB=1
echo Entering verbose mode...
fi
done

rm -Rvf sqa_built_documents
mkdir sqa_built_documents
# load raven libraries; use utils to do this.
RAVEN_PATH=$(python $(pwd)/../../src/_utils.py get_raven_loc)
source $RAVEN_PATH/../scripts/establish_conda_env.sh --load --quiet

# add custom, collective inputs to TEXINPUTS
#
# Since on Windows we use MikTeX (which is a native Windows program), the TEXTINPUTS variable used i
# to tell the LaTeX processor where to look for .sty files must be set using Windows-style paths
# (not the Unix-style ones used on other platforms). This also means semi-colons need to be used
# to separate terms instead of the Unix colon.
#
if [ "$(uname)" == "Darwin" ] || [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]
then
export TEXINPUTS=.:$SCRIPT_DIR/tex_inputs/:$TEXINPUTS
elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ] || [ "$(expr substr $(uname -s) 1 4)" == "MSYS" ]
then
export TEXINPUTS=.\;`cygpath -w $SCRIPT_DIR/tex_inputs`\;$TEXINPUTS
fi
# copy files that are not built
# Configuration Item list
cp CIlist/*.docx sqa_built_documents/
# FIXME: CR_scheme #TODO current use RAVEN CR scheme
cp CR_scheme.pptx sqa_built_documents/
# Dashboard
cp SR2ML_SQA_Status_Dashboard.pptx sqa_built_documents/

if git describe
then
git describe | sed 's/_/\\_/g' > ../new_version.tex
echo "\\\\" >> ../new_version.tex
git log -1 --format="%H %an\\\\%aD" . >> ../new_version.tex
if diff ../new_version.tex ../version.tex
then
echo No change in ../version.tex
else
mv ../new_version.tex ../version.tex
fi
fi

for DIR in sdd rtr srs srs_rtr_combined; do
cd $DIR
echo Building in $DIR...
if [ "$(uname)" == "Darwin" ] || [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]
then
if [[ 1 -eq $VERB ]]
then
make; MADE=$?
else
make > /dev/null; MADE=$?
fi
elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ] || [ "$(expr substr $(uname -s) 1 4)" == "MSYS" ]
then
if [[ 1 -eq $VERB ]]
then
bash.exe make_win.sh; MADE=$?
else
bash.exe make_win.sh > /dev/null; MADE=$?
fi
fi
if [[ 0 -eq $MADE ]]; then
echo ...Successfully made docs in $DIR
cp *.pdf ../sqa_built_documents
else
echo ...Failed to make docs in $DIR
exit -1
fi
cd $SCRIPT_DIR
done
20 changes: 20 additions & 0 deletions doc/sqa/rtr/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
LATEX_FLAGS=-interaction=nonstopmode

all: default sr2ml_requirements_traceability_matrix.pdf

sr2ml_requirements_traceability_matrix.pdf : sr2ml_requirements_traceability_matrix.tex sr2ml_requirements_traceability_matrix.bib intro.tex ../../version.tex ../sdd/sr2mlDepAndLimitations.tex
pdflatex $(LATEX_FLAGS) sr2ml_requirements_traceability_matrix.tex
pdflatex $(LATEX_FLAGS) sr2ml_requirements_traceability_matrix.tex
pdflatex $(LATEX_FLAGS) sr2ml_requirements_traceability_matrix.tex

../../version.tex : *.tex
git log -1 --format="%H %an %aD" .. > ../../version.tex

default: *.tex
python createSQAtracebilityMatrix.py -i ../srs/requirements_list.xml -o traceability_matrix.tex
git log -1 --format="%H %an %aD" .. > ../../version.tex

.PHONY: clean

clean:
@rm -f *~ *.aux *.bbl *.blg *.log *.out *.toc *.lot *.lof sr2ml_requirements_traceability_matrix.pdf
Loading