Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const l = [0.7, 0.3, 0.1, 0.65, 0.2, 0.1, 0.12, 0.4];
- const lPow = -4;
- const m = [1, 1.2, 0.9, 1.8, 2.6, 1.8, 1, 1.6];
- const mPow = -1;
- const r = [650, 720, 1900, 680, 1080, 608, 732, 2000];
- /**
- * Интенсивность отказов
- */
- const intens = l.reduce((sum, e) => (sum += e * 10 ** lPow), 0);
- /**
- * Наработка на отказ
- */
- const t = 1 / intens;
- /**
- * Коэффициент готовности системы
- */
- const mc =
- intens /
- l.reduce(
- (sum, e, index) => (sum += ((e * 10 ** lPow) / m[index]) * 10 ** mPow),
- 0
- );
- const k = mc / (intens + mc);
- for (let i = 10; i <= 100; i += 10) {
- const K = k + k * Math.exp(-Math.pow(intens + mc, i));
- console.log(`t: ${i}, K: ${K}`);
- }
- const leftSide =
- (k + k * Math.exp(-Math.pow(intens + mc, t))) *
- t *
- r.reduce((sum, e, index) => (sum += e * l[index] * Math.pow(10, lPow)), 0);
- const rightSide =
- t *
- r.reduce((sum, e, index) => (sum += e * l[index] * Math.pow(10, lPow)), 0);
- console.log(`Интенсивность отказов: ${intens}`);
- console.log(`Наработка на отказ: ${t}`);
- console.log(`Коэффициент готовности системы ${k}`);
- console.log(`Оценка слева: ${leftSide}`);
- console.log(`Оценка справа: ${rightSide}`);
- console.log(`Риск системы: ${(rightSide + leftSide) / 2}`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement