Title: | Stochastic Simulator for Reliability Modeling of Repairable Systems |
---|---|
Description: | A toolkit for Reliability Availability and Maintainability (RAM) modeling of industrial process systems. |
Authors: | David Silkworth [aut], Jacob Ormerod [cre], OpenReliability.org [cph] |
Maintainer: | Jacob Ormerod <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.15 |
Built: | 2025-01-21 03:39:19 UTC |
Source: | https://github.com/cran/stosim |
A toolkit intended for Reliability Availability and Maintainability (RAM) modeling of industrial process systems.
It is recommended for use with RExcel for data input, holding of the model scripts, and ad hoc analysis of reliability parameters.
stosim provides functions for creating reliability models using observed data reduced to probability distributions for failure and repair mechanisms on related operations in order to infer expected performance of new systems or alteration of existing systems. Models can be assembled from small sub-systems and accumulated to describe an entire production plant or refinery. Stochastic modeling provides an ideal means for study of the performance of product inventory storage and parallel operations as reliability enhancement features. Time dependent issues such as seasonal variation, and equipment degradation can be accurately assessed for impact on ultimate production capability. Contractual conditions such as bonus/penalty clauses can be evaluated with realitic statistical projections.
Jacob T. Ormerod
Maintainer: Jacob T. Ormerod <[email protected]>
Jones, O.D., R. Maillardet, and A.P. Robinson (2009) An Introduction to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC
Robert, Christian P., G. Casella (2010) Introducing Monte Carlo Methods with R. Springer
Taylor HM, Karlin S (1998) An Introduction to Stochastic Modeling, 3rd Edition, Acadmic Press.
Silkworth, David J. (1998) "Confidence Curves: A Reliability Modelling Technique for the Practical Application of Process Unit and Subsystem Failure Data". American Institute of Chemical Engineers
Tobias, Paul A., D.C. Trinidade (1986)Applied Reliability. Van Nostand Reinhold
The ChargeTrain
data frame has 3 rows and 11 columns.
ChargeTrain
ChargeTrain
This data frame contains the following columns:
OpLine
OpLine: a factor to identify the operating line model applicable to this input.
EventID
EventID: a factor to identify the subsystem or EventElement applicable to this input.
FD
FD: a factor identifying the distribution for failure data. Only "E"
, "W"
,
and "N"
have been implemented in intended recieving function SimHistory.
FP1
A first parameter for the failure distribution (FD). Mean for exponential or normal, characteristic life for Weibull.
FP2
A second parameter for the failure distribution (FD). Standard deviation for normal, shape for Weibull.
FP3
A third parameter for the failure distribution (FD). A translation parameter applicable to Weibull, only.
RD
RD: a factor identifying the distribution for repair time data. Only "L"
, "W"
,
and "N"
have been implemented in intended recieving function SimHistory.
RP1
A first parameter for the repair distribution (RD). Meanlog for lognormal, characteristic life for Weibull, mean for normal.
RP2
A second parameter for the repair distribution (RD). SDlog for lognormal, shape for Weibull, standard deviation for normal.
RP3
A third parameter for the repair distribution (RD). A translation parameter applicable to lognormal or Weibull, only.
Seed
An integer seed value for the RNG.
Typical processing system values were chosen to prepare a likely model utilizing lognormal normal and Weibull distributions for repair times (maintainability) as a demonstration.
This is a function for combining multiple "Type 1" stochastic simulations in a common history. It creates a dataframe detailing the operational status of each OpLine throughout the Simulation History.
DetailOpLines(Model, Names=NULL, ProgRpt=FALSE)
DetailOpLines(Model, Names=NULL, ProgRpt=FALSE)
Model |
A list of dataframes constructed from the SimHistory function or some combination of histories using SimCombine. All histories must have the same history length as developed by both SimulationYears and SimulationYearsPerPage. |
Names |
An optional vector of character labels for the OpLines contained in the Model. If not provided the dataframe labels will be assigned to a progression of Train1, Train2, ..., etc. according to the number of SimHistories contained in the Model. If Names are provided, the number of named OpLines must equal the number of SimHistories contained in the Model as this count is used to size the matrix the generated from the 'extern C' function in Rcpp. |
ProgRpt |
A boolean value indicating whether a progress bar should be displayed, if sensible, during execution of the function. |
Returns a dataframe containing columns for Time and Duration for each change to the system status. A matrix of 1's (operating) and 0's (not operating) identify the status of each OpLine through this detailed history.
Carazas et. al.,"Availability Analysis of Gas Turbines Used in Power Plants",International Journal of Thermodynamics, Vol. 12 (No.1), March 2009
GT_1 <- EventElement("GasTurbine2",1,101,"W",2562.5,0.95,0, "L",1.4,0.86,0,87) seedVec<-GT_1[,length(GT_1)] GT_2<-cbind(GT_1[,-length(GT_1)],"Seed"=seedVec*11) ## note simulation drastically reduced for example run GT_1_sh<-SimHistory(GT_1,10,10) GT_2_sh<-SimHistory(GT_2,10,10) Model<-list(GT_1_sh, GT_2_sh) Names<-c("GT1", "GT2") TurbineArray<-DetailOpLines(Model,Names)
GT_1 <- EventElement("GasTurbine2",1,101,"W",2562.5,0.95,0, "L",1.4,0.86,0,87) seedVec<-GT_1[,length(GT_1)] GT_2<-cbind(GT_1[,-length(GT_1)],"Seed"=seedVec*11) ## note simulation drastically reduced for example run GT_1_sh<-SimHistory(GT_1,10,10) GT_2_sh<-SimHistory(GT_2,10,10) Model<-list(GT_1_sh, GT_2_sh) Names<-c("GT1", "GT2") TurbineArray<-DetailOpLines(Model,Names)
Provided for completeness of package only. Oprating line entries are more easily entered as part of an OpLine system using a spreadsheet, then using RExcel to "Put R Value -> dataframe" into an R session.
EventElement(element_name,OpLine,EventID,FD,FP1,FP2,FP3,RD,RP1,RP2,RP3,Seed)
EventElement(element_name,OpLine,EventID,FD,FP1,FP2,FP3,RD,RP1,RP2,RP3,Seed)
element_name |
a string that will used to identify the element as a row.name |
OpLine |
an identifying integer for the OpLine membership. |
EventID |
an identifying integer for this element |
FD |
a single capital letter in quotation marks indicating the failure distribution (i.e. "E"-Exponential, "N"-Normal, "W"-Weibull) |
FP1 |
The first parameter for the failure distribution (MTTF for "E", mean for "N", characteristic life for "W"). |
FP2 |
The second parameter for the failure distribution, else 0 |
FP3 |
The third parameter for the failure distribution (only used as a translation parameter for "W", else 0 ) |
RD |
a single capital letter in quotation marks indicating the repair distribution (i.e. "N"-Normal, "W"-Weibull, "L"-Lognormal) note that "E" is not accepted, use "W" with shape of 1.0 instead. |
RP1 |
The first parameter for the failure distribution (mean for "N", characteristic life for "W", logmean for "L") |
RP2 |
The second parameter for the repair distribution |
RP3 |
The third parameter for the failure distribution (only used as a translation parameter for "W", or "L" else 0 ) |
Seed |
An integer value to be used as the random seed for this element. |
Returns a single row dataframe suitable for combination using rbind
with other elements into a single Operating Line.
Carazas et. al.,"Availability Analysis of Gas Turbines Used in Power Plants",International Journal of Thermodynamics, Vol. 12 (No.1), March 2009
LRU1 <- EventElement("GasTurbine2",1,101,"W",2562.5,0.95,0, "L",1.4,0.86,0,87)
LRU1 <- EventElement("GasTurbine2",1,101,"W",2562.5,0.95,0, "L",1.4,0.86,0,87)
This function will evaluate a dataframe created by DetailOpLines on a line by line basis to generate a history of production output based on various constraints and limitations of the overall system.
MultiTrainWithInventory(model, CapacityHrs, ReserveHrs, RefillTime, DischargeCap=1, TurndownLimit=0.6, TurndownTime=1, ProgRpt=FALSE)
MultiTrainWithInventory(model, CapacityHrs, ReserveHrs, RefillTime, DischargeCap=1, TurndownLimit=0.6, TurndownTime=1, ProgRpt=FALSE)
model |
A dataframe constructed by the DetailOpLines function. |
CapacityHrs |
A quantity of inventory in terms of hours of single active train production defining the useable capacity of a storage vessel. |
ReserveHrs |
A quantity of inventory in terms of hours of single active train production at which an operating policy will be implemented to preserve remaining inventory for support of subsequent active train failures. |
RefillTime |
The duration in hours that would be required to refill the entire capacity of a storage vessel utilizing a given accumulator of known capability. |
DischargeCap |
A quantity of trains for which there is capability to discharge from storage at appropriate conditions for the downstream process. |
TurndownLimit |
A fraction of total production at which downstream processing can continue to function at minimum rates. This value defaults to 0.6, which is typical of many single train fluid bed reactors. |
TurndownTime |
The duration in hours required to bring the downstream processing unit down to a new level of production, including potential human dialog time for confirmation of intent. This value defaults at 1 hour, which has proven to be a very typical of process plant systems requiring human confirmation of turndown request. |
ProgRpt |
A boolean value indicating whether a progress bar should be displayed, if sensible, during execution of the function. |
Returns a list containing two dataframes. The first containing columns for Time, Duration, and ProdRate for each total production rate state. A matrix of 1's and 0's identify the occurrence of specific production failures by cause. These causes may be discharge capacity exceeded, inventory run out, or demand on empty storage.
Ormerod JT, "Using Stochastic RAM Analysis to Establish an Optimal Operating Policy ",8th IMA International Conference on Modelling in Industrial Maintenance and Reliability (MIMAR), July 2014
data(ChargeTrain) Train1<-ChargeTrain Train2<-Train1[,-11] Train2seeds<-data.frame(Seed=Train1$Seed+200) Train2<-cbind(Train2,Train2seeds) ## note simulation drastically reduced for example run Train1_sh<-SimHistory(Train1,200,100) Train2_sh<-SimHistory(Train2,200,100) ChargeSystem<-list(Train1_sh,Train2_sh) ChargeTrainParallelHistory<-DetailOpLines(ChargeSystem) ChgTwInv<-MultiTrainWithInventory(ChargeTrainParallelHistory, 16, 8, 336)
data(ChargeTrain) Train1<-ChargeTrain Train2<-Train1[,-11] Train2seeds<-data.frame(Seed=Train1$Seed+200) Train2<-cbind(Train2,Train2seeds) ## note simulation drastically reduced for example run Train1_sh<-SimHistory(Train1,200,100) Train2_sh<-SimHistory(Train2,200,100) ChargeSystem<-list(Train1_sh,Train2_sh) ChargeTrainParallelHistory<-DetailOpLines(ChargeSystem) ChgTwInv<-MultiTrainWithInventory(ChargeTrainParallelHistory, 16, 8, 336)
This is a "Type 1" stochastic simulation engine. It creates a simulation history dataframe for a single operating line.
SimHistory(Model,SimulationYears=2000, SimulationYearsPerPage=1000, ProgRpt=FALSE)
SimHistory(Model,SimulationYears=2000, SimulationYearsPerPage=1000, ProgRpt=FALSE)
Model |
A datafreme constructed of one or more EventElement objects as combined by rbind. All elements must have the same OpLine integer value in the first column. It is expected that this dataframe will be constructed in a spreadsheet then transferred to R using the "Put R dataframe" right-click menu selection using RExcel |
SimulationYears |
A value for total size of simulation. If not a multiple of SimulationYearsPerPage the actual simulation will be rounded down since number of pages is determined by Pages<-as.integer(SimulationYears/SimulationYearsPerPage) |
SimulationYearsPerPage |
A value for sub-setting the overall simulation; must be less then 2000 for accuracy. |
ProgRpt |
A boolean value indicating whether a progress bar should be displayed, if sensible, during execution of the function. |
Returns a dataframe containing columns for Time and Duration of each simulated event. Added fields record the OpLine and EventID integer values pertaining to the event.
Robert, Christian P., G. Casella (2010) Introducing Monte Carlo Methods with R. Springer
Taylor HM, Karlin S (1998) An Introduction to Stochastic Modeling, 3rd Edition, Acadmic Press.
plantA_DF <- EventElement("generic.pump",1,101,"E", 28260,0,0,"N",8,2,0,87) ## note simulation drastically reduced for example run PlantA <- SimHistory(plantA_DF,100,100)
plantA_DF <- EventElement("generic.pump",1,101,"E", 28260,0,0,"N",8,2,0,87) ## note simulation drastically reduced for example run PlantA <- SimHistory(plantA_DF,100,100)