Defining Output, Input and Processing Tasks 4) (10 pts) A program calculates the
ID: 664135 • Letter: D
Question
Defining Output, Input and Processing Tasks
4) (10 pts) A program calculates the overall equipment effectiveness (OEE) based on the total productive maintenance (TPM) method. TPM is a method to increase the effectiveness of production environments, especially through methods for increasing the effectiveness of equipment OEE is calculated using the following formula4:+ OEE = Availability X Performance X Quality Where: Actual Operating Time Planned Production Time Actual Operating Time:' Number of hours in which plant was actually operating.> * Planed Production Time:+, Plant operating hours-plant shutdown time (in hours)/ Total Output Potential Output at Rated Speed Perf ormance = Performance Potential Outpu Total Output:p Total quantity of units produced during the running time including good, bad, reworked, QC samples, and product during changeover.' Potential quantity (in units) given the designed speed of the equipment. Potential Output at Rated Speed:A Good Output Total output Quality - Good Output: Total quantity good product (in units) produced through the process that are available for sale without any type of rework or re-processingExplanation / Answer
using System;
using System.Collections.Generic;
using System.Text;
namespace OEE
{
public class FactorCalculator
{
//declaring variables
private IProduction production;
// Function of FactorCalculator
public FactorCalculator(IProduction production)
{
this.production = production;
}
// Function of Availability
// finding the value of availability by using formula
public double Availability
{
get
{
if (IsZero(PlannedProductionTimeInMinutes))
return 0;
return OperatingTimeInMinutes / PlannedProductionTimeInMinutes;
}
}
// Function of Performance
// finding the value of performance by using formula
public double Performance
{
get
{
if (IsZero(OperatingTime))
return 0;
if (IsZero(IdealRunRateAMinute))
return 0;
return (TotalPieces / OperatingTimeInMinutes) / IdealRunRateAMinute;
}
}
// Function of Quality
// finding the value of Quality by using formula
public double Quality
{
get
{
if (IsZero(TotalPieces))
return 0;
return GoodPieces / TotalPieces;
}
}
// Calculating the value of OEE
public double OEE
{
get { return Availability * Performance * Quality; }
}
// Calculating the value of TimeSpan
public TimeSpan Duration
{
get { return production.Duration; }
}
public delegate double GetAverageValue(FactorCalculator factorCalculator);
public static double ComputedWeightedAverage(IEnumerable<FactorCalculator> calculators, GetAverageValue callback)
{
double denominator = 0;
double counter = 0;
foreach (FactorCalculator factorCalculator in calculators)
{
counter += callback(factorCalculator)*factorCalculator.Duration.TotalMinutes;
denominator += factorCalculator.Duration.TotalMinutes;
}
return (denominator > 0) ? counter/denominator : 0;
}
private TimeSpan PlannedProductionTime
{
get
{
TimeSpan plannedProductionTime = production.Duration;
foreach (ProductionStopRegistration registration in production.ProductionStopRegistrations)
{
if (registration.Stop.Planned)
plannedProductionTime = plannedProductionTime - registration.Duration;
}
return plannedProductionTime;
}
}
private double PlannedProductionTimeInMinutes
{
get { return PlannedProductionTime.TotalMinutes; }
}
private TimeSpan OperatingTime
{
get
{
TimeSpan operatingTime = PlannedProductionTime;
foreach (ProductionStopRegistration registration in production.ProductionStopRegistrations)
{
if (!registration.Stop.Planned)
operatingTime = operatingTime - registration.Duration;
}
return operatingTime;
}
}
// Calculating the value of operating time
private double OperatingTimeInMinutes
{
get { return OperatingTime.TotalMinutes; }
}
// Calculating the value of total pieces
private double TotalPieces
{
get { return production.ProducedItems; }
}
// Calculating the value of good pieces
private double GoodPieces
{
get { return production.ProducedItems - production.DiscardedItems; }
}
private double IdealRunRateAMinute
{
get { return production.GetProductionForPeriod(new TimeSpan(0, 1, 0)); }
}
private bool IsZero(TimeSpan ts)
{
return ts == TimeSpan.Zero;
}
private bool IsZero(double d)
{
return d == 0;
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.