如何计算MTBF计算 [英] how to calculate MTBF Calculation
问题描述
Hello Experts,
MTBF(平均故障间隔时间)
工具编号日期数量mtbf输入类型
t1 02-12-2013 500生产
t1 02-12-2013 400 900细分
t1 02-13-2013 300生产
t1 02-14-2013 700生产
t1 02-15-2013 600生产
t1 02-16-2013 600 2200细分
t1 02-17-2013 600生产
现在让我来定义,什么是MTBF以及如何计算......
MTBF是两次分解之间产生的数量之和。
我上面给出了一个例子,我有一个名为t1的工具,它在日期产生了一些数量。只有在输入类型中显示细分条目时才会引入MTBF。
现在,我的问题是如何在asp.net C#中计算它。 />
我需要计算两次细分入口之间的MTBF。
非常紧急,请帮助
任何帮助都将受到赞赏..
注册Sunil
Hello Experts,
MTBF(Mean Time Between Failure)
tool number date quantity mtbf Entry type
t1 02-12-2013 500 Production
t1 02-12-2013 400 900 Breakdown
t1 02-13-2013 300 Production
t1 02-14-2013 700 Production
t1 02-15-2013 600 Production
t1 02-16-2013 600 2200 Breakdown
t1 02-17-2013 600 Production
Now let me define, what is MTBF and how it is calculated...
MTBF is the sum of quantity produced between two breakdown.
I have given an example above that i have a tool named t1 which produced some quantity datewise. MTBF will be introduced only when breakdown entry occurs which is display in entry type.
Now, my question is how i can calculate it in asp.net C#.
I need to calculate MTBF between two breakdown entry.
It's very urgen, plz help
any help will be appreciated..
Regads Sunil
推荐答案
我用C#console应用程序解决了这个问题。你可以看到asp.net中的逻辑和修改或c#
I have solved this using C# console application.You can see the logic and modify in asp.net or any function in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MTBF
{
class Program
{
static void Main(string[] args)
{
int quantity, quantity_sum = 0;
int i=1;
string ch="";
while (i <= 10)
{
Console.WriteLine();
Console.Write("\nEnter Quantity = ");
quantity = int.Parse(Console.ReadLine());
quantity_sum = quantity_sum + quantity;
Console.Write("\nIs there a breakdown(y or n) = ");
ch = Console.ReadLine();
if (ch.Equals("y"))
{
Console.Write("\nBreakdown = " + quantity_sum);
quantity_sum = 0;
}
else
{
//loop will go again to take quantity and add production
}
i++;
}
}
}
}
输出
输入数量= 500
是否有故障(y或n)= n
输入数量= 400 >
是否有故障(y或n)= y
细分= 900
输入数量= 300
是否存在故障(y或n)= n
输入数量= 700
是否存在故障(y或n)= n
输入数量= 600
是否有故障(y或n)= n
输入数量= 600
是否有故障(y或者n)= y
细分= 2200
输入数量=
Output
Enter Quantity = 500
Is there a breakdown(y or n) = n
Enter Quantity = 400
Is there a breakdown(y or n) = y
Breakdown = 900
Enter Quantity = 300
Is there a breakdown(y or n) = n
Enter Quantity = 700
Is there a breakdown(y or n) = n
Enter Quantity = 600
Is there a breakdown(y or n) = n
Enter Quantity = 600
Is there a breakdown(y or n) = y
Breakdown = 2200
Enter Quantity =
这篇关于如何计算MTBF计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!