Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Version 1
RENO 1 Training Guide Part Identification: RRE1S-TG-01 ReliaSoft Corporation Worldwide Headquarters 1450 South Eastside Loop Tucson, Arizona 85710-6703, USA Sales and Information: 1.888.886.0410 ReliaSoft@ReliaSoft.com http://www.ReliaSoft.com 2005-2009 ReliaSoft Corporation, ALL RIGHTS RESERVED. Notice of Rights No part of this document may be reproduced or transmitted, in any form or by any means, for any purpose, without the express written permission of ReliaSoft Corporation, Tucson, AZ, USA. Disclaimer Information in this document is subject to change without notice and does not represent a commitment on the part of ReliaSoft Corporation. Companies, names and data used herein are fictitious unless otherwise noted. Use of the software and this document are subject to the terms and conditions set forth in the accompanying License Agreement. This software and documentation were developed at private expense; no portion was developed with government funds. Trademarks ReliaSoft and RENO are trademarks of ReliaSoft Corporation. Product names and services identified in this document are trademarks of their respective trademark holders, and are used for illustration purposes. Their use in no way conveys endorsement or other affiliation with ReliaSoft Corporation. 10 9 8 7 6 5 4
Introduction
Features Summary
The examples in this training guide have been designed to introduce you to the features available in RENO. This section presents a brief summary of these features. If you are already familiar with RENOs capabilities, you can proceed to Chapter 4, First Steps. You can think of RENO as a graphical stochastic event simulation tool. It is a powerful and flexible platform for visualizing and dynamically simulating nearly any kind of physical, financial or organizational system. Using the familiar flowcharting concept, you can build systems and/or scenarios and then have the software execute the model via simulation. You may also think of RENO as a visual spreadsheet that allows you to graphically create and manipulate data and equations, but with greater flexibility due to its ability to evaluate systems and scenarios that evolve over time.
2 Features Summary
Auto-Complete/Intelli-Sense: When you press Ctrl+Space while building an equation, RENO provides a list of recognized variables and functions. Color-Coding: As you type, RENO automatically color-codes recognized variables, functions and operands to make it easy for you to spot typing errors, undefined variables, unmatched parentheses, etc. Variable Preview: RENO provides a summary of the properties of each Definition that you use in your equations and allows you to view/edit the Definitions properties with the click of a button.
Definitions: A list of the Constants, Tables, Storage Variables, Equation Variables, Functions, Probabilities and Random Variables defined in the project. Reserved Keywords: A list of keywords that instruct the software to insert specific information into the equation, such as the value passed from the previous Flowchart Construct (IN), the total number of simulations performed (SIMS_TOTAL), the maximum value in a table (MAX_TABLE), etc. Pre-Defined Functions: A list of built-in functions supported by the software. This includes:
Engineering functions such as Bessel, Error functions, etc. Math and Trigonometry functions such as Sine, Derivative, Integral, Logarithm, etc. Financial functions such as Future Value, Cumulative Interest Paid, Periodic Payment for an Annuity, etc. Statistical functions such as the Weibull distribution, the Fisher Transformation, the Chi-Squared distribution, etc. Logical functions such as IF statements and TRUE/FALSE statements.
http://RENO.ReliaSoft.com
During the simulation: You can configure the Simulation Console to display a specific variable of interest while the simulation is running and watch the variation as the simulation progresses. In the Simulation Results Explorer: The Simulation Results Explorer displays the full results of the simulation in Excel-compatible spreadsheets that present the data in an organized fashion and make it easy to copy/paste or export results of interest to your reports or customized analyses. In the Flowchart: After a Flowchart has been simulated, the final values for all Result Storage Constructs will be displayed directly within the chart. You also have the option to show the last values for other Constructs, if desired. In the Plot Sheet: RENOs integrated Plot Sheet provides a graphical display of your simulation results with the click of a button. You can choose to display the data for any Result Storage Construct in the Flowchart and control other display options, such as scaling, fonts, colors, etc. The utility provides both 2-dimensional and 3-dimensional plots to present analysis results in the most effective way to support decision-making. You can export plots as Windows metafile graphics that can be inserted into other documents and/or use the RS Draw metafile editor to annotate and customize the plot graphics.
Basics
This chapter briefly covers the Definitions and Constructs used to build Flowcharts in RENO and the terminology used for simulation. For complete information on the properties and use of Definitions and Constructs and on simulation, please consult the RENO Users Guide.
3.1 Definitions
Definitions are global objects that can be called upon by any Flowchart within the project. They cannot, however, be placed directly into Flowcharts; instead, they are called by Constructs, which are placed into Flowcharts as blocks. Constructs are presented in detail in Section 3.2. Definitions serve to store or generate values used in Flowcharts. While the values of some Definitions may change during the simulation process, once simulation has been completed, each Definition contains only the original values that you entered in its properties window. If you wish to keep the value(s) of the Definition used during simulation, you must use a Result Storage Block to store the value(s). There are seven types of Definitions. A brief description of each is given next. The properties of each Definition can be specified in the properties window that appears when a new Definition is created, or you can access the properties window at any time by double-clicking the Definition. In addition, the properties of a Definition are displayed at the bottom of the Project Explorer when the Definition is selected. Each type of Definition has an identifier, or name. All identifiers must meet the following requirements.
Must be unique within the project. Must be text; cannot be a number or anything that evaluates to a number, such as Pi or reserved keywords. Cannot contain spaces or any of the following characters:
3.1.1 Constants
A Constant stores a fixed numerical value that can be reused. Constants cannot be changed during each simulation, but can be varied across runs based on your selections on the Sensitivity Analysis page of the Simulation Console. After simulation, the Constant returns to its original value. The values of the Constant used during simulation are available in the Simulation Results Explorer.
3 Basics
3.1.2 Tables
A Table stores an array of values in rows and columns. Tables can have up to 64,000 rows and 256 columns. The data in a Table are available for both read and write during simulation by using reserved keywords. After simulation, the Table will contain its original data. If you wish to keep the values stored in the Table during simulation, you must use a Result Storage Block to store them.
http://RENO.ReliaSoft.com
3.1 Definitions
references to any other Definition(s) except for Functions and references to any Spreadsheets that are named in accordance with the naming conventions for Definitions.
Note that you must enter all required inputs for each part of the equation. For instance, a reference to a Table requires inputs for the column name/number and the row number. Table1(1,2) is a reference to the cell in the first column and second row of the Definition called Table1. References to Spreadsheets require inputs for the sheet number, column name/number and row number. Some reserved keywords also require inputs.
3.1.5 Functions
A Function stores a string expression to be evaluated. Functions are identical to Equation Variables except that a Function can contain arguments that are passed to it during simulation. For instance, the Function shown here finds the sum of the arguments X1, X2 and X3. An equation of the form Function1(1,2,3) would return 6.
3 Basics
3.1.6 Probabilities
A Probability returns the probability that a random variable is observed by x. In other words, given x, the Probability returns F(x), where F(x) is the cumulative density function of the specified distribution. The returned probability will always be between 0 and 1.
3.2 Constructs
RENOs Constructs are the building blocks with which you will create Flowcharts. Each Construct is represented by a block in the Flowchart and performs a step in the model. You can customize the appearance of each block to enhance the presentation of your Flowcharts. Note that the terms Construct and block are used interchangeably in this guide. In order to provide the flexibility required to create Flowcharts that model scenarios as realistically as possible, there are twelve different types of Constructs. A brief description of each is given next. The properties of each Construct can be specified in the properties window that appears when a new block is created or you can access the properties window at any time by double-clicking the block. In addition, the properties of a Construct are displayed in the Flowchart Information area when the block is selected.
10
http://RENO.ReliaSoft.com
3.2 Constructs
Note that you must enter all required inputs for each part of the equation. For instance, a reference to a Table requires inputs for the column name/number and the row number. Table1(1,2) is a reference to the cell in the first column and second row of the Definition called Table1. References to Spreadsheets require inputs for the sheet number, column name/number and row number. Some reserved keywords also require inputs.
11
3 Basics
3.2.1.2 Subchart Page The Subchart page is used to specify whether the block is a Standard Block or a Subchart Block. Subchart blocks are presented in detail in Section 3.2.12.
3.2.1.3 Attachments Page The Attachment page displays the attachments, if any, associated with the block. You can add, open or delete attachments here.
12
http://RENO.ReliaSoft.com
3.2 Constructs
The Required Number of Executed Paths field allows the simulation to continue when not all the incoming paths should/will be executed. The Required Number of Executed Paths field is presented in detail in Section 3.2.13.
13
3 Basics
If Continue execution on both paths is checked, execution will continue on both paths regardless of the conditional outcome. If this option is not checked, execution will continue only on the path corresponding to the conditional outcome.
Gate Type dictates the conditions under which a TRUE or FALSE outcome will be returned. Possible types are:
AND: the condition is TRUE for all incoming paths. OR: the condition is TRUE for at least one incoming path. XOR: the condition is TRUE for exactly one incoming path. K-out-of-N: the condition is TRUE for at least K out of N incoming paths; K must be specified in the input box below.
If Continue execution on both paths is checked, execution will continue on both paths regardless of the conditional outcome (i.e. whether the conditions of the gate type are met). If this option is not checked, execution will continue only on the path corresponding to the conditional outcome.
14
http://RENO.ReliaSoft.com
3.2 Constructs
The Required Number of Executed Paths field allows the simulation to continue when not all the incoming paths should/will be executed. The Required Number of Executed Paths field is presented in detail in Section 3.2.13.
Each path is identified by the name of the next block in the path. If Check condition on every branch is selected, the incoming value will be checked against every outgoing branch. Execution continues down every path that evaluates to TRUE. If Continue execution on FALSE branch is checked below, execution continues down every path, with the value that is passed down the path determined by the conditional outcome. If Check condition until first branch is TRUE is selected, the incoming value will be checked against each branch sequentially, based on the order displayed, and continues only through the first TRUE branch. Execution will also continue on any branch for which Continue execution on FALSE branch is checked below, passing the Condition is FALSE value. You can use the arrows that appear when Check condition until first branch is TRUE is selected to change the order in which the paths are evaluated.
15
3 Basics
The order in which the incoming paths will be handled is managed in the Precedence field. The Required Number of Executed Paths field allows the simulation to continue when not all the incoming paths have been executed. The Required Number of Executed Paths field is presented in detail in Section 3.2.13.
16
http://RENO.ReliaSoft.com
3.2 Constructs
3.2.8 Go to Flags
A Go to Flag sets the current simulation point to a named Flag Marker within the same Flowchart, thus allowing for loops inside the Flowchart. Note that it is up to you to avoid configurations that would create infinite loops and other unresolved issues, as RENO cannot check this for you. Since Construct names do not have to be unique, it is also up to you to avoid ambiguity in which Flag Marker the Go to Flag points to.
Global Counter if selected, the counter is never reset. Simulation Counter if selected, the counter is reset after each simulation (i.e. after each single pass through the Flowchart). Run Counter if selected, the counter is reset after each run (i.e. after the specified number of simulations have been completed).
The Required Number of Executed Paths field allows the simulation to continue when not all the incoming paths should/will be executed. The Required Number of Executed Paths field is presented in detail in Section 3.2.13.
17
3 Basics
18
http://RENO.ReliaSoft.com
3.2 Constructs
The first page of the properties window for a Subchart Block differs from that of a Standard Block, as shown next.
Note that any Flowchart used as a subchart must have a single starting point and a single ending point.
If the user had specified 2 as the required number of executed paths and A, B, C and D were executed in that order, the Summing Gate would send results to its outgoing paths twice: once with a value of A+B and once with a value of C+D. If there were only 3 incoming paths executed (A, B and C in that order) and the user had specified 2 as the required number of executed paths, the Summing Gate would send the result of A+B to its outgoing paths and would ignore C.
19
3 Basics
This field is used by Result Storage Blocks, Logic Gates, Summing Gates and Counter Blocks.
A simulation is a single pass through the Flowchart. Note that this may pass through blocks multiple times if your Flowchart includes one or more loops. A run is a set of simulations. The number of simulations in each run is set on the General page of the Simulation Console. An analysis is a set of runs. The number of runs in each analysis is determined by the settings on the Sensitivity Analysis page of the Simulation Console.
You can also choose to perform multiple analyses, using the settings on the Multiple Analyses page of the Simulation Console.
20
http://RENO.ReliaSoft.com
First Steps
In addition to information on starting RENO and a brief overview of the software's main interface, this section guides you through all of the steps involved in creating Flowchart models and obtaining results through simulation. Working through this example will help you to become familiar with the software quickly and easily.
21
4 First Steps
in detail next. The appearance of the MDI will vary depending on the window(s) that are currently open and the configuration of the Project Explorer and Template Panel.
The status bar in the MDI may not be visible the first time the application is opened. To make the status bar visible, go to the View menu and select Status Bar. The status bar will be located at the bottom of the MDI and displays the number of Flowcharts within the project, the name of the currently active window, the path and filename of the project and the amount of memory available on your computer. The MDI serves as the container for all Flowcharts, Spreadsheets, Attachments, the Template Panel and the Project Explorer and manages the different active windows. The MDI remains open until you close the program. Closing the MDI has the same effect as terminating the program.
22
http://RENO.ReliaSoft.com
included with the application; a seed is used in these files for internal repeatability. You will not need to use a seed for your simulations.
During manufacturing, each part has some variability in its dimensions. Assume that the dimensions (widths) of the parts are distributed as follows: A - Normal distribution with mean = 2 and std = .02 B - Normal distribution with mean = 2 and std = .02 C - Normal distribution with mean = 30 and std = .2 D - Normal distribution with mean = 34.5 and std = .5 Determine the number of items that will not fit within D, or the expected times that (A+B+C) will be greater than D. The following general flowchart shows one way that this problem could be solved using simulation.
Draw Random Values for A , B, C and D Compute A+B+C
NO
Is A+B+C>D
Yes
Count= C ount +1
23
4 First Steps
The steps necessary to solve this problem in RENO are presented in the sections that follow. At this time, we assume that you have started the application.
To create a project, click Create a New Project in the What do you want to do? window that may appear at startup, select New Project from the File menu or click the New Project icon in the MDI toolbar.
The New Project Wizard will be displayed. On the first page, select Blank Project to create a new project from scratch, then click Next. On the second page, select A new blank Flowchart. You will not need a template for this example. Click Next. On the third page, click Finish to create the project. The MDI will look like the one shown next.
24
http://RENO.ReliaSoft.com
To add a new Random Variable, select Add New Definition then Add Random Variable from the Project menu. The properties window for the new Random Variable will appear, as shown next.
Change the Identifier to A, then select Normal from the Distribution drop-down menu. Input the parameters: 2 for Mean and .02 for Std, as given in the background information for the example. The properties window will look like the one shown next.
Click Save & New to save the current Random Variable and leave the window open to create a new one. Repeat this process to define the Random Variables B, C and D. When you have entered the information for Random Variable D, click OK to save the variable and close the window.
Defining these four Random Variables is equivalent to the first requirement in the general flowchart.
It includes three steps executed sequentially from left to right (based on the direction of the arrows).
25
4 First Steps
4.5.3.1 Use a Standard Block to Compute A+B+C To add a Standard Block to the Flowchart, click in the Flowchart window to make it active. Select Add Block from the Flowchart menu or click the Add New Block icon in the Flowchart Constructs toolbar.
Double-click the new block that appears in the Flowchart to open its properties window. Enter Compute A+B+C for the blocks name and (A+B+C) in the Evaluates to field. The properties window will look like the one shown next.
This block adds the values of A, B and C and passes the sum along its outgoing path.
Click OK. The blocks new name will appear below it in the Flowchart.
4.5.3.2 Use a Conditional Block to See if A+B+C Is Greater than D Add a Conditional Block to the Flowchart by selecting Add Block then Add Conditional Block from the Flowchart menu or by clicking the Add Conditional Block icon.
Double-click the new Conditional Block. In the properties window that appears, enter >D for the blocks name. Select > from the drop-down menu in the Condition field, then enter D in the field directly to the right of the conditional operator. This is the value against which the input will be checked.
26
http://RENO.ReliaSoft.com
Enter 1 in the Condition is TRUE field. The properties window will look like the one shown next.
The input from the Standard Block (i.e. the sum of A+B+C) is passed to the Conditional, which checks it against the value of D. If the condition is met (i.e. the value of A+B+C is greater than the value of D), then the Conditional Block evaluates to True and it continues execution by passing 1 to the next Construct (as defined by the Condition is TRUE input). Note that there is no requirement to include a FALSE path. If a path is omitted, RENO will realize that there are no paths to continue down and thus terminate the current simulation.
Click OK.
4.5.3.3 Use Result Storage Block to Count the Number of Times that A+B+C > D Add a Result Storage Block to the Flowchart by selecting Add Block then Add Result Storage from the Flowchart menu or by clicking the Add Result Storage icon.
In the properties window for the Result Storage Block, enter No Fit for the name and select Sum of Results from the list of storage types. The properties window will look like the one shown next.
27
4 First Steps
A Result Storage Block stores values passed to it across different simulations. In this case, the block will hold a sum of all the values passed to it; thus, at the end of N simulations, it will hold the number of times that the Conditional Block was true (i.e. the number of times A+B+C was greater than D).
Click OK. The Flowchart will now look like the one shown next.
4.5.3.4 Join the Blocks to Complete the Flowchart The final step in creating the Flowchart is joining the blocks to dictate the order in which information is passed between them.
To create a relationship line between blocks, you can hold down the Alt key, select Join Blocks from the Flowchart menu or click the Join Blocks icon.
The cursor will change to display a small cross hair. Click the Standard Block, hold down the left mouse button and drag a line to the Conditional Block. When the cross hair is located above the Conditional Block, release the mouse button to create a relationship line. Repeat this procedure to create a relationship line between the Conditional Block and the Result Storage Block. Note that this relationship is automatically labeled T. By default, RENO designates the first outgoing path drawn from a Conditional Block or Logic Gate as the TRUE path and the second outgoing path as the FALSE path. You can change these designations by double-clicking the relationship line, if desired. For this example, keep this path designated as the TRUE path.
28
http://RENO.ReliaSoft.com
To stop adding relationships in the Flowchart and return the cursor to its normal mode, release the Alt key, right-click the Flowchart background or de-select the Join Blocks option. The Flowchart will look like the one shown next.
Note that it is not necessary to create a loop (i.e. an instruction to repeat the steps for N simulations) as shown in the general Flowchart, since RENO is designed to run multiple simulations of a Flowchart.
To open the Simulation Console, select Simulate from the Tools menu or click the Simulate icon.
29
4 First Steps
Enter 1000 for the Number of Simulations and click Simulate to run the simulations. The Simulation Status Display will appear, showing the progress as each simulation is performed. When simulation is complete, the Simulation Console will look like the one shown next.
Note that the current value of the Result Storage Block, No Fit, is displayed in the Display Variable Status area at the top of the window. Click Close to return to the Flowchart and note that the value is also displayed above the Result Storage Block, as shown next.
A+B+C exceeded D in 162 out of 1000 simulations, or 16.2% of the time. In this case, the answer is given not as a percentage but rather as a count. A minor modification to the Flowchart can create a model that returns results as a percentage, as described next.
30
http://RENO.ReliaSoft.com
This involves the use of two reserved keywords, IN and SIMS_TOTAL. IN represents the value passed to the block and SIMS_TOTAL evaluates to the total number of simulations that we are running.1 You can enter the equation manually or click the Function Wizard icon or the Build Equation link to use the Function Wizard to create the equation. You can also press Ctrl+Space to bring up a menu of Definitions and available keywords for use in the equation. Note that recognized Definitions and keywords are automatically color coded to assist in reading the equation.
In the Flowchart, select the relationship line between the Conditional Block and the Result Storage Block by clicking it. You can then delete the line by selecting Delete from the Edit menu or clicking the Delete icon.
Note that you can click and drag the relationship line to a new destination instead, if you prefer (i.e. click the relationship line and drag it to the Normalize block so that it connects the Conditional Block and the Standard Block).
1.
A complete list of reserved keywords is available in Chapter 4 of the RENO Users Guide.
31
4 First Steps
Connect the blocks in the Flowchart as shown next, using the Join Blocks function described in Section 4.5.3.4.
Simulate the Flowchart again, using the settings specified previously. When simulation is complete, the Flowchart will look like the one shown next.
If you are using a fully functional copy of the software (i.e. not a demonstration version), save the analysis. To do this, click the Save icon
32
http://RENO.ReliaSoft.com
or select Save from the File menu. The Save As window will appear. Type Hinge Assembly as the file name and accept the default file type, RENO Project file (*.rnp). By default, RENO will save the file to your My Documents folder; you can select another location if you prefer.2
Click Save to save the file. Close the project by selecting Close from the File menu. You will now be looking at the MDI with no projects open.
Note that this example is based on the RENO file Hinge Assembly.rnp located in the General subfolder of the Examples folder located in your application directory (e.g. C:\Program Files\ReliaSoft\RENO\Examples\General). If you are working with a demonstration version of the RENO software, you will not be able to save the file you created for this example, but you can view the file shipped with the application if you wish to refer to this example in the future.
2.
For the examples in this training guide, we have created a Files folder in the application directory.
33
Step-by-Step Examples
This chapter provides the following step-by-step examples, designed to introduce you to the features of the RENO software:
Example 1 - Estimating Dice Roll Probabilities - page 35 Example 2 - Risk Analysis: Gym Lockers - page 41 Example 3 - Maximizing Profits: The Newspaper Boy Problem - page 49 Example 4 - Maximizing Profits: Airline Seat Allocation - page 55 Example 5 - Minimizing Costs: Preventive Maintenance - page 63 Example 6 - Reliability: Snow Blower - page 70 Example 7 - Simple Reliability and Availability Metrics - page 76 Example 8 - Stress-Strength Calculations - page 88 Example 9 - Failure and Usage Distributions: Washing Machine Usage - page 92 Example 10 - Risk Analysis: Suntan Lotion - page 99 Example 11 - Probability: Rain Prediction - page 102 Example 12 - Probability: Buffons Needle - page 108 Example 13 - Financial Analysis: Retirement Strategy - page 113
Each example is based on a RENO project file (*.rnp) that is shipped with the software, and the full solution is presented in that file. You may wish to view the file that is provided, or to create a new project for each example and work through the steps on your own. Keep in mind that if you are using a demonstration version of the software, you will not be able to save the files that you create.
When you roll a single 6-sided die, what is the probability of rolling a 4? When you roll two 6-sided dice, what is the probability of rolling a pair of 4s?
35
5 Step-by-Step Examples
Define two Random Variables to describe the possible results from rolling each die, as shown next for the first die.
To determine the probability of rolling a 4 with a single die, construct the Flowchart as follows:
Use a Standard Block to obtain the result of the dice roll from the DiceRoll1 Random Variable described above.
36
http://RENO.ReliaSoft.com
Use a Conditional Block to check whether the roll was a 4. If true, then a 1 is passed down the TRUE path. A FALSE path is not required for this example.
Use a Result Storage Block to keep a sum of the number of times that a 4 is rolled (across all simulations).
37
5 Step-by-Step Examples
In this equation, the reserved keyword IN represents the sum from the previous construct and the reserved keyword SIMS_TOTAL represents the total number of simulations.
Use another Result Storage Block to store the final percentage (given as a decimal).
Join the blocks by either holding down the Alt key, selecting Join Blocks from the Flowchart menu or clicking the Join Blocks icon. Click each source block and drag a relationship line to the destination block. Return the cursor to its normal mode by releasing the Alt key, right-clicking the Flowchart background or de-selecting the Join Blocks option.
38
http://RENO.ReliaSoft.com
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
Add a new Flowchart to the project by selecting Add Flowchart from the Project menu. You can rename the new Flowchart by right-clicking the new Flowchart in the Project Explorer and selecting Rename Item from the shortcut menu that appears. In the text box, type Roll Pair of 4s and press Enter. To determine the probability of rolling a pair of 4s with two dice, construct the Flowchart as follows:
39
5 Step-by-Step Examples
In this case, two Standard Blocks are required to obtain the result from each die and a Logic Gate is used instead of a Conditional Block. With AND selected for Gate Type, this construct requires that both paths meet the conditional requirement in order for the condition to be TRUE.
It is important to note that the Required Number of Executed Paths field in the Logic Gate must be set to 2. This ensures that both incoming paths are executed before the Logic Gate is executed. The rest of the Flowchart is identical to the one described above.
40
http://RENO.ReliaSoft.com
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
The value of the items in the lockers is normally distributed with a mean of $500 and a standard deviation of 150. The possibility of a thief stealing the items from a given locker in a year is 5% if unlocked and 1% if locked. A lock costs $5. The lock can fail (according to a Weibull distribution with beta = 2 and eta = 900) and the member has to replace it. Members lose their keys (average time to key loss being 600 days), and it costs another $10 to break the lock whenever a key is lost.
Determine the expected cost in one year of buying vs. not buying a lock.
41
5 Step-by-Step Examples
The time to key loss (using an exponential distribution with Lambda = 1/Mean):
42
http://RENO.ReliaSoft.com
Note that there is a single starting point and a single ending point. This is a requirement for all subcharts. When you create the Flowchart, you can rename it to StolenCosts by right-clicking it in the Project Explorer and selecting Rename Item from the shortcut menu. Type the new name in the text box that appears, then press Enter. In building this subchart, it is important to keep in mind that there is a different probability of occurrence for each case (with lock or without lock). Therefore, the probability should not be defined in the subchart, but rather passed into the subchart from the main Flowchart. This in turn would then be accessible with the keyword IN.
A Flowchart cannot have a Conditional Block (or a Summing Gate, Logic Gate or Branch Gate) as a starting block. Therefore, begin this Flowchart with a Standard Block named Start, which evaluates to IN.
43
5 Step-by-Step Examples
This Conditional Block draws a random number uniformly distributed from 0 to 100 and tests to see if it is less than or equal to the fixed probability of items being stolen from the locker (i.e. 5% if unlocked and 1% if locked). If true, this indicates that the items were stolen and the value of the loss is passed to the TRUE path. If false, then "0" is passed to the FALSE path. In order to exit the subchart without terminating the simulation, you will need to define paths for both the True and False situations that lead eventually to a single ending point. To do that, use two Standard Blocks, Stolen and Not Stolen, each evaluating to IN. These continue simulation by passing the values passed to them to the next Construct. To join the two paths you will need to utilize a Construct that is designed to accept multiple inputs. One option is to use a Summing Gate, since a Summing Gate outputs the sum of active inputs. In this case, only one input is possible, so the output will be either the value passed along the TRUE path (Value) or the value passed along the FALSE path (0).
Name: S Operation: +
Join the blocks by either holding down the Alt key, selecting Join Blocks from the Flowchart menu or clicking the Join Blocks icon. Click each source block and drag a relationship line to the destination block. Return the cursor to its normal mode by releasing the Alt key, right-clicking the Flowchart background or de-selecting the Join Blocks option. When you join blocks to the Summing Gate, their names appear in the Precedence field in the Summing Gate properties window. Since this Summing Gate is performing addition, the order of precedence is unimportant. Note that the order in which you create the relationship lines from the Conditional Block to the Stolen and Not Stolen blocks determines which is identified as the TRUE or FALSE path. By default, RENO designates the first outgoing path drawn from a Conditional Block or Logic Gate as the TRUE path and the second outgoing path as the FALSE path. You can change these designations by double-clicking the relationship line, if needed.
44
http://RENO.ReliaSoft.com
5.2.2.2 Main Flowchart You can now create the main Flowchart, Lock, containing models for both cases.
Add a new Flowchart to the project by selecting Add Flowchart from the Project menu, then rename the Flowchart to Lock.
When the Flowchart is complete, it will look like the one shown next. The steps that follow guide you in creating this Flowchart.
Note that the models for both cases are in the same Flowchart. RENO will simulate each part of a Flowchart, so you can have multiple cases or subroutines within one Flowchart. For the case where no lock is used, the Flowchart is:
Add a Standard Block that evaluates to the desired probability for this case (5%).
45
5 Step-by-Step Examples
This will be passed to the subchart, represented in the Flowchart by the Subchart Block called Stolen Costs. The subchart will return either the value of the loss or 0 if there was no loss.
Add a Subchart Block to the Flowchart. In the window that appears, select the StolenCosts flowchart as the subchart that the block will represent. Name the Subchart Block Stolen Costs. Add a Result Storage Block named Expected Costs to store an average value of all the outcomes (including the zeroes).
Join the blocks by either holding down the Alt key, selecting Join Blocks from the Flowchart menu or clicking the Join Blocks icon. Click each source block and drag a relationship line to the destination block. Return the cursor to its normal mode by releasing the Alt key, right-clicking the Flowchart background or de-selecting the Join Blocks option.
Because the two cases are so similar, you may wish to copy the model you have created in the previous step and then modify it, rather than recreating each of the Constructs. You can do this by clicking inside the Flowchart, holding down the left mouse button and dragging a box around the blocks to be selected, then selecting Copy from the Edit menu. Click in the Flowchart to return focus to it, then select Paste from the Edit menu. The copy will be placed in the Flowchart and will be selected. Click one of the blocks in the copy and drag the copy to the desired location.
For the Probability block, make sure it evaluates to 1, as the probability of theft in cases where a lock is used is 1%.
46
http://RENO.ReliaSoft.com
In this case, an additional block is added to include the additional costs of purchasing and maintaining a lock. A simple way to account for the additional costs is to create an Equation Variable to compute the additional costs.
The following number of lock failures are expected over a year: (INT(365/LockFail)) where INT is a function intrinsic to RENO that rounds a function down to the nearest integer, since you cannot have a partial failure.
The following number of key losses are expected over a year: (INT(365/KeyLoss))
These numbers of events, multiplied by the cost of each respective type of event, will result in the additional expected costs over the year. Add a Standard Block as follows:
47
5 Step-by-Step Examples
Note that if you did not use the Equation Variable and instead defined the equation directly in the Standard Block as follows, you would obtain identical results.
Join the blocks for this model. To include the new block in the copy of the original model, you can delete the relationship line between the Subchart Block Stolen Costs and the Result Storage Block Expected Costs by selecting it and selecting Delete from the Edit menu or clicking the Delete icon, then creating new relationship lines. If you prefer, you can click and drag the relationship line to a new destination instead (i.e. click the relationship line and drag it to the Total Costs block so that it connects the Subchart Block and the Standard Block), then create a new relationship line between Total Costs and Expected Costs.
Over 1000 simulations, the expected yearly cost of using a lock averaged $42.85, while the expected yearly cost of not using a lock averaged $22.72.
48
http://RENO.ReliaSoft.com
Define a Constant that represents the number of papers that the newspaper boy buys. This will be varied during the simulation to determine the optimum quantity.
49
5 Step-by-Step Examples
Define an Equation Variable to calculate the newspaper boys supply cost, which is the quantity of papers purchased (represented by the Quantity Constant) multiplied by 15 cents.
Use a Standard Block to determine the demand for the newspapers based on the Random Variable called Demand.
Use a Conditional Block to check whether the amount of papers on hand (represented by the Constant called Quantity) is equal to or greater than the demand determined in the previous step. If true, then the quantity of papers sold is equal to the Random Variable Demand and this number is passed to the
50
http://RENO.ReliaSoft.com
TRUE path. If false, then the quantity of papers sold is equal to the Constant called Quantity and this number is passed to the FALSE path.
Use two Standard Blocks called Profit 1 and Profit 2 to calculate the amount of revenue from the TRUE and FALSE paths. When supply meets or exceeds demand, this is the demand quantity passed from the Conditional (represented in the equation by the reserved keyword IN) multiplied by the price (25 cents) less the supply cost (represented by the Equation Variable called Cost), as shown next. A similar equation is defined for the FALSE path, where the number of papers sold (IN) is equal to the Constant called Quantity.
51
5 Step-by-Step Examples
Use a Result Storage Block to calculate and store the average profit from all simulations.
Join the blocks as shown in the Flowchart above, making sure that the TRUE and FALSE paths from the Conditional Block are correct.
To first explore the area from 50 to 150, specify 500 simulations on the General page of the Simulation Console then set the Sensitivity Analysis page as shown next.
Click Simulate then, after the simulation completes, close the Simulation Console.
RENO will perform 500 simulations per run, with the Quantity set to 50 for the first run, 60 for the second run, and so on up to 150.
52
http://RENO.ReliaSoft.com
The plot indicates that the optimum value lies somewhere between 80 and 100.
ReliaSoft RENO - www.ReliaSoft.com
10.000
8.000
6.000
Average Profit
4.000 2.000
0.000 10.000
User's Name Company 10/17/2005 12:19:01 PM 48.000 86.000 124.000 162.000 200.000
Quantity
Flowchart: Flowchart1 - Simulations per run: 500 - Sensitivity Analysis (One Way): Quantity - Multiple Analyses Disabled
The next plot shows the results from repeating the simulation with the Quantity varied from 80 to 100 and incremented by 1.
ReliaSoft RENO - www.ReliaSoft.com
8.000
7.800
7.600
Average Profit
7.400 7.200
7.000 80.000
User's Name Company 10/17/2005 12:21:35 PM 84.000 88.000 92.000 96.000 100.000
Quantity
Flowchart: Flowchart1 - Simulations per run: 500 - Sensitivity Analysis (One Way): Quantity - Multiple Analyses Disabled
Given the small number of simulations (500), noise (variation due to simulation) is present. The next step is to increase the number of simulations to 50,000 and focus on the region between 90 and 96, incrementing by 1, as shown next. Note that the plot shown here has had its scaling changed. To make your plot look like this
53
5 Step-by-Step Examples
one, de-select Automatic Scaling on the Control Panel and enter 7.4 for the Y-axis minimum and 7.7 for the Y-axis maximum. You can leave the values of 90 for the X-axis minimum and 96 for the X-axis maximum.
ReliaSoft RENO - www.ReliaSoft.com
7.700
7.640
7.580
Average Profit
7.520 7.460
7.400 90.000
User's Name Company 10/17/2005 1:10:00 PM 91.200 92.400 93.600 94.800 96.000
Quantity
Flowchart: Flowchart1 - Simulations per run: 50000 - Sensitivity Analysis (One Way): Quantity - Multiple Analyses Disabled
In addition to the manual technique described above, RENO can automatically perform multiple analyses designed to determine the quantity that will maximize revenue. To do this, specify 2000 simulations on the General page, specify 60 to 120 with an increment of 12 on the Sensitivity Analysis page and configure the Multiple Analyses page as shown next.
Based on these settings, RENO will perform up to 3 analyses (or fewer if the results converge to within 0.0001 of each other before 3 analyses are complete). Each analysis will consist of the number of runs specified on the Sensitivity Analysis page. In the first analysis, each run will consist of 2000 simulations. Because we have selected to increase the simulations by 2000 in each subsequent analysis, each run in the second analysis will consist of 4000 simulations and each run in the third analysis will consist of 6000 simulations.
54
http://RENO.ReliaSoft.com
The resulting plot of Average Profit vs. Quantity will include a marker and a line to identify the optimum value.
ReliaSoft RENO - www.ReliaSoft.com
7.689 7.633
7.329
6.969
Average Profit
6.608 6.248
5.888 60.000
72.000
84.000
94.000
108.000
Quantity
Flowchart: Flowchart1 - Simulations per run: 2000 - Sensitivity Analysis (One Way): Quantity - Multiple Analyses (Maximize): Average Profit
From this plot, we can see that the optimum number of newspapers for the newsboy to buy is 94.
Demand for coach tickets is based on a Weibull distribution with beta = 2 and eta = 45. Demand for first class tickets is based on a Weibull distribution with beta = 1.2 and eta = 15. Revenue for each coach ticket is $500. Revenue for each first class ticket is $1,500. Operating costs are fixed.
Determine the optimum allocation of first class seats, assuming that only increments of four seats are allowed.
55
5 Step-by-Step Examples
Define two Random Variables to describe the demand for coach tickets and first class tickets.
Define a Constant to specify the number of first class seats. This will be varied during the simulation to estimate the optimum number.
Define an Equation Variable to calculate the number of coach seats, which depends on the number of first class seats.
56
http://RENO.ReliaSoft.com
Use a Standard Block to obtain the demand for coach seats from the Random Variable.
Use a Conditional Block to check whether the demand for coach seats is less than the number of coach seats (which is calculated by the Equation Variable). If it is (i.e. the condition is True), then the number of coach seats sold will be equal to the demand, so the demand quantity is passed down the TRUE path. If demand is greater than or equal to the number of coach seats (i.e. the condition is False), then the
57
5 Step-by-Step Examples
number of coach seats sold will be equal to the number of available coach seats, so the available quantity is passed down the FALSE path.
Use two Standard Blocks to calculate the revenue from the TRUE and FALSE paths, as shown next for the situation when supply exceeds demand.
In this equation, the reserved keyword IN represents the quantity of seats sold (passed from the Conditional Block), which is then multiplied by the $500 price of a coach ticket.
58
http://RENO.ReliaSoft.com
Join the blocks for this portion of the model, making sure that the TRUE and FALSE paths from the Conditional Block are correct.
Create a similar configuration to describe the revenue for first class seats. You will need:
59
5 Step-by-Step Examples
Two Standard Blocks to calculate the Revenue from the TRUE and FALSE paths, as shown next for the situation when supply exceeds demand.
Join the blocks for this portion of the model, making sure that the TRUE and FALSE paths from the Conditional Block are correct. Your flowchart will now look like the one shown next.
A Summing Gate collects the revenue values from all four incoming paths and performs a summation. Note that the Required Number of Executed Paths field in the Summing Gate must be set to 2. This ensures that both incoming paths are executed before the Summing Gate is executed.
60
http://RENO.ReliaSoft.com
The result is then passed to a Result Storage Block that stores the average total revenue.
On the General page of the Simulation Console, specify 2000 simulations. You may wish to specify YAxis limits of -40,000 to 40,000, as shown next, for the most informative display during simulation.
61
5 Step-by-Step Examples
On the Sensitivity Analysis page of the Simulation Console, specify to vary the Constant FCSeats from 0 to 48, with an increment of 16, as shown next.
RENO will perform multiple runs of 2000 simulations each, with FCSeats equal to 0 in the first run, 20 in the second run, 40 in the third run, and so on. In this case, this comes to six runs. The Multiple Analyses feature in the Simulation Console allows you to perform the Sensitivity Analysis multiple times in order to maximize or minimize a Result Storage Block.
On the Multiple Analyses page of the Simulation Console, select to perform multiple analyses to determine the first class seat quantity that will maximize revenue. Choose Maximize for the Action and accept Total Revenue as the input for Result Storage. Specify 3 for Max. Analyses and 0.0001 for Std. Deviation. Enter 2000 in the Increase Simulations field and select Use Integers Only with a minimum increment of 4, as shown next.
Based on these settings, RENO will perform up to 3 analyses (or fewer if the results converge to within 0.0001 of each other before 3 analyses are complete). Each analysis will consist of the number of runs specified on the Sensitivity Analysis page (6 in this case). In the first analysis, each run will consist of 2000 simulations. Because we have selected to increase the simulations by 2000 in each subsequent analysis, each run in the second analysis will consist of 4000 simulations and each run in the third analysis will consist of
62
http://RENO.ReliaSoft.com
6000 simulations. Note that by specifying to use only integers with a minimum increment of 4, we have ensured that only multiples of 4 are used as RENO narrows the value range of FCSeats over multiple analyses. This meets the specification that only increments of four seats are allowed.
In the Flowchart Control Panel, click the Plot icon to plot the simulation results.
The plot that is created will look like the one shown next.
ReliaSoft RENO - www.ReliaSoft.com
36342.027
33041.444
29740.861
Total Revenue
26440.279 23139.696
19839.113 0.000
User's Name Company 10/17/2005 10:50:36 AM 9.600 19.200 24.000 28.800 38.400 48.000
FCSeats
Flowchart: Seat Allocation - Simulations per run: 2000 - Sensitivity Analysis (One Way): FCSeats - Multiple Analyses (Maximize): Total Revenue
63
5 Step-by-Step Examples
Define a Random Variable called TTF to describe the failure distribution for the unit and another Random Variable called TTR to describe the repair distribution.
Define three Constants to describe the operating time for the equipment, the fixed cost for each PM and the cost per each hour of downtime.
Define another Constant called PM Time to specify the PM interval. This will be set to 1 by default and varied during the simulation in order to determine the optimum time.
64
http://RENO.ReliaSoft.com
Define an Equation Variable to calculate the cost of corrective maintenance (CM), which is the cost per CM (Time to Repair x Downtime Cost per Hour) multiplied by the number of CMs (Operating Time / Time to Failure).
Use a Standard Block to obtain the failure time from the TTF Random Variable.
Use a Conditional Block to determine whether the failure time is equal to or greater than the specified PM interval. If true, then pass 2 to the TRUE path. If false, then pass 3 to the FALSE path. Note that the
65
5 Step-by-Step Examples
numbers passed are arbitrary since the blocks following do not use the values sent by the Conditional Block.
In the FALSE path (which indicates that the failure occurred before the PM), use a Standard Block to obtain the corrective maintenance cost from the CorrectiveCost Equation Variable.
66
http://RENO.ReliaSoft.com
In the TRUE path (which indicates that the failure did not occur before the PM), use a Standard Block to calculate the preventive maintenance cost. This is the cost per PM multiplied by the number of PMs (Operating Time / Time to PM).
Use a Result Storage Block to store the average of the PM and CM costs from all simulations.
Join the blocks in the Flowchart. Be sure that the TRUE and FALSE paths from the Conditional Block are correct; note that in this Flowchart, FALSE is the top path.
67
5 Step-by-Step Examples
On the Sensitivity Analysis page of the Simulation Console, specify to vary the Constant PMTime from 100 to 500, with an increment of 100.
On the Multiple Analyses page of the Simulation Console, select to perform multiple analyses to determine the time that will minimize the costs. Choose Minimize for the Action and accept Cost as the
68
http://RENO.ReliaSoft.com
input for Result Storage. Specify 5 for Max. Analyses and 0.001 for Std. Deviation. Enter 100 in the Increase Simulations field.
In the Flowchart Control Panel, click the Plot icon to plot the simulation results. The optimum value will be marked on the Costs vs. PMTime plot, as shown next.
ReliaSoft RENO - www.ReliaSoft.com
1000.000
893.631
787.263
Costs
680.894 574.525 518.676
468.156 100.000
180.000
260.000
337.500
420.000
PMTime
Flowchart: Flowchart1 - Simulations per run: 1000 - Sensitivity Analysis (One Way): PMTime - Multiple Analyses (Minimize): Costs
69
5 Step-by-Step Examples
Define a Probability called SnowProbability and a Constant called SnowThreshold to determine whether it will snow on a given day. If a random number uniformly distributed from 0 to 1 (generated by SnowProbability) is less than or equal to the fixed probability that it will snow on any given winter day (defined by SnowThreshold), this indicates that it snowed during the simulation.
70
http://RENO.ReliaSoft.com
Define a Random Variable called Snowfall_inches to describe the depth of the snow.
Define a Random Variable called Area_to_clean_ft2 to describe the area of the driveways.
Define an Equation Variable to describe the number of hours that the snow blower will be used based on the amount of snowfall and the area of the driveways.
Snowfall_inches/12
71
5 Step-by-Step Examples
Multiplying this by the area of the driveways (Area_to_clean_ft2) gives the number of cubic feet of snow to be cleared. Divide this number by the number of cubic feet the snow blower can clear in an hour (30) to determine the number of hours it will take to clear the snow, then multiply that figure by the 100 winter days to determine the number of hours of usage for the winter.
Use a Standard Block to generate a random number uniformly distributed from 0 to 1, based on the Probability called SnowProbability.
Use a Conditional Block to check whether the random number is less than or equal to the fixed probability of snow on any given winter day (based on the Constant called SnowThreshold). If true,
72
http://RENO.ReliaSoft.com
this indicates that it snowed and the value of the Equation Variable Usage_Hours is passed to the TRUE path. If false, this indicates that it did not snow and 0 is passed to the FALSE path.
Use Standard Blocks called Snow and No Snow, each evaluating to IN, to continue the TRUE and FALSE paths coming from the Conditional Block.
73
5 Step-by-Step Examples
Use a Summing Gate to accept the two incoming paths and perform a summation on the snow blower usage information that is passed to the construct. The result is one outgoing path.
Use a Result Storage Block called Usage to store an average of the snow blower usage information that is passed to the construct.
Use a Standard Block called Reliability to calculate the snow blower reliability.
74
http://RENO.ReliaSoft.com
This equation uses RENOs intrinsic function, WEIBULL_REL, which returns the Weibull reliability at a given time. The inputs to this intrinsic function are (Time, Beta, Eta, Gamma). It is important to note here that RENO is regionally aware (i.e. it will work with your regional settings). Therefore, if your regional settings use a different decimal definition and list separator, the way that you enter values and functions will differ from the way presented here. For example, if you are using German regional settings, the inputs to this function should be entered based on the German regional decimal definition (,) and list separator (;). The use of the reserved keyword IN indicates that the daily usage time from the previous Usage construct will be inserted into the equation for Time.
Use another Result Storage Block called Snow Blower Reliability to store the last value.
75
5 Step-by-Step Examples
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
Failure: Weibull with beta = 2 and eta = 100 Repair: Weibull with beta = 2 and eta = 10
Use RENO to estimate the MTTF, Reliability, Availability and other results.
Create two Random Variables to describe the failure and repair distributions.
76
http://RENO.ReliaSoft.com
Create two Constants to describe the time of interest for the reliability and availability calculations.
Use a Standard Block to obtain the failure time from the distribution defined in the Random Variable called WeibullTTF.
77
5 Step-by-Step Examples
5.7.2.2 Simulate the Flowchart On the General Page of the Simulation Console, specify 5000 simulations.
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
In this case, the time at which the Reliability is calculated is 20, based on the Constant called TimeForReliability.
78
http://RENO.ReliaSoft.com
Use a Standard Block to obtain the failure time from the distribution defined in the WeibullTTF Random Variable, as described above.
Use a Conditional Block to check whether the failure occurred before the time of interest. If false, then a 1 is passed to a Result Storage Block that stores a sum (i.e. the number of times, across all of the simulations, that the unit did not fail before the specified time). When you join the blocks, RENO automatically labels the first path as the TRUE path. Double-click the relationship line to change it to the FALSE path. A TRUE path is not required for this Flowchart.
Use a Standard Block to convert the sum to a percentage. In this equation, the reserved keyword IN represents the sum from the previous construct and the reserved keyword SIMS_CUR represents the
79
5 Step-by-Step Examples
index for the current simulation. This fraction is multiplied by 100 to convert the results to a percentage. Another Result Storage Block is used to store and display the final result.
5.7.3.2 Simulate the Flowchart On the General page of the Simulation Console, specify 5000 simulations.
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
80
http://RENO.ReliaSoft.com
On the Sensitivity Analysis page of the Simulation Console, select to vary the TimeForReliability Constant from 0 to 200 with increments of 20, as shown next.
81
5 Step-by-Step Examples
5.7.4.2 Plot the Results In the Flowchart Control Panel, click the Plot icon to plot the simulation results.
ReliaSoft RENO - www.ReliaSoft.com
80.000
60.000
Reliability (%)
40.000 20.000
0.000
User's Name Company 11/6/2006 3:36:01 PM 0.000 40.000 80.000 120.000 160.000 200.000
TimeForReliability
Flowchart: Simple Reliability - Simulations per run: 1000 - Sensitivity Analysis (One Way): TimeForReliability - Multiple Analyses Disabled
Note that this plot displays the Result Storage Block called Reliability plotted against the varied Constant, TimeForReliability. If desired, you can use the Select Result Storages area in the Control Panel to select the Result Storage Block called Survive to be plotted either instead of or along with Reliability.
82
http://RENO.ReliaSoft.com
Use a Standard Block to obtain the time to failure from the failure distribution defined in the WeibullTTF Random Variable, as described above.
Use a Conditional Block to check whether the unit is still operating at the time of interest, which is 100, based on the Constant called TimeForAvailability.
83
5 Step-by-Step Examples
If true, then a 1 is passed to a Result Storage Block that stores a sum (i.e. the number of times, across all of the simulations, that the unit did not fail before the specified time).
If false, then the failure time is passed to a Standard Block that adds the repair time (based on the WeibullTTR Random Variable).
Your Flowchart so far will be configured as follows (note that the blocks have been joined in this figure to clarify the relationships).
For units that fail and are repaired (i.e. are on the FALSE path), use a Conditional Block to check whether repair is complete and the unit is back in operation at the time of interest. If true, pass the
84
http://RENO.ReliaSoft.com
incoming value (the sum of the failure time and the repair time, as calculated by the Standard Block Time Up) down the TRUE path. No FALSE path is needed.
Use a Reset Block to cause RENO to generate new values for the Random Variables. Use a Standard Block to add the new failure time (based on the WeibullTTF Random Variable) to the incoming value. This represents the time of the next failure for the unit that has failed and been repaired.
Use a Go to Flag to pass the value to a Flag Marker, which is placed before the first Conditional Block, creating a loop as follows.
85
5 Step-by-Step Examples
Add a Go to Flag after Get New Failure Time and select the Flag Marker Time in the Go to Flag Marker field.
By checking the next failure time against the time of interest for the availability estimate, this configuration allows you to see whether the repaired unit is up at the time of interest, regardless of how many times it is repaired before that time. Your Flowchart so far will be configured as follows (note that the blocks have been joined in this figure to clarify the relationships).
As described above for the Reliability Flowchart, a Standard Block is placed after UP Count and used to convert the results to a percentage and a Result Storage Block is used to store the final result. When you join the blocks in the Flowchart, note that it is not necessary to draw a relationship line between the Go to Flag and the Flag Marker, as the path is specified by the Go to Flag, but you can draw the line to make the relationship visually clear, if desired.
86
http://RENO.ReliaSoft.com
5.7.5.2 Simulate the Flowchart On the General page of the Simulation Console, specify 5000 simulations.
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
87
5 Step-by-Step Examples
97.640
95.860
Availability
94.080 92.300
90.520 10.000
28.000
46.000
64.000
82.000
TimeForAvailability
Flowchart: Simple Availability Plot - Simulations per run: 5000 - Sensitivity Analysis (One Way): TimeForAvailability - Multiple Analyses Disabled
Define two Random Variables to describe the stress and strength distributions.
88
http://RENO.ReliaSoft.com
Use a Standard Block and the Equation Variable to subtract stress from strength.
89
5 Step-by-Step Examples
Use a Conditional Block to check whether (Strength Stress) is less than or equal to 0. If true, then stress exceeded strength, the unit failed, and a 1 is passed to the TRUE path. If false, then stress did not exceed strength and the unit did not fail. There is no need to continue on the FALSE path for this example.
Use a Result Storage Block to keep a summation of the number of times that the unit failed.
Use a Standard Block to normalize the results by converting them to a percentage that represents the number of failures out of all the simulations. In this equation, the reserved keyword IN represents the
90
http://RENO.ReliaSoft.com
sum from the previous construct and the reserved keyword SIMS_TOTAL represents the number of simulations. This fraction is multiplied by 100 to convert the results to a percentage.
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
91
5 Step-by-Step Examples
Determine the Reliability of the machine for 2000 hrs of operation. Obtain a plot of Reliability vs Time from 1000 hrs to 10,000 hrs (using 1000 hr increments). Generate a data set of times-to-failure for subsequent life data analysis.
Define an Equation Variable to describe the life-stress relationship, which is used to determine the scale parameter, eta, for each load. The equation refers to a Random Variable called Usage Load, which describes the distribution for customer loads.
In the LSR Equation Variable, an inverse power life-stress relationship is assumed to describe the effect of loading on life.
ReliaSofts Accelerated Life Testing Reference provides more information on this model.
92
http://RENO.ReliaSoft.com
The Constants k and n are the variables of that relationship obtained by solving this model for the given conditions, or for L(V=5)=10,000 and L(V=10)=2,500.
Define the Constant Life, which will be used to specify the time for which Reliability is estimated and also can be varied during the simulation to obtain reliability estimates for a range of times.
Define a Random Variable to describe the failure distribution for the washing machine.
93
5 Step-by-Step Examples
Use a Standard Block to obtain the time-to-failure from the Random Variable called Failure Time.
The Conditional Block checks whether the failure time is less than or equal to 2000 hrs (defined with the Constant called Life). If true, then 100 is passed to the TRUE path and 0 is passed to the FALSE path. If false, then 100 is passed to the FALSE path and 0 is passed to the TRUE path1 To achieve this, be sure
This example shows another way to normalize results instead of using a Standard Block as shown in other examples. Here, normalization is achieved by passing 100 down each of the Conditional Blocks outgoing paths rather than passing 1.
1.
94
http://RENO.ReliaSoft.com
that Continue execution on both paths is checked, and that 0 is entered for both the Condition is TRUE - F Path and the Condition is FALSE - T Path fields.
It is important to note that this Conditional Block tests for product failure before the time of interest (Life). If the condition is true, the product has failed. Thus, results passed down the TRUE path refer to a probability of failure. When building this Flowchart, make sure that the T path and the F path go to the correct Result Storage Blocks. By default, RENO designates the first outgoing path drawn from a Conditional Block as the T path and the second outgoing path as the F path. You can change these designations by double-clicking the relationship line if necessary.
On the TRUE path, use a Result Storage Block to store an average of the failures (across all simulations). On the FALSE path, use a Result Storage Block to store an average of the successes. The Result Storage Block called Reliability, on the FALSE path, is shown next.
95
5 Step-by-Step Examples
5.9.2.2 Simulate the Flowchart On the General page of the Simulation Console, specify 2000 simulations.
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
The reliability of the washing machine for 2000 hours of operation is 98.5%.
96
http://RENO.ReliaSoft.com
On the Sensitivity Analysis page of the Simulation Console, select to vary the Life Constant from 1000 to 10,000 with increments of 1000, as shown next.
5.9.3.2 Plot the Results In the Flowchart Control Panel, click the Plot icon to plot the simulation results.
ReliaSoft RENO - www.ReliaSoft.com
99.800
87.990
76.180
Reliability
64.370 52.560
40.750 1000.000
2800.000
4600.000
6400.000
8200.000
Life
Note that you may need to change the Result Storage Block in the Plot Sheet Control Panel from Probability of Failure to Reliability.
97
5 Step-by-Step Examples
The Time to Failure Standard Block is defined as described above for the previous Flowchart. Use a Result Storage Block to store an array of the failure times obtained by the Standard Block.
5.9.4.2 Simulate the Flowchart On the General page of the Simulation Console, specify 1000 simulations.
98
http://RENO.ReliaSoft.com
When simulation is complete, click Details to display the table of results in the Simulation Results Explorer. When the Simulation Results Explorer opens, click the (+) beside Result Storages in the Control Panel, then select Time to Failure Array to display the Result Storage Block results, as shown next. Note that the Transpose Results command in the Tools menu may be required to place each result into a separate row (rather than a separate column), as shown here. Because the Simulation Results Explorer has only 256 columns, you must place the results in rows to view all of them. Only the first five results are displayed in the picture.
Close the Results Explorer when you have reviewed the results.
99
5 Step-by-Step Examples
Define a Random Variable to describe the concentration of chemical X in the suntan lotion and a Random Variable to describe the users application of the lotion.
Define an Equation Variable to describe the amount of chemical X applied by the user, which is the amount of lotion applied multiplied by the concentration of chemical X in the lotion.
Define a Probability to describe the likelihood that a susceptible user will experience an allergic reaction.
This probability is based on the Weibull distribution and the amount of exposure calculated by the Chemical_Applied variable.
100
http://RENO.ReliaSoft.com
Use a Standard Block to calculate the percentage of the population affected based on the probability of a reaction.
This equation multiplies the value of the Probability by the percentage of the population that is susceptible (0.1) and by 100 to convert the figure into a percentage.
101
5 Step-by-Step Examples
When simulation is complete, the results are displayed in the Simulation Results Explorer and in the Flowchart, as shown next.
Based on these results, 0.4203% of the population are expected to experience a reaction to the suntan lotion.
If it has rained for the past two days, then it will rain tomorrow with probability 0.8. If it rained today but not yesterday, then it will rain tomorrow with probability 0.4. If it rained yesterday but not today, then it will rain tomorrow with probability 0.3. If it has not rained in the past two days, then it will rain tomorrow with probability 0.2.
We can transform the above model into a Markov chain by saying that the state at any time is determined by the weather conditions during both that day and the previous day. In other words, we can say that the process is in:
State 0 if it rained both today and yesterday. State 1 if it rained today and but not yesterday. State 2 if it rained yesterday but not today.
102
http://RENO.ReliaSoft.com
The preceding would then represent a four-state Markov chain having the following transition probability matrix:
The limiting probabilities for these states are found respectively to be 8/30, 4/30, 4/30 and 14/30. Therefore, we have: Proportion of Rain = 0.8 * 8 / 30 + 0.4 * 4/30 + 0.3 * 4/30 + 0.2 * 14/30 = 0.4 The RENO solution is presented next.
Define three Storage Variables to keep track of the weather conditions for Yesterday, Today and Tomorrow, as shown next for Today. At each iteration, Yesterday and Today are reset to reflect the new scenario, i.e. Today becomes Yesterday and Tomorrow becomes Today.
Define four Constants to represent the probability of rain tomorrow: if it rained for the last two days (R_R = .8); if it rained today but not yesterday (NR_R = .4); if it rained yesterday but not today (R_NR = .3); and if it has not rained today or yesterday (NR_NR = .2). The R_R Constant is shown next as an example.
103
5 Step-by-Step Examples
Define a uniform Probability to determine the probability that it will rain on a given day.
Define a Constant called Loop to specify the number of loops that will be performed during a single simulation run.
In addition, define two Storage Variables called Probability and Rain Counter to hold the values that are passed during the simulation for the probability of rain tomorrow and the number of days that it rains, respectively. These should also be reset after each simulation.
104
http://RENO.ReliaSoft.com
The Start Flag that begins each loop of the simulation has ordered relations (identified with numbers over the lines) leading first to the Standard Block that indicates whether it rained Yesterday and then to the Standard Block that indicates whether it rained Today (based on the previous loop of the simulation). If the execution were to happen in the opposite order, the information on whether or not it rained today would be overwritten for the next loop. You can set the ordered relations by selecting the source block (i.e. the Flag Marker), choosing Ordered Relations, then drawing the relationship lines. The Standard Blocks are shown next.
A Logic Gate construct checks to see whether it has rained for the last two days. If true, then the R_R probability (.8) is passed to the Result Storage Block called Probabilities, which holds the last value passed to it and updates the Storage Variable called Probability. If false, then the simulation moves to a Conditional Block that checks to see whether it rained yesterday. If true, then the R_NR probability (.3) is passed. If false, then the simulation moves to another Conditional Block that checks to see whether it rained
105
5 Step-by-Step Examples
today. If true, then the NR_R probability (.4) is passed and if false, then the NR_NR probability (.2) is passed. (The extra Standard Block, Didnt Rain For Two Days, in the FALSE path is just used to pass the NR_NR probability to the Result Storage Block, and evaluates to IN.)
Another Conditional Block uses the probability that is passed from the Result Storage Block (.8, .4, .3 or .2) and the uniform probability of rain, ProbabilityRain, to determine whether it will rain tomorrow.
Two Standard Blocks, Rain and No Rain, evaluate to IN and update the Storage Variable Tomorrow.
106
http://RENO.ReliaSoft.com
A Counter Block called Rain Counter keeps track of how many days it rains.
The loop that is required to solve this example is constructed by using a Counter Block called Day Counter that is reset after each simulation to keep track of how many days have been simulated. This value is passed to a Conditional Block called Done? that checks the Loop Constant to determine whether the specified number of days, 5000, have been simulated.
If the specified number of days have not yet been simulated, then the FALSE path leads to a Reset Block that points to a Go To Flag that points to the Start Flag, so that the simulation can move through the flowchart again.
107
5 Step-by-Step Examples
Once the specified number of days have been simulated, the Standard Block Done calculates the number of days that it rained divided by the number of days simulated.
The Result Storage Rain Portion stores the last value passed to it.
108
http://RENO.ReliaSoft.com
Define two Constants to describe the distance between the two horizontal lines (d) and the length of the needle (l).
Define two Random Variables to describe the distance from the end of the needle to the horizontal line (A) and the angle at which the needle falls (Theta), as shown next.
Define an Equation Variable to determine the span of the needle based on the length of the needle and the angle at which it falls (lsin()). If this is greater than A, then the needle crossed the horizontal line. SIN and RADIANS are pre-defined functions in RENO that can be typed into equations or inserted via the Function Wizard.
109
5 Step-by-Step Examples
Use a Standard Block to obtain the distance from the end of the needle to the horizontal line (A), based on the Random Variable.
Use a Conditional Block to determine whether the needle crossed the horizontal line. If the span of the needle (determined by the Equation Variable called Hit) is greater than or equal to the distance that was passed from the preceding Construct (A), then the needle crossed the horizontal line and a 1 is passed to the TRUE path. A FALSE path is not required for this example.
Use a Result Storage Block to store a sum of the number of times that the needle crossed the horizontal line (i.e. M in Laplaces equation to approximate ).
110
http://RENO.ReliaSoft.com
Use a Standard Block to enter Laplaces equation to approximate . In this equation, the reserved keyword IN represents the value of M passed from the previous construct and the reserved keyword SIMS_TOTAL represents the total number of simulations (i.e. N in Laplaces equation).
111
5 Step-by-Step Examples
Specify to perform 1000 simulations and vary the seed from 1 to 10 with increments of 1, as shown next. This will result in 10 runs of 5000 simulations each, using a different set of randomly generated numbers for each run to give us a feel for the variation in the results.
112
http://RENO.ReliaSoft.com
The results are displayed in the Simulation Results Explorer, as shown next.
The interest from the bank investment follows a generalized gamma distribution with mean = 1.7406, standard deviation = 0.1141 and lambda = 4.3106. The profit from NASDAQ investment follows a normal distribution with mean = 13 and standard deviation = 28.
113
5 Step-by-Step Examples
Note that you can use the Weibull++ software to analyze data on average bank interest rates and NASDAQ annual returns to obtain the distribution and parameters for this analysis. You will choose to invest X% of your income per year for the next Y years. Assume that your current income is $40,000 per year and, based on past history, that your income will increase yearly by a percentage that is normally distributed with mean = 4 and standard deviation = 1.5. You will decide to put Z% of your investment money in the bank for the first year and the remainder in NASDAQ. Given the volatility of NASDAQ, the following strategy is applied for subsequent years:
Any profits made in the stock market at the end of each year will be transferred into the savings account for safe keeping. Thus, the amount invested in NASDAQ will be restricted to the initial amount put in plus annual contributions and minus any losses. The amount invested in NASDAQ will not increase as your income increases every year. It will always be equal to the first year investment.
You can use RENO to model this investment strategy and determine a variety of different results. For example, you may wish to:
Estimate your investment income over the next 20 years if you invest 5% of your yearly income with 50% going to savings. Compare your investment income after 20 years, varying the investment portion from 0% to 20% of your yearly income (with 50% going to savings). Compare your investment income after 20 years, varying the investment portion from 0% to 20% of your yearly income and varying the amount invested in savings from 0% to 100%.
Define two Random Variables to describe the returns from the BANK and NASDAQ investment vehicles.
114
http://RENO.ReliaSoft.com
Define a third Random Variable to describe the yearly increase in your income.
Define three Constants to set the number of years that will be analyzed, the percentage of your yearly income that will be invested and the percentage of the investment that will go to NASDAQ each year. The values of these Constants can be varied during the simulation to determine specific results of interest.
(Note that in the example file shipped with the software, three separate constants are defined for Years. This is simply so that each flowchart uses a different constant, enabling the example file to display consistent simulated results for each flowchart.)
Define two Equation Variables to calculate the amount of money that will be invested in the bank each year. This is determined by calculating the investment amount for the year and then subtracting the amount that will be invested in NASDAQ.
115
5 Step-by-Step Examples
Define a third Equation Variable to calculate the threshold that will be used to determine whether you earned money in the stock market during a given year (and will therefore move those earnings into the bank account).
Note that these Equation Variables refer to defined Storage Variables (i.e. CurrentSalary, StocksPortion and CurrentYear), which hold values obtained from the flowchart during simulation. You will also need to define three more Storage Variables for use during simulation: AdditionalEarnings, BankIncome and StocksIncome. CurrentSalary has a Start Value of 40,000, reflecting the salary you are starting at. All other Storage Variables have a Start Value of 0. All of the Storage Variables are reset after each simulation.
116
http://RENO.ReliaSoft.com
Use a Standard Block to calculate the amount of money that will be invested in NASDAQ for the first year and place this value into the Storage Variable StocksPortion.
117
5 Step-by-Step Examples
Use two Standard Blocks to calculate the amount of money in the bank and in NASDAQ at the end of the year and to store these values in the Storage Variables BankIncome and StocksIncome, respectively.
For the BANK investment vehicle, this is the amount invested in the bank for the given year (SavingsPortion) plus any NASDAQ earnings from the previous year (AdditionalEarnings) plus the amount of money in the bank account at the end of the previous year (BankIncome) multiplied by the interest earned during the year. (1+BankInterest/100). For the NASDAQ investment vehicle, this is the amount invested in stocks for the given year (StocksPortion) plus the amount of money in the NASDAQ account at the end of the previous year (StocksIncome) multiplied by the interest earned during the year (1+StockProfit/100).
Use a Conditional Block to check whether the value of "StocksIncome" exceeds the value of "SavingsThreshold" in order to determine whether you have earned or lost money in NASDAQ during the current year and pass the values required to update the storage variables accordingly.
118
http://RENO.ReliaSoft.com
In the False path, a Standard Block called "Save Additional Earnings" calculates the amount of the earnings, if any, and updates the "AdditionalEarnings" storage variable. In the True path, a Standard Block called "Save Stocks Income" updates the "StocksIncome" storage variable.
Next, use a Standard Block to calculate next year's salary and update the "CurrentSalary" storage variable.
Once you have defined the model for the first year of investment, the next step is to create a loop in the flowchart to model each subsequent year until the specified number of years have been simulated. To do this, insert a Start flag and a Reset block before the Standard Blocks that calculate the amount of money in each investment vehicle at the end of a given year. The flag identifies the starting point for the loop and the Reset block regenerates the random variables for each year. Also insert a Go To Flag Marker after the "Save New Salary" block, which points to the Start flag and creates the loop. Within the loop, insert a Counter Block to track the number of loops that have been executed (i.e. number of years that have been simulated). Note that the Counter Block requires two paths in, which
119
5 Step-by-Step Examples
keeps it from executing until both incoming paths have been executed, and that its value is stored in the Storage Variable CurrentYear.
Then insert a Conditional Block to check whether the required number of years have been simulated, as specified in the Constant "Years." If not, then the simulation continues to the "Earned Money" Conditional Block as described above and the simulation continues to loop through the flowchart.
120
http://RENO.ReliaSoft.com
When the required number of years have been looped through, the simulation continues to a Summing Gate, which leads to two Standard Blocks that normalize the "BankIncome" and "StocksIncome" amounts across all simulations, as shown next for BankIncome.
A Result Storage block then stores the sum of the bank and stock incomes, which represents the total investment income for the given investment strategy.
88629.821
67016.303
TOTAL
45402.784 23789.265
2175.747 1.000
User's Name Company 10/17/2005 1:33:44 PM 4.800 8.600 12.400 16.200 20.000
Years1
Flowchart: 1. 5% Invested - vary years - Simulations per run: 1000 - Sensitivity Analysis (One Way): Years1 - Multiple Analyses Disabled
121
5 Step-by-Step Examples
To compare your investment income after 20 years, varying the investment portion from 0% to 20% of your yearly income, configure the Sensitivity Analysis page of the Simulation console as follows and repeat the simulation.
436155.865
348924.692
261693.519
TOTAL
174462.346 87231.173
0.000 0.000
User's Name Company 10/17/2005 1:32:26 PM 4.000 8.000 12.000 16.000 20.000
InvestmentPercent
Flowchart: 2. After 20 Years - vary investment - Simulations per run: 1000 - Sensitivity Analysis (One Way): InvestmentPercent - Multiple Analyses Disabled
122
http://RENO.ReliaSoft.com
To compare your investment income after 20 years, varying the investment portion and the amount invested in savings, configure the Sensitivity Analysis page as follows and repeat the simulation.
123
Practice Questions
This chapter provides the following examples, designed to provide further practice in building RENO Flowcharts to model probabilistic scenarios:
Example 1 - Reliability and Availability: Aircraft Readiness - page 125 Example 2 - Risk Analysis: Complex Fuel System Risk Analysis - page 126 Example 3 - Probability: Blackjack - page 127 Example 4 - Probability: Buffys Mood - page 127 Example 5 - Probability: Lottery - page 128 Example 6 - Probability: Running Shoes - page 128 Example 7 - Probability: Roulette - page 129
Note that these examples are not covered in detail. Each example is based on a RENO project file (*.rnp) that is shipped with the software, and the full solution is presented in that file.
125
6 Practice Questions
The leak failure mode is governed by a Weibull distribution with a shape parameter of 3 and a scale parameter of 1,000 days. Each leak can be classified as one of three types, with a specified fixed probability for each type:
It is a risk issue if it fails to ventilate and an ignition source is present at the same time.
Assume a MTTF of 1000 days for the ventilation mechanism and a fixed probability of an ignition equal to 20%.
If a fire occurs, an explosion will not occur. If a fire does not occur, an explosion will occur. The probability that it is a fire rather than an explosion is 80%.
It is a risk issue if it fails to ventilate and an ignition source is present at the same time.
Assume a MTTF of 1000 days for the ventilation mechanism and a fixed probability of an ignition equal to 20%. If ignited, it can cause a fire 80% of the time.
It is a risk issue if it fails to ventilate and an ignition source is present at the same time.
Assume a MTTF of 1000 days for the ventilation mechanism and a fixed probability of an ignition equal to 20%. If ignited, it can cause a fire 99% of the time.
Regarding Personnel At any time, there is a 30% chance that personnel will be in the compartment.
The number of personnel in the compartment is normally distributed with mean of 5 and standard deviation of 1. If personnel are in the compartment, there is a 50% probability that they may be exposed/injured by the fire and a 99% probability that they may be exposed/injured by the explosion.
126
http://RENO.ReliaSoft.com
Determine the number of personnel who may be injured if 100 units operate for 3000 days, and what type of injury they will sustain.
Note that in this simple example all hands payoff 1-1 (including a blackjack) and no splits or double downs are contemplated.
If she is cheerful today, then she will be C, S or G tomorrow with respective probabilities of 0.7, 0.2, 0.1. If she is so-so today, then she will be C, S or G tomorrow with respective probabilities of 0.4, 0.3, 0.3.
127
6 Practice Questions
If she is gloomy today, then she will be C, S or G tomorrow with respective probabilities 0.2, 0.4, 0.4.
What proportion of time is Buffy cheerful? An algebraic solution to this can be obtained using Markov chains where the transition matrix is:
with three states: cheerful, so-so and gloomy. The limiting probabilities for these states are found to be 30/ 59, 16/59 and 13/59, respectively. Therefore, Buffy is cheerful 30/59 or about 51% of the time. Use RENO to obtain a similar answer.
which is doubly stochastic since row sums and column sums are 1. So i = 1 k + 1 for all i if our runner owns k pairs of shoes. Use RENO to obtain simulated results.
128
http://RENO.ReliaSoft.com
129
Note that these examples are not covered in detail. Each example is based on a RENO project file (*.rnp) that is shipped with the software, and the full solution is presented in that file.
Injury Due to Explosion from Atomizing Leak 2.7857 Injury Due to Fire from Atomizing Leak 1.7999 Injury Due to Fire from Minor Leak 7.1932 Injury Due to Fire from Major Leak 3.2101
131
This can be repeated for different numbers of balls and winning numbers on the lottery ticket. Note that as the odds against winning get larger, you need to run the simulation longer in order to realize any winning outcomes.
132
http://RENO.ReliaSoft.com