ReefCap • Availability & Group Planned Downtime

How Should We Calculate Group Planned Downtime?

Visual guide for deciding how Planned Downtime aggregates across a machine group when uptime excludes idle.

Availability (%) = uptime (runSeconds only) ÷ (totalTime − plannedDowntime) × 100
Excludes idle Reason Category = "Planned" Guardrail: N/A if totalTime − PD ≤ 0
Concrete Example (12-Hour Shift • 08:00 to 20:00)

Union Group: Machine A + Machine B

In Union mode, the group is considered Running during any minute where at least one machine is running.

Running (counts in uptime) Planned Maintenance (Reason = Planned) Unplanned Stop
08h09h10h11h12h13h 14h15h16h17h18h19h
Machine A 2h Planned, 8h Run, 2h Stop
Planned (2h)
Running (8h)
Stop (2h)
Run: 8h
Machine B 1h Run, 1h Planned, 8h Run, 2h Stop
1h
1h
Running (8h)
Stop (2h)
Run: 9h
Group Union Uptime A OR B is running
Run 1h
Off 1h
Group Running (8h)
Stopped (2h)
Uptime: 9h
Notice the key hour (08:00–09:00): Machine A was in Planned Maintenance, but Machine B was Running, so the Group Union Uptime already gained +1 hour (total 9h). How each option treats 08:00–09:00 decides whether Availability is accurate or inflated.
Compare Each Option Visually

How Each Rule Evaluates the 12h Shift

Click an option below to inspect its exact Planned Downtime timeline, math, pros, and risks.

Option 1: Mode-Aware Rule Recommended

Matches groups.uptimeMode: Pilot groups use the Pilot machine's planned downtime. Union groups merge all planned downtime minus any minute where the group was running.

Counted Planned Downtime Union(A, B) − Group Running
08–09 Excluded (B ran)
1h PD
Not Planned Downtime (10h)
PD: 1h
Uptime (Union)
9.0 h
08–09 (1h) + 10–18 (8h)
Planned Downtime
1.0 h
Only 09:00–10:00
Scheduled Time
11.0 h
12h − 1h Planned
Availability
81.8%
9 ÷ 11 × 100 (Accurate)
Why this works best: 100% consistent with both pilot and union group uptime, never double-counts overlapping stops, never exceeds 100%, and works whether operators log downtime on a group or on individual machines.

Option 2: Strict Intersection (All Machines in Planned Stop)

In Union mode, a minute only counts as Planned Downtime if every machine in the group has a Planned Downtime declaration at that same minute.

Counted Planned Downtime A is Planned AND B is Planned
Only A
1h PD
Not Planned Downtime (10h)
PD: 1h
Uptime (Union)
9.0 h
08–09 (1h) + 10–18 (8h)
Planned Downtime
1.0 h
09:00–10:00 (both A & B)
Scheduled Time
11.0 h
12h − 1h Planned
Availability
81.8%
9 ÷ 11 × 100
Operational Risk (Forgotten Tag): Suppose during 09:00–10:00 the whole line is shut down for maintenance, and the operator tags Machine A as Planned Maintenance but forgets to tag Machine B.
• Option 2 (Intersection) gives PD = 0h → Availability drops to 75.0% (9 / 12).
• Option 1 (Mode-Aware) still counts PD = 1h because neither machine ran → Availability stays 81.8%.

Option 3: Group-Declared Only

Counts only downtime records declared at the Group level (downtimereasons.groupId === group._id), ignoring any planned downtime declared on individual machines.

If Group-Tagged
1.0 h
Uses group declaration
If Machine-Tagged
0.0 h
Individual tags ignored
Auditability
High
Single source per group
Operator Burden
Strict
Must declare at Group UI
Trade-off: Very easy to explain ("line planned downtime = what was declared on the line"), but if technicians declare planned maintenance on a specific machine (like the Press or Pilot), it will be ignored.

Option 4: Simple Timeline Union (All Machines) Inflates Availability

Merges all Planned Downtime intervals across all machines in the group regardless of whether another machine was running.

Counted Planned Downtime Union(A, B) — ignores running
1h Overlap!
1h PD
Not Planned Downtime (10h)
PD: 2h
Uptime (Union)
9.0 h
Includes 08:00–09:00 on B
Planned Downtime
2.0 h
08:00–10:00 (A's whole window)
Scheduled Time
10.0 h
12h − 2h Planned
Availability
90.0%
9 ÷ 10 × 100 (Inflated!)
Why 90.0% is wrong: Between 08:00–09:00, the group was running (Machine B produced) and you subtracted that hour from totalTime. That double-credits the hour and artificially pushes Availability from 81.8% to 90.0% (or even >100% if unplanned stops were smaller).
Side-by-Side Summary

Decision Matrix (12h Shift Example)

Option Planned DT Denominator Availability
1. Mode-Aware Rec. 1h (09–10) 11h (12 − 1) 81.8% (9/11)
2. Strict Intersection 1h (09–10) 11h (12 − 1) 81.8% (9/11)
3. Group-Declared Only 0h or 1h 12h or 11h 75.0% or 81.8%
4. Simple Union 2h (08–10) 10h (12 − 2) 90.0% (Inflated)
How Pilot Groups Work

Pilot Mode (e.g. Main Power Supply / Press)

When a group's uptimeMode = "pilot", one lead machine represents the entire line.

Pilot Machine
Planned 2h
Running 8h
Stop 2h
80.0%
Other Machine Ignored
Non-pilot stops/runs do not affect group Availability
—
Pilot Calculation: 8h / (12h − 2h) = 80.0%. Under Option 1 (Mode-Aware), Pilot groups simply read the Pilot machine's planned downtime (plus any group-level declaration mapped to it).