14. July 2018

# Two Ways Of Simulating Unit Failures

In your INOSIM project, you can integrate unit failures to represent reality even more precisely in your model, as failures might have a great impact on KPIs like annual production. This is especially helpful when you also apply the Statistical Analysis Add-On. In this Tip & Trick, you will learn how to input your failure data into INOSIM dialogs and via VBA.

## Availability vs. MTBF to describe failure behaviour

In this example, you plan to investigate the influence of failures in your the model. For this purpose, in dialog Units (Failures view), enter an Availability together with a Mean duration of failures:

### Background

INOSIM uses the availability and mean duration of failures to compute the Mean Time Between Failures (MTBF), which is in turn used to define an exponential distribution with the expected value Beta = MTBF. For that purpose, INOSIM applies the following formula, where V is the availability in percent and MTTR stands for the Mean Time To Recover — which is synonymous to the mean duration of failures:

TIP: If you already know the MTBF value for your unit, you can:

• compute the percentage unit availability from the MTBF value;
• or, by the advanced settings of dialog Units (Failures view), apply the MTBF value directly.

Exponential distributions are the default distributions for the description of reliability data, you can read more on that topic on Wikipedia or Sciencedirect.

## Computing unit availability from the MTBF value

For this purpose, apply the following formula:

Afterwards, you can, as described above, enter this value in dialog Units (Failures view).

## Applying the MTBF value directly

For this purpose, in dialog Units (Failures view), select option Use Advanced Settings.

• In line Interval, select distribution type Exponential then in the sub-dialog in field Beta, enter the MTBF value by seconds (example below: 68400).
• Afterwards, in line Duration, select distribution type Exponential  now, in the sub-dialog in field Beta, enter the MTTR value by seconds (example below: 3600).

## Set Failures via Visual Basic

To set the failure behaviour via VBA, you define distributions, similar as described for the part Use Advanced Settings. The example code given below defines the same behaviour as described above.

• For the failure durations, define an exponential distribution with parameter Beta = MTTR. Now, assign this exponential distribution to the unit’s FailureDuration property.
• For the failure interval, define an exponential distribution with parameter Beta = MTBF. Assign this exponential distribution to the unit’s FailureInterval property.

Please note that Visual Basic only allows Second (s) as a measure of unit for time. You can also use other distribution functions if they describe your data better. INOSIM offers the most important distribution types, e.g., Normal, Uniform, Bathtub, Erlang, Gamma, Weibull, Poisson and LogNormal and the possibility to define custom distributions.

``````Private Sub Simulation_Init()

Dim unitWithFailure As String

Dim MTTR As Double 'Mean Time to Recover [h]
Dim availability As Double ' Unit Availability [%]
Dim MTBF As Double 'Mean Time Between Failures [h]

Dim newFailureInterval As New Exponential
Dim newFailureDuration As New Exponential

unitWithFailure = "Mixer C3"

MTTR = 1
availability = 95
MTBF = availability * MTTR / (100 - availability)

' Note that the distribution parameter Beta is defined in seconds
newFailureInterval.Beta = MTBF * 3600 '[s]
newFailureDuration.Beta = MTTR * 3600 '[s]

Set Units(unitWithFailure).FailureInterval = newFailureInterval
Set Units(unitWithFailure).FailureDuration = newFailureDuration

Console.Print("Setting failures for " & unitWithFailure & " with a mean time between failures of " _
& MTBF & " h and a mean time to recover of " & MTTR & " h.")

End Sub``````

• PDF printout of this Tip & Trick

## More Questions?

Want to know more about this topic or have another question? Please contact us!

Array ( [posts_per_page] => 3 [post_type] => [category__in] => Array ( [0] => 36 ) [orderby] => rand [order] => ASC )

## More Tips & Tricks

19. July 2021

#### Custom Gantt Colors

The INOSIM Gantt chart provides the option to color allocation bars on the basis of various predefined attributes. In the order view, it is possible…

22. September 2020

#### Interval Evaluation Of The Transfer Report

Interval Evaluation Of The Transfer Report In this tip, we show you how to automatically compute data via VBA with the help of INOSIM-generated reports…

23. February 2021

#### INOSIM Remote Control via the COM-Interface

Did you know INOSIM can be remote-controlled by any program that can send signals via the COM-Interface? Let us sketch a scenario of how this…

Direct Contact

During local business hours

Germany +49 231 97 00 250

USA +1 214 663 3101

India +91 9766 331 092