Published
Edited
Jun 25, 2021
1 star
Insert cell
Insert cell
Insert cell
requestFlow = [
[5, 2, 1, 7, 6, 5, 3, 4, 5, 1],
[6, 3, 7, 5, 8, 6, 1, 7, 6, 8],
[8, 4, 5, 3, 3, 3, 4, 5, 7, 4],
[9, 6, 8, 8, 1, 5, 6, 5, 8, 6],
[3, 7, 3, 5, 1, 1, 7, 3, 2, 4],
[2, 3, 2, 4, 3, 2, 8, 2, 4, 3],
[6, 6, 4, 4, 5, 3, 2, 1, 5, 2],
[6, 8, 6, 3, 7, 6, 4, 1, 6, 5],
[1, 9, 7, 2, 8, 7, 6, 1, 2, 7]
]
Insert cell
days = requestFlow[0].length
Insert cell
hoursPerDay = requestFlow.length
Insert cell
sum = requestFlow.flat().reduce((a, b) => a + b, 0)
Insert cell
Всего ${sum} заявок за ${days} дней (по ${hoursPerDay} часов в день).
Insert cell
requestFlowIntensity = sum / (days * hoursPerDay)
Insert cell
Интенсивность потока заявок λ ≈ ${requestFlowIntensity.toFixed(2)}
Insert cell
Insert cell
frequency = FileAttachment("freq.csv").csv({ typed: true })
Insert cell
frequencies = frequency.map((f) => {
const a = f["Интервал времени обслуживания (min)"];
const b = f["Интервал времени обслуживания (max)"];
const middle = (b + a) / 2;
f["Интервал"] = `${a} — ${b}`;
return {
"Номер интервала": "" + f["Номер интервала"],
Интервал: f["Интервал"],
"Середина интервала": middle,
Частота: f["Частота"],
"Середина интервала × Частота": middle * f["Частота"]
};
})
Insert cell
Inputs.table(frequencies)
Insert cell
productsSum = frequencies.reduce(
(a, b) => a + b["Середина интервала × Частота"],
0
)
Insert cell
Сумма произведений середин интервалов на их частоты: ${productsSum}
Insert cell
frequenciesSum = frequencies.reduce((a, b) => a + b["Частота"], 0)
Insert cell
Сумма частот: ${frequenciesSum}
Insert cell
serviceMeantime = productsSum / frequenciesSum
Insert cell
Среднее время облуживания t ≈ ${serviceMeantime.toFixed(1)}
Insert cell
serviceIntensity = 1 / serviceMeantime
Insert cell
Интенсивность облуживания μ ≈ ${serviceIntensity.toFixed(3)}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
loadIntensity = requestFlowIntensity / serviceIntensity
Insert cell
Интенсивность нагрузки ρ ≈ ${loadIntensity.toFixed(2)}
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more