Beispiel #1
0
        protected override void OnUpdate(ModelElementBase modelElement)
        {
            Machine machine = (Machine)modelElement;

            Lot lot = machine.LotInService;

            string type = lot.ProductType;

            //Writer?.WriteLine($"{machine.GetTime},{lot.EndTime - lot.StartTime},{lot.Id},{lot.ProductType},{lot.EndTime},{lot.StartTime}");
            ExperimentWriter?.WriteLine($"{replicationCounter},{machine.GetTime},{lot.EndTime - lot.StartTime},{lot.Id},{lot.ProductType},{lot.EndTime},{lot.StartTime},{lot.Lateness}");
            lotCounter++;

            if (!Lateness.ContainsKey(type))
            {
                Lateness.Add(lot.ProductType, new Statistic("Lateness"));
                Tardiness.Add(lot.ProductType, new Statistic("Lateness"));
                Earliness.Add(lot.ProductType, new Statistic("Lateness"));
            }

            Lateness[type].Collect(lot.Lateness);

            if (lot.Lateness > 0)
            {
                Tardiness[type].Collect(lot.Lateness);
            }
            else
            {
                Earliness[type].Collect(lot.Lateness);
            }
        }
Beispiel #2
0
        protected override void OnExperimentEnd(ModelElementBase modelElement)
        {
            WorkStation ws = (WorkStation)modelElement;

            ExperimentWriter?.WriteLine($"{ws.Name},{meanQueueLength.Average()},{stdQueueLength.Average()}");
            Console.WriteLine($"Queue length mean: {meanQueueLength.Average()} stdev: {stdQueueLength.Average()} - {ws.Name}");
        }
Beispiel #3
0
        protected override void OnExperimentStart(ModelElementBase modelElement)
        {
            ExperimentWriter.WriteLine($"Replication,Start DateTime,End DateTime,Lots Produced,Wafers Produced," +
                                       $"Rate Efficiency,Operational Efficiency,Performance Efficiency," +
                                       $"Tot Squared Lateness,Tot Squared Earliness,Tot Squared Tardiness," +
                                       $"Layer Switches,Reticle Switches,EndQueueLength," +
                                       $"Prod Squared Lateness,Prod Squared Earliness,Prod Squared Tardiness," +
                                       $"Queue Squared Lateness,Queue Squared Earliness,Queue Squared Tardiness," +
                                       $"Prod Lateness,Prod Earliness,Prod Tardiness," +
                                       $"Queue Lateness,Queue Earliness,Queue Tardiness," +
                                       $"Production Target Fulfillment,Throughput Score,Due Date Score, WIP Balance score," +
                                       $"Downtime, Prod Lots Early, Prod Lots Tardy, Queue Lots Early, Queue Lots Tardy");


            replication = 1;
        }
Beispiel #4
0
        protected override void OnExperimentStart(ModelElementBase modelElement)
        {
            if (!expHeaderPrinted)
            {
                ExperimentWriter?.WriteLine("Replication,Time,CycleTime,LotID,ProductType,EndTime,StartTime,Lateness");

                LotsProduced.Reset();
                foreach (var type in Lateness.Keys)
                {
                    Lateness[type].Reset();
                    Tardiness[type].Reset();
                    Earliness[type].Reset();
                }
                expHeaderPrinted = true;
            }
        }
Beispiel #5
0
        protected override void OnExperimentEnd(ModelElementBase modelElement)
        {
            AssemblyLine assemblyLine = (AssemblyLine)modelElement;

            ExperimentWriter.WriteLine($"Throughput Statistics - Average - stdev - CI");
            ExperimentWriter.WriteLine($"{throughPutStatistics[0].Average()}");
            ExperimentWriter.WriteLine($"{throughPutStatistics[0].StandardDeviation()}");
            ExperimentWriter.WriteLine($"{throughPutStatistics[0].ConfidenceInterval95()}");

            ExperimentWriter.WriteLine($" ");
            ExperimentWriter.WriteLine($"Machine States - Up - Down- Starved - Blocked (1-2-3-4-5-6-7)");
            foreach (Machine machine in assemblyLine.Machines)
            {
                ExperimentWriter.WriteLine($"{upStatistics[machine.Index].Average()}");
                ExperimentWriter.WriteLine($"{downStatistics[machine.Index].Average()}");
                ExperimentWriter.WriteLine($"{starvedStatistics[machine.Index].Average()}");
                ExperimentWriter.WriteLine($"{blockedStatistics[machine.Index].Average()}");
                ExperimentWriter.WriteLine($" ");
            }
        }
