ART- A Reliability Tool is an open source C package developed for
(a) simulation of correlated random variables, and
(b) reliability analysis using various techniques.
In its current implementation, ART can perform the following:
First Order Reliability Method (FORM)
Second Order Reliability Method (SORM)
Monte Carlo Simulation (MCS)
Importance Sampling (IS)
Subset Simulation (SubsetSim)
Line Sampling (LS)
ARBIS
Simulation of correlated vector random variables
MCMC using Metropolis-Hastings and component-wise Metropolis-Hastings algorithms.
Downloads: art 1.07 Mac , art 1.07 Linux , art 1.07 Windows
If using MinGW, please comment #include "getline.h" in main.c and art.c files.
Click here for a short video that guides Windows 10 users to install and run ART using MinGW
Input file format: input.txt
Line 1: dimension of the random variable vector
Line 2: type of random variables
Line 3: mean of the random variables
Line 4: coefficient of variation of the random variables
Line 5: correlation matrix
Type of random variables:
1: Gaussian 2: Lognormal 3: Uniform 4: Exponential 5: Gumbel 6: Weibull 7: Chi-squared 8: Rayleigh 9: Beta 10: Gamma
For example, consider three random variables (mean,coefficient of variation)
X1~Lognormal(40,0.125) X2~Lognormal(50,0.05) X3~Gumbel(1000,0.2)
The input file should be as follows:
3
2 2 5
40 50 1000
0.125 0.05 0.2
1 0.4 0
0.4 1 0
0 0 1
Identity matrix is assumed by default if the correlation matrix is not provided. When the random variables are standard normal and there exists no correlation between the random variables, the input file may contain only two lines. This feature is especially useful while solving time variant reliability problems when only the external excitation is random - for example, the white noise or filtered white noise can be represented in terms of standard normal random variables.
Line 1: dimension of the random variable vector
Line 2: 0
NOTE: The input file should contain only numeric values.
Please make sure that the first random variable is correlated with any of the other random variables when dealing with correlated random variables.
Performance function: pfn.txt
The performance function should follow the C programming syntax.
For example, if G=x1*x2-x3, the pfn.txt looks like this:
G=x[0]*x[1]-x[2];
x denotes the realization of the random variables in the correlated non-Gaussian space.
G denotes the performance function value; type: double
Please DO NOT define the following variables: n, ux, rv, nu, phi
Go through these examples to get a hang of defining complicated performance functions.
Example 1 - a simple performance function
Highly nonlinear performance function from V. S. Sundar and M . D. Shields, 2016, Surrogate-enhanced stochastic search algorithms to identify implicitly defined functions for reliability analysis, Structural Safety, 62, 1-11.
G=4-x[0]/4+sin(5*x[0])-x[1];
Example 2 - performance function using loops
S. Engelund, R. Rackwitz, 1993, A benchmark study on importance sampling techniques in structural reliability, Structural safety 12 (4), 255–276.
int i;
double summ=0;
for (i=0;i<n;i++)
summ=summ+x[i];
G=3-summ/sqrt(n);
Example 3 - complicated performance function
2dof primary secondary system from Der Kiureghain and Stephano, 1991, Efficient algorithm for second-order reliability analysis, J. Eng. Mech., 117(12): 2904-23.
double mp=x[0];
double ms=x[1];
double kp=x[2];
double ks=x[3];
double etap=x[4];
double etas=x[5];
double Fs=x[6];
double S0=x[7];
double omgp=sqrt(kp/mp);
double omgs=sqrt(ks/ms);
double gamma_val=ms/mp;
double omga=(omgp+omgs)/2;
double etaa=(etap+etas)/2;
double theta=(omgp-omgs)/omga;
double E=(pi*S0/(4*etas*pow(omgs,3)))*(etaa*etas)*(etap*pow(omgp,3)+etas*pow(omgs,3))*omgp/((etap*etas*(4*pow(etaa,2)+pow(theta,2))+gamma_val*pow(etaa,2))*4*etaa*pow(omga,4));
G=Fs-3*ks*sqrt(E);
Target probability density function: target.txt
The target function should follow the C programming syntax.
For example, if the target density is p=w1*N(x;0,1)+w2*N(x;4,1), the target.txt looks like this:
p=w1*normpdf(x[0],0,1)+w2*normpdf(x[0],4,1);
x denotes array of variables used to define the target probability density function.
p denotes the target density function value; type: double
The cdf.h, pdf.h header files contains a few in-built density functions for reference.
Running ART
After downloading the package, please compile it once.
In the command line type:
Mac: gcc art.c -o art
Linux: gcc art.c -o art -lm
Windows: gcc art.c -o art
This will create an ART executable file. Now you can run the procedures using the below commands:
Mac & Linux: ./art FLAG VALUE
Windows: art FLAG VALUE
You can combine the above two into a single step as well
Mac & Linux: gcc art.c -o art && ./art FLAG VALUE
Windows: gcc art.c -o art && art FLAG VALUE
Now use the following flags to obtain estimates using various methods.
MONTE CARLO SIMULATION
./art -input input.txt -pfn pfn.txt -method mcs -N 10000
FIRST ORDER RELIABILITY METHOD
./art -input input.txt -pfn pfn.txt -method form -algo hlrf -ndp 4
SECOND ORDER RELIABILITY METHOD
./art -input input.txt -pfn pfn.txt -method sorm -ndp 2
SUBSET SIMULATION
./art -input input.txt -pfn pfn.txt -method subsetsim -ntrial 10 -N 500 -pp 0.1 -proposal uniform -width 1 -factor 0.9
./art -input input.txt -pfn pfn.txt -method subsetsim -ntrial 10 -N 500 -pp 0.1 -proposal normal -width 1 -factor 0.9
IMPORTANCE SAMPLING
End results from FORM, Subset Simulation, and ARBIS are used to define the importance sampling pdfs.
ART 1.04 onward has an option of using Markov chains to explore the space and obtaining the important regions.
When using subset simulation, use a big number (>5) for the number of design points. This is because, the method yields correlated samples, and it is likely that the best samples are not unique!
./art -input input.txt -pfn pfn.txt -method impsamp -ntrial 10 -N 1000 -dpmethod form -ndp 3
./art -input input.txt -pfn pfn.txt -method impsamp -ntrial 10 -N 1000 -dpmethod subsetsim -ndp 10
./art -input input.txt -pfn pfn.txt -method impsamp -ntrial 10 -N 1000 -dpmethod arbis -ndp 7
./art -input input.txt -pfn pfn.txt -method impsamp -ntrial 10 -N 1000 -dpmethod mc -ndp 5
LINE SAMPLING
End results from FORM, Subset Simulation, and ARBIS are used to define the important directions.
ART 1.04 onward has an option of using Markov chains to explore the space and obtaining the important regions.
When using subset simulation, use a big number (>5) for the number of design points. This is because, the method yields correlated samples, and it is likely that the best samples are not unique!
./art -input input.txt -pfn pfn.txt -method linesamp -ntrial 10 -N 1000 -dpmethod form -ndp 3
./art -input input.txt -pfn pfn.txt -method linesamp -ntrial 10 -N 1000 -dpmethod subsetsim -ndp 10
./art -input input.txt -pfn pfn.txt -method linesamp -ntrial 10 -N 1000 -dpmethod arbis -ndp 7
./art -input input.txt -pfn pfn.txt -method linesamp -ntrial 10 -N 1000 -dpmethod mc -ndp 5
ARBIS
./art -input input.txt -pfn pfn.txt -method arbis -N 10000
SIMULATING CORRELATED NON-GAUSSIAN RANDOM VARIABLES
./art -input input.txt -method simulate -N 10000 -output /Users/Sundar/xsim.txt
MCMC USING METROPOLIS-HASTINGS
The input file should contain two lines -
Line 1: number of variables used to define the target density function
Line 2: 0
For the target density function p=w1*N(x;0,1)+w2*N(x;4,1), the input.txt looks like this:
1
0
./art -input input.txt -method mcmc -target target.txt -sampler mh -proposal normal width 1 -N 10000 -nlag 1000 -output /Users/Sundar/xsim_mh.txt
./art -input input.txt -method mcmc -target target.txt -sampler mmh -proposal uniform width 1 -N 10000 -nlag 100 -output /Users/Sundar/xsim_mmh.txt
Since the underlying code is C, interfacing with other programming languages (Python, Matlab, R, etc) and Finite Element packages (Abaqus, LS-Dyna, etc) is possible through their respective API, DOS commands or System calls.
If you find it difficult to write the performance function in C, use the simulate module of ART to generate samples and perform reliability analysis using package you are comfortable in.
References
Au SK and Beck JL, 2001, Estimation of small failure probabilities in high dimensions by subset simulation, Probabilistic Engineering Mechanics, 16, 263-277.
Breitung K, 1984, Asymptotic approximation for multinormal integrals, Journal of Engineering Mechanics, 110(3), 357-366.
Engelund S and Rackwitz R, 1993, A benchmark study on importance sampling techniques in structural reliability, Structural Safety, 12, 255-276.
Grooteman F, 2008, Adaptive radial-based importance sampling method for structural reliability, Structural Safety, 30, 533-542.
Liu JS, 2001, Monte Carlo Strategies in Scientific Computing, Springer, New York.
Madsen HO, Krenk S and Lind NC, 1986, Methods of Structural Safety, Prentice-Hall, New Jersey.
Melchers RE, 1999, Structural Reliability Analysis and Prediction, 2nd edition, John Wiley & Sons, Chichester.
Schuëller GI, Pradlwarter, HJ, and Koutsourelakis PS, 2004. A critical appraisal of reliability estimation procedures for high dimensions. Probabilistic engineering mechanics, 19(4), 463-474.
Sundar VS, 2013, Monte Carlo simulations with variance reduction for structural reliability modeling, updating and testing, PhD Thesis, Department of Civil Engineering, Indian Institute of Science, Bangalore.
Acknowledgements
Professor C S Manohar, IISc Bangalore, my PhD advisor.
Dr. Kayalvizhi Madhivanan, UCSD (past TSRI), my wife and fellow researcher.
Updates
April 2, 2018
ART version 1.02 onward uses flags to specify the parameters for the methods.
FORM,SORM and Importance Sampling can now handle multiple design points.
Line Sampling and ARBIS needs fine tuning.
Practice examples.
April 9, 2018
Markov chain based method to explore the space and determine the important regions for importance and line sampling.
Option "mc" for -dpmethod
MCMC simulation using Metropolis-Hastings algorithm.
Option "mh" for -sampler
Improvement in speed due to better memory allocation.
April 11, 2018
MCMC simulation using component-wise Metropolis-Hastings algorithm.
Option "mmh" for -sampler
July 12, 2018
SORM code updated.
Included numerical illustration from Breitung (1984) in Practice examples.
July 26, 2018
Included numerical illustration on reliability of structures subjected to fire.
June 7, 2020
Included source code compatible for Windows gcc compiler (say MinGW)
Jan 8, 2021 New!
Updated QR algorithm for SORM.
Citation:
If you use ART in any published work, please cite the software as an electronic resource/URL.
V. S. Sundar, 2018, ART for safety assessment, available from https://sites.google.com/site/sundarvelkur/art-for-safety-assessment.