# Downtime

Navigation: Models ➔ Control 2 Models ➔ Downtime

## General Description

This model is used in Dynamic Simulation only.

The Downtime unit operation can be used to calculate when downtime will occur due to Major or Minor Maintenance or because of Major or Minor Failure. Basically, the model runs a number of timers, each set up for the different events. The timers will be incremented and reset based on rules for each of the Downtime events.

The model can then set a single tag to an Active or Inactive value, depending on whether the unit is active or inactive due to maintenance or failure.

The user may also enter a different tag to be tested and, if below a defined threshold, the Minor Maintenance and Major and Minor Failure timers will be paused, or remain static. The main use of this feature is to only increment timers for actual operation by measuring a flow tag. The Major Maintenance timer will continue to increment.

### Diagram

The diagram shows the default drawing of the Downtime controller.

## Inputs and Outputs

There are no connections to this unit.

## Model Theory

The Probability Density Functions (PDFs) used for the times between major and minor failures and the times to complete the repairs are as follows:

1. Flat:
$\displaystyle{ P(t) = 0 }$ (if t < Tavg - dev or t > Tavg + dev)
$\displaystyle{ P(t) = \dfrac{1}{2dev} }$ (if Tavg - dev <= t <= Tavg + dev)
2. Gaussian:
$\displaystyle{ P(t) = \cfrac{1}{dev\sqrt{2\pi}}\cdot e^{\dfrac{-(t-Tavg)^2}{2dev^2}} }$
3. Exponential:
$\displaystyle{ P(t) = \cfrac{1}{Tavg}\cdot e^{\dfrac{-t}{Tavg}} }$ (note: deviation is not used in this model)
4. Weibull: (available from Build 138.25412)
$\displaystyle{ P(t) = \cfrac{a}{b}\cdot\left(\cfrac{t}{b}\right)^{a-1}\cdot e^{-\left(\tfrac{t}{b}\right )^a} }$ (where a = Shape Factor, b = Scale Factor)
5. Gamma: (available from Build 138.25955)
$\displaystyle{ P(t) = \cfrac{t^{a-1}\cdot e^{-t/b}}{b^{a}\cdot \Gamma(a)}\ }$ (where a = Shape Factor, b = Scale Factor, the Gamma Function $\displaystyle{ \Gamma(a)=(a-1)! }$)
6. None:
The time to failure/repair will be exactly equal to the specified time.

Note: For Weibull and Gamma distributions, a Shift parameter (default 0) is included for 3-parameter variants such that time to failure/repair = t + Shift.

## State Diagram

The Downtime unit is basically a set of Timers. These timers are incremented by the solver step time, dT, according to a number of rules. When the value of a Timer is equal to or greater than the user defined period (either Active, Inactive or Repair) then the Downtime unit will change State.

This is displayed in the diagram below:

The Table below shows the actions carried out while the unit is in each state:

## Data Sections

The default sections and variable names are described in detail in the following tables. The default Downtime access window consists of 3 sections. This number may increase or decrease, based on user configuration.

### Summary of Data Sections

1. Downtime tab - Contains general information relating to the unit.
2. T1 - The second section contains information about the first downtime event. If the user specifies more than a single downtime event, then there will be additional tabs: T2, T3, etc.
3. Info tab - Contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.

### Downtime Page

Unit Type: Downtime - The first tab page in the access window will have this name.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
Tag Display This name tag may be modified with the change tag option.
Condition Display OK if no errors/warnings, otherwise lists errors/warnings.
ConditionCount Display The current number of errors/warnings. If condition is OK, returns 0.
GeneralDescription / GenDesc Display This is an automatically generated description for the unit. If the user has entered text in the 'EqpDesc' field on the Info tab (see below), this will be displayed here.
If this field is blank, then SysCAD will display the UnitType or SubClass.

### Requirements