Beispiel #6
0
        protected override void OnUpdate(ModelElementBase modelElement)
        {
            // Get lithographyArea object
            LithographyArea l = (LithographyArea)modelElement;

            endDateDay = startDateRun.AddSeconds(GetTime);


            if (l.EndedOnDispatcherNoSolution)
            {
                Writer.WriteLine($"Ended on error, CP dispatcher did not find a solution for {endDateDay}");
            }
            else
            {
                // Write
                double operationalEfficiency;
                double rateEffiency = l.TotalTheoreticalProductionTime / l.TotalProductionTime;

                double totalDowntime = l.TotalDownTime;

                if (!l.Dynamic)
                {
                    operationalEfficiency = l.TotalProductionTime / (l.Machines.Count * l.SchedulingHorizon);
                }
                else
                {
                    foreach (Machine machine in l.Machines)
                    {
                        if (machine.StartMachineDown > machine.EndMachineDown && machine.StartMachineDown < GetTime)
                        {
                            totalDowntime += GetTime - machine.StartMachineDown;
                        }
                    }
                    operationalEfficiency = l.TotalProductionTime / (l.Machines.Count * l.GetTime - totalDowntime);
                }

                double performanceEfficiency = operationalEfficiency * rateEffiency;


                Writer.WriteLine($"{replication},{startDateDay},{endDateDay},{l.TotalLotsProduced},{l.TotalWafersProduced}," +
                                 $"{rateEffiency},{operationalEfficiency},{performanceEfficiency}," +
                                 $"{l.TotalSquaredLateness + l.Dispatcher.GetSquaredLatenessQueue()},{l.TotalSquaredEarliness + l.Dispatcher.GetEarlinessQueue(true)},{l.TotalSquaredTardiness + l.Dispatcher.GetTardinessQueue(true)}," +
                                 $"{l.TotalLayerSwitches},{l.TotalReticleSwitches},{l.Dispatcher.GetQueueLength()}," +
                                 $"{l.TotalSquaredLateness},{l.TotalSquaredEarliness},{l.TotalSquaredTardiness}," +
                                 $"{l.Dispatcher.GetSquaredLatenessQueue()},{l.Dispatcher.GetEarlinessQueue(true)},{l.Dispatcher.GetTardinessQueue(true)}," +
                                 $"{l.TotalEarliness},{l.TotalEarliness},{l.TotalTardiness}," +
                                 $"{l.Dispatcher.GetTardinessQueue(false) - l.Dispatcher.GetEarlinessQueue(false)},{l.Dispatcher.GetEarlinessQueue(false)},{l.Dispatcher.GetTardinessQueue(false)}," +
                                 $"{l.TotalProductionTargetFulfillment},{l.TotalScoreThroughput},{l.TotalScoreDueDate},{l.TotalScoreWIPBalance}," +
                                 $"{totalDowntime},{l.TotalLotsProducedEarly},{l.TotalLotsProducedTardy},{l.Dispatcher.GetNrJobsEarly()},{l.Dispatcher.GetNrJobsTardy()}");


                ExperimentWriter.WriteLine($"{replication},{startDateDay},{endDateDay},{l.TotalLotsProduced},{l.TotalWafersProduced}," +
                                           $"{rateEffiency},{operationalEfficiency},{performanceEfficiency}," +
                                           $"{l.TotalSquaredLateness + l.Dispatcher.GetSquaredLatenessQueue()},{l.TotalSquaredEarliness + l.Dispatcher.GetEarlinessQueue(true)},{l.TotalSquaredTardiness + l.Dispatcher.GetTardinessQueue(true)}," +
                                           $"{l.TotalLayerSwitches},{l.TotalReticleSwitches},{l.Dispatcher.GetQueueLength()}," +
                                           $"{l.TotalSquaredLateness},{l.TotalSquaredEarliness},{l.TotalSquaredTardiness}," +
                                           $"{l.Dispatcher.GetSquaredLatenessQueue()},{l.Dispatcher.GetEarlinessQueue(true)},{l.Dispatcher.GetTardinessQueue(true)}," +
                                           $"{l.TotalEarliness},{l.TotalEarliness},{l.TotalTardiness}," +
                                           $"{l.Dispatcher.GetTardinessQueue(false) - l.Dispatcher.GetEarlinessQueue(false)},{l.Dispatcher.GetEarlinessQueue(false)},{l.Dispatcher.GetTardinessQueue(false)}," +
                                           $"{l.TotalProductionTargetFulfillment},{l.TotalScoreThroughput},{l.TotalScoreDueDate},{l.TotalScoreWIPBalance}," +
                                           $"{totalDowntime},{l.TotalLotsProducedEarly},{l.TotalLotsProducedTardy},{l.Dispatcher.GetNrJobsEarly()},{l.Dispatcher.GetNrJobsTardy()}");

                // Update startDateDay
                startDateDay = endDateDay;
            }
        }
Beispiel #7
0
 protected override void OnReplicationEnd(ModelElementBase modelElement)
 {
     replication += 1;
     ExperimentWriter.Flush();
 }
Beispiel #8
0
 protected override void OnExperimentStart(ModelElementBase modelElement)
 {
     ExperimentWriter?.WriteLine("Area,Average Queue Length,Std Queue Length");
 }