Kalkulator MTBF: Różnice pomiędzy wersjami
Z SYSTEM-KANBAN.PL
mNie podano opisu zmian |
mNie podano opisu zmian Znacznik: Wycofane |
||
Linia 15: | Linia 15: | ||
} | } | ||
</style> | </style> | ||
<form> | <div id="mttr-form"> | ||
<label> | <h2>MTTR</h2> | ||
< | <label for="mttr-failure-count">Ilość awarii:</label> | ||
< | <input type="number" id="mttr-failure-count"> | ||
< | <br> | ||
<div id="mttr-repair-times"></div> | |||
</ | <button id="mttr-add-repair-time">Dodaj kolejny czas naprawy</button> | ||
< | <br> | ||
<button id="mttr-calculate">Oblicz MTTR</button> | |||
</div> | |||
<div id="mttf-form"> | |||
<h2>MTTF</h2> | |||
<label for="mttf-availability-time">Dostępny czas pracy:</label> | |||
<input type="number" id="mttf-availability-time"> | |||
<br> | |||
<label for="mttf-failure-time">Czas awaryjności:</label> | |||
<input type="number" id="mttf-failure-time"> | |||
<br> | |||
<label for="mttf-failure-count">Ilość awarii:</label> | |||
<input type="number" id="mttf-failure-count"> | |||
<br> | |||
<button id="mttf-calculate">Oblicz MTTF</button> | |||
</div> | |||
<h2>MTBF</h2> | |||
<button id="mtbf-calculate">Oblicz MTBF</button> | |||
<div id="result"> | |||
</div> | |||
<script> | <script> | ||
// MTTR | |||
let mttrRepairTimes = []; | |||
}); | |||
document.getElementById("mttr-add-repair-time").addEventListener("click", function() { | |||
let repairTime = prompt("Podaj czas naprawy (w godzinach)"); | |||
mttrRepairTimes.push(repairTime); | |||
}); | |||
document.getElementById("mttr-calculate").addEventListener("click", function() { | |||
let mttrFailureCount = document.getElementById("mttr-failure-count").value; | |||
let mttrTotalRepairTime = mttrRepairTimes.reduce(function(a, b) { | |||
return parseInt(a) + parseInt(b); | |||
}, 0); | |||
let mttr = mttrTotalRepairTime / mttrFailureCount; | |||
document.getElementById("result").innerHTML = "MTTR: " + mttr + " godzin"; | |||
}); | |||
// MTTF | |||
document.getElementById("mttf-calculate").addEventListener("click", function() { | |||
let mttfAvailabilityTime = document.getElementById("mttf-availability-time").value; | |||
let mttfFailureTime = document.getElementById("mttf-failure-time").value; | |||
let mttfFailureCount = document.getElementById("mttf-failure-count").value; | |||
let mttf = (mttfAvailabilityTime - mttfFailureTime) / mttfFailureCount; | |||
document.getElementById("result").innerHTML = "MTTF: " + mttf + " godzin"; | |||
}); | |||
// MTBF | |||
document.getElementById("mtbf-calculate").addEventListener("click", function() { | |||
let mttr = document.getElementById("result").innerHTML.match(/\d+/)[0]; | |||
let mttf = document.getElementById("result").innerHTML.match(/\d+/)[1]; | |||
let mtbf = parseInt(mttr) + parseInt(mttf); | |||
document.getElementById("result").innerHTML = "MTBF: " + mtbf + " godzin"; | |||
}); | }); | ||
</script> | </script> |
Wersja z 17:42, 28 sty 2023
Poniżej znajduje się kalkulator do obliczenia wskaźnika MTBF. Wskaźnik ten oblicza się poprzez dodanie dwóch innych wskaźników tj. MTTR i MTTF
Wypełnij wszystkie poniższe pola, a kalkulator obliczy wskaźnik MTBF bez konieczności obliczania MTTR i MTTF.
MTTR
MTTF
MTBF
REKLAMA