On Tick box Switch the unit on (ticked) or off (cleared).
SetTagAlways Tick box If not ticked, the model will only set the output tag for first iteration and when the value changes. Therefore if the user or another controller changes the same tag it will not be overwritten by this model until the next event occurs. If ticked the model will set the output tag every iteration.
Count Input The number of independent downtime blocks required. This may be any number from 0 up to 20. The user may only change this number when the model is stopped. The unit will always add new downtime blocks after existing ones, and it will delete them starting from the last block. E.g. if you have 5 downtime blocks set up and you change this to 4, downtime block number 5 will be deleted.
TotalTime Output The total time that the Downtime unit has been active. This is usually = the run time of the project.
ResetAll Button This will reset the results values and restart any offsets.
Major and Minor Maintenance options
IntegralPeriod Tick box This relates to the active period of the unit between downtime due to maintenance. If this box is ticked, then SysCAD may adjust the active period entered to suit the step size of the project. For example, if the step size = 1 hour, and the period given is not an exact number of hours, then SysCAD will adjust this number to make it an exact number of hours. If this box is left clear, then SysCAD will use the exact number entered. This may lead to some unevenness in the periods but the total amount of active time will be correct over a long period of time.
IntegralInactivePeriod Tick box This is the same as IntegralPeriod except it relates to the inactive period of the unit due to maintenance. If this box is ticked, then SysCAD may adjust the inactive period entered to suit the step size of the project. If this box is left clear, then SysCAD will use the exact number entered. This may lead to some unevenness in the periods but the total amount of inactive time will be correct over a long period of time.
Action during Major Maintenance
ContinueMinorMaintenance Tick box If this is enabled, then Minor maintenance will occur during Major maintenance, if the 2 periods overlap. Otherwise, the Minor maintenance timer will 'freeze' during Major maintenance, and once the Major maintenance is complete, then the Minor maintenance will be re-started.
ContinueRepair Tick box If this is enabled, then any repairs due to failures will be carried out during Major maintenance, if the 2 periods overlap. Otherwise, the Failure repair timer will 'freeze' during Major maintenance, and once the Major maintenance is complete, then the repairs will be re-started.

Summary
This shows the summary table with the following values for each individual downtime in the unit.
T Display The downtime number
On Tickbox The user may enable or disable each individual downtime on the first page.
State Display The current state for each individual downtime. (options are: Idle, Running, MajorMaintenance, MinorMaintenance, MajorFailure or MinorFailure)
Output Display The output value for each individual downtime.
(The user specified downtime block name is displayed as the last column)

### Individual Downtime Blocks (T1, etc.)

Each independent downtime block has the following layout. Each block will be on a separate tab page.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
Requirements
Name Input User specified name for the downtime block. (e.g.: equipment number)
Index Display Block index number, can be used for reporting.
Description / Desc Input Optional downtime block description. (e.g.: equipment description)
MajorMaintenance.On Tickbox Include Major Maintenance events.
MinorMaintenance.On Tickbox Include Minor Maintenance events.
MajorFailure.On Tickbox Include Major Failure events.
MinorFailure.On Tickbox Include Minor Failure events.

#### Major Maintenance

This section is visible IF the user has ticked 'Major Maintenance On'

RequiredPeriod / RqdPeriod Input The required period, or total time period from the start of one downtime for major maintenance to the start of the next downtime for major maintenance.
Offset Input The time period before the first downtime for major maintenance will occur. This time is reset if the reset button is pressed.
RqdInactivePeriod Input The time period of the downtime for major maintenance, i.e. the period during which the equipment is inactive.
Period Display Major Maintenance Period - The time period from the start of one downtime for major maintenance to the start of the next downtime for major maintenance. This may be slightly different to the number entered if the Integral Period option has been selected.
InactivePeriod Display Major Maintenance Inactive Period - The time period of the downtime for major maintenance, i.e. how long the equipment is inactive. This may be slightly different to the number entered if the Integral Inactive Period option has been selected.
Count Display The number of Major Maintenance events that have occurred during the current simulation.
RemainingTime Calc The time remaining before the next Major Maintenance event.

#### Minor Maintenance

This section is visible IF the user has ticked 'Minor Maintenance On'

DoWhenMajorMaint Tickbox Tick this box to allow minor maintenance to happen during the Major maintenance period.
DoWhenMajorFailure Tickbox Tick this box to allow minor maintenance to happen during the Major Failure.
RequiredPeriod / RqdPeriod Input Minor Maintenance Required Period - The total time period from the start of one downtime for minor maintenance to the start of the next downtime for minor maintenance.
Offset Input Minor Maintenance Offset - The time period before the first downtime for minor maintenance will occur. This time is reset if the reset button is pressed.
RqdInactivePeriod Input Minor Maintenance Required Inactive Period - The time period of the downtime for minor maintenance, i.e. how long the equipment is inactive.
Period Display Minor Maintenance Period - The time period from the start of one downtime for minor maintenance to the start of the next downtime for minor maintenance.
InactivePeriod Display Minor Maintenance - The time period of the downtime for minor maintenance, i.e. how long the equipment is inactive.
Count Display The number of Minor Maintenance events that have occurred during the current simulation.
RemainingTime Calc The time remaining before the next Minor Maintenance event.

