示例#1
0
        public PerformanceMeasures SolveCurrentSimulationCase()
        {
            decimal bearingReplacementCost = 0;
            decimal costOfDelayTime        = 0;
            decimal costOfDownTime         = 0;
            decimal costOfRepairPerson     = 0;

            for (int i = 0; i < NumberOfBearings; i++)
            {
                List <CurrentSimulationCase> thisCase = CurrentSimulationTable.FindAll(listElement => listElement.Bearing.Index == i);
                bearingReplacementCost += thisCase.Count * BearingCost;
                costOfDownTime         += thisCase.Count * RepairTimeForOneBearing * DowntimeCost;
                int totalDelayTime = thisCase.Sum(listElement => listElement.Delay);
                costOfDelayTime    += totalDelayTime * DowntimeCost;
                costOfRepairPerson += RepairTimeForOneBearing * thisCase.Count * RepairPersonCost / Hour;
            }

            PerformanceMeasures ret = new PerformanceMeasures
            {
                BearingCost      = bearingReplacementCost,
                DelayCost        = costOfDelayTime,
                DowntimeCost     = costOfDownTime,
                RepairPersonCost = costOfRepairPerson
            };

            ret.TotalCost = ret.BearingCost + ret.DelayCost + ret.DowntimeCost + ret.RepairPersonCost;
            return(ret);
        }
        public SimulationSystem()
        {
            n = 1;
            DelayTimeDistribution   = new List <TimeDistribution>();
            BearingLifeDistribution = new List <TimeDistribution>();

            CurrentSimulationTable = new List <CurrentSimulationCase>(); //rows

            CurrentPerformanceMeasures = new PerformanceMeasures();

            ProposedSimulationTable     = new List <ProposedSimulationCase>();
            ProposedPerformanceMeasures = new PerformanceMeasures();

            this.file                    = new List <string>();
            this.input_inform            = new List <string>();
            this.DelayTimeDistribution   = new List <TimeDistribution>();
            this.BearingLifeDistribution = new List <TimeDistribution>();
            read_from_file();
            calculate_CummProbability(DelayTimeDistribution, BearingLifeDistribution);
            calculate_CummProbability(DelayTimeDistribution, BearingLifeDistribution);

            /* SetValues();
             * CostOfBearing();
             * CostOfDelayTime();
             * CostOfDownTime();
             * RepairPerson();
             * TotalCost();*/
        }
 public SimulationSystem()
 {
     DelayTimeDistribution       = new List <TimeDistribution>();
     BearingLifeDistribution     = new List <TimeDistribution>();
     CurrentSimulationCases      = new List <CurrentSimulationCase>();
     CurrentPerformanceMeasures  = new PerformanceMeasures();
     ProposedSimulationCases     = new List <ProposedSimulationCase>();
     ProposedPerformanceMeasures = new PerformanceMeasures();
 }
示例#4
0
 public void start_simulation()
 {
     calc_bearing();
     CurrentPerformanceMeasures = new PerformanceMeasures();
     CurrentPerformanceMeasures.Current_PerformanceMeasures(CurrentSimulationTable, DowntimeCost, RepairPersonCost, BearingCost, RepairTimeForOneBearing);
     fill_ProposedSimulationTable();
     ProposedPerformanceMeasures = new PerformanceMeasures();
     ProposedPerformanceMeasures.Proposed_PerformanceMeasures(ProposedSimulationTable, NumberOfBearings, DowntimeCost, RepairPersonCost, BearingCost, RepairTimeForAllBearings);
 }
        public SimSys()
        {
            this.DelayTimeDistribution = new List <TimeDistribution>();
            BearingLifeDistribution    = new List <TimeDistribution>();

            CurrentSimulationTable     = new List <CurrentSimulationCase>();
            CurrentPerformanceMeasures = new PerformanceMeasures();

            ProposedSimulationTable     = new List <ProposedSimulationCase>();
            ProposedPerformanceMeasures = new PerformanceMeasures();

            randomHours = new List <List <int> >();
            r           = new Random();
        }
        public SimulationSystem()
        {
            DelayTimeDistribution   = new List <TimeDistribution>();
            BearingLifeDistribution = new List <TimeDistribution>();

            CurrentSimulationTable     = new List <CurrentSimulationCase>();
            CurrentPerformanceMeasures = new PerformanceMeasures();

            ProposedSimulationTable     = new List <ProposedSimulationCase>();
            ProposedPerformanceMeasures = new PerformanceMeasures();

            bearingMaximumChanges = new List <int>();
            bearings = new List <List <Bearing> >();
        }
示例#7
0
        public PerformanceMeasures SolveProposedSimulationCase()
        {
            decimal costOfBearingReplacement = ProposedSimulationTable.Count * BearingCost * NumberOfBearings;
            int     totalDelayTime           = 0;
            decimal costOfDownTime           = ProposedSimulationTable.Count * RepairTimeForAllBearings * DowntimeCost;
            decimal costOfRepairPerson       = ProposedSimulationTable.Count * RepairTimeForAllBearings * RepairPersonCost / Hour;

            foreach (ProposedSimulationCase listElement in ProposedSimulationTable)
            {
                totalDelayTime += listElement.Delay;
            }
            decimal             costOfDelayTime = totalDelayTime * DowntimeCost;
            PerformanceMeasures ret             = new PerformanceMeasures
            {
                BearingCost      = costOfBearingReplacement,
                DelayCost        = costOfDelayTime,
                DowntimeCost     = costOfDownTime,
                RepairPersonCost = costOfRepairPerson
            };

            ret.TotalCost = ret.BearingCost + ret.DelayCost + ret.DowntimeCost + ret.RepairPersonCost;
            return(ret);
        }
 private decimal calToatalCost(PerformanceMeasures performanceMeasures)
 {
     return(performanceMeasures.BearingCost + performanceMeasures.DelayCost + performanceMeasures.DowntimeCost + performanceMeasures.RepairPersonCost);
 }