#### Major Failure

This section is visible IF the user has ticked 'Major Failure On'

UptimePDF Flat The Probability Density Function (P(t)) used for time between Major Failures is a flat distribution, as described in the Model Theory section.
Gaussian The Probability Density Function (P(t)) for time between Major Failures is a Gaussian (or normal) function, as described in the Model Theory section.
Exponential The Probability Density Function (P(t)) for time between Major Failures is an exponential function, as described in the Model Theory section.
Weibull Available from Build 138.25412. The Probability Density Function (P(t)) for time between Major Failures is a Weibull function, as described in the Model Theory section.
Gamma Available from Build 138.25955. The Probability Density Function (P(t)) for time between Major Failures is a Gamma function, as described in the Model Theory section.
None The user specifies the time between Major Failures.
UptimeAverage Input Visible for all UptimePDF except Weibull and Gamma. The average time that the equipment runs without a major failure.
UptimeDeviation Input Only an input field if UptimePDF = Flat or Gaussian. The deviation from the average time that the equipment runs without a major failure.
UptimeScale Input Only visible if UptimePDF = Weibull or Gamma. The Scale Factor (b) as described in the Model Theory above.
UptimeShape Input Only visible if UptimePDF = Weibull or Gamma. The Shape Factor (a) as described in the Model Theory above.
UptimeShift Input Only visible if UptimePDF = Weibull or Gamma. The Shift Factor as described in the Model Theory above.
UptimeOffset Input The amount of time that the first time to failure is reduced. This takes account of equipment which has already been running and is due for failure sooner than the expected output from the PDF.
DowntimePDF Flat The Probability Density Function for time to repair equipment after a Major Failure is a flat distribution, as described in the Model Theory section.
Gaussian The Probability Density Function for time to repair equipment after a Major Failure is a Gaussian (or normal) function, as described in the Model Theory section.
Exponential The Probability Density Function for time to repair equipment after a Major Failure is an exponential function, as described in the Model Theory section.
Weibull Available from Build 138.25412. The Probability Density Function for time to repair equipment after a Major Failure is a Weibull function, as described in the Model Theory section.
Gamma Available from Build 138.25955. The Probability Density Function for time to repair equipment after a Major Failure is a Gamma function, as described in the Model Theory section.
None The user specifies the time to repair after a Major Failure.
DowntimeAverage Input Visible for all DowntimePDF except Weibull and Gamma. The average time that the equipment is inactive due to a major failure.
DowntimeDeviation Input Only an input field if DowntimePDF = Flat or Gaussian. The deviation from the average time that the equipment is inactive due to a major failure.
DowntimeScale Input Only visible if DowntimePDF = Weibull or Gamma. The Scale Factor (b) as described in the Model Theory above.
DowntimeShape Input Only visible if DowntimePDF = Weibull or Gamma. The Shape Factor (a) as described in the Model Theory above.
DowntimeShift Input Only visible if DowntimePDF = Weibull or Gamma. The Shift Factor as described in the Model Theory above.
Count Display The number of Major Failure events that have occurred during the current simulation.
TimeToFailure Calc The time remaining before the next Major Failure event.
TimeToRepair Calc The time remaining to complete the repairs to the unit after a Major Failure event.

#### Minor Failure

This section is visible IF the user has ticked 'Minor Failure On'

ResetWhenMajorMaint Tickbox Tick this box to reset minor Failure when Major maintenance occurs.
ResetWhenMajorFailure Tickbox Tick this box to reset minor Failure when a Major Failure occurs.
UptimePDF Flat The Probability Density Function for time between Minor Failures is a flat distribution, as described in the Model Theory section.
Gaussian The Probability Density Function for time between Minor Failures is a Gaussian (or normal) function, as described in the Model Theory section.
Exponential The Probability Density Function for time between Minor Failures is an exponential function, as described in the Model Theory section.
Weibull Available from Build 138.25412. The Probability Density Function for time between Minor Failures is a Weibull function, as described in the Model Theory section.
Gamma Available from Build 138.25955. The Probability Density Function for time between Minor Failures is a Gamma function, as described in the Model Theory section.
None The user specifies the time between Minor Failures.
UptimeAverage Input Visible for all UptimePDF except Weibull and Gamma. The average time that the equipment runs without a minor failure.
UptimeDeviation Input Only an input field if UptimePDF = Flat or Gaussian. The deviation from the average time that the equipment runs without a minor failure.
UptimeScale Input Only visible if UptimePDF = Weibull or Gamma. The Scale Factor (b) as described in the Model Theory above.
UptimeShape Input Only visible if UptimePDF = Weibull or Gamma. The Shape Factor (a) as described in the Model Theory above.
UptimeShift Input Only visible if UptimePDF = Weibull or Gamma. The Shift Factor as described in the Model Theory above.
UptimeOffset Input The amount of time that the first time to failure is reduced. This takes account of equipment which has already been running and is due for failure sooner than the expected output from the PDF.
DowntimePDF Flat The Probability Density Function for time to repair equipment after a Minor Failure is a flat distribution, as described in the Model Theory section.
Gaussian The Probability Density Function for time to repair equipment after a Minor Failure is a Gaussian (or normal) function, as described in the Model Theory section.
Exponential The Probability Density Function for time to repair equipment after a Minor Failure is an exponential function, as described in the Model Theory section.
Weibull Available from Build 138.25412. The Probability Density Function for time to repair equipment after a Minor Failure is a Weibull function, as described in the Model Theory section.
Gamma Available from Build 138.25955. The Probability Density Function for time to repair equipment after a Minor Failure is a Gamma function, as described in the Model Theory section.
None The user specifies the time to repair after a Minor Failure.
DowntimeAverage Input Visible for all DowntimePDF except Weibull and Gamma. The average time that the equipment is inactive due to a minor failure.
DowntimeDeviation Input Only an input field if DowntimePDF = Flat or Gaussian. The deviation from the average time that the equipment is inactive due to a minor failure. This is only used if a flat or gaussian Probability Density Function (PDF) is chosen.
DowntimeScale Input Only visible if DowntimePDF = Weibull or Gamma. The Scale Factor (b) as described in the Model Theory above.
DowntimeShape Input Only visible if DowntimePDF = Weibull or Gamma. The Shape Factor (a) as described in the Model Theory above. Must be derived from data in seconds.
DowntimeShift Input Only visible if DowntimePDF = Weibull or Gamma. The Shift Factor as described in the Model Theory above.
Count Display The number of Minor Failure events that have occurred during the current simulation.
TimeToFailure Calc The time remaining before the next Minor Failure event.
TimeToRepair Calc The time remaining to complete the repairs to the unit after a Minor Failure event.

#### Requirements

ActiveValueToSet / ActiveVal Input The value to set tag to (see below) when equipment is active (i.e. not stopped due to maintenance or failure). This input is optional.
InactiveValueToSet / InactiveVal Input The value to set tag to (see below) when equipment is inactive due to maintenance or failure. This input is optional.
TagToSet Input The tag to be set to different values (as defined above) when the equipment is active or inactive. This input is optional. An example would be the flowrate on a feeder or the flow in a splitter.
UseTestTag Tickbox If this is enabled then the user may select a Test Tag, as described below.
TagToTest Input Only visible if 'Use Test Tag' is enabled. The tag to be tested to initiate downtime. An example would be the mass flow to a unit or area.
On_Threshold Input Only visible if 'Use Test Tag' is enabled. The value to which the Tag To Test is compared. If the value of Tag To Test is LESS THAN this threshold, then the Downtime controller will pause the Minor Maintenance and Major and Minor Failure timers. The Major Maintenance timer will continue to increment. This is independent of any downtime due to maintenance or failure.

#### Results

TagToTestValue Display Only visible if 'Use Test Tag' is enabled. The current value of the Tag To Test.
StateValue Display The current state of the equipment, expressed as a numerical value. This value could be referenced in controllers for example to perform a series of tasks depending on the state of the equipment. The States are:
• 0 = Idle;
• 1 = Running;
• 2 = Major Maintenance;
• 3 = Minor Maintenance;
• 4 = Major Failure; and
• 5 = Minor Failure.
State Display The current state of the equipment. Possible states are: Idle, Running, Major Maintenance, Minor Maintenance, Major Failure and Minor Failure.
OutputValue / Output Display The value of Tag To Set (if specified).

TotalInactiveTime (Major + Minor Maintenance) The total amount of inactive time due to major or minor maintenance since the model was last reset.
TotalDownTime (Major + Minor Failure) The total amount of down time due to major or minor failure since the model was last reset.
TotalRunningTime Calc The total amount of running time since the model was last reset.
TotalIdleTime Calc The total amount of off time due to Tag to Test threshold being exceeded since the model was last reset.
TotalUtilisation Calc The fraction of the total amount of time that the model has been Running. This includes the Idle time.
ActiveUtilisation Calc The fraction of the available time that the model has been Running. This excludes the Idle time.

RunningTime Calc The amount of running time since the last inactive, down or off time.