Beispiel #1
0
            public void CheckCompleteness()
            {
                HasStart       = true;
                HasEnd         = true;
                HasProcessPlan = true;


                // Check whether trace has process plan
                if (ProcessPlan == null)
                {
                    HasProcessPlan = false;
                    return;
                }


                // Check whether trace contains first step
                SingleStep firstStep = ProcessPlan.Steps.First();

                if (!LotActivitiesRaw.Where(x => x.Stepname == firstStep.Stepname).Any())
                {
                    HasStart = false;
                }

                // Check whether trace contains last step
                SingleStep lastStep = ProcessPlan.Steps.Last();

                if (!LotActivitiesRaw.Where(x => x.Stepname == lastStep.Stepname).Any())
                {
                    HasEnd = false;
                }

                // Passed all checks, so trace is complete
                return;
            }
Beispiel #2
0
            public LotActivityRaw GetLotActivityRawAt(DateTime time)
            {
                if (time >= StartDate && time <= EndDate)
                {
                    for (int i = 0; i < LotActivitiesRaw.Count; i++)
                    {
                        LotActivityRaw activity = LotActivitiesRaw[i];

                        if (activity.TrackOut > time)
                        {
                            return(LotActivitiesRaw[i]);
                        }
                    }
                    Console.WriteLine($"WARNING: LotActivityRaw for {LotActivitiesRaw.First().LotId} not found for time {time}, but time is within start and end date.");
                    return(null);
                }
                else
                {
                    throw new Exception($"Time {time} is outside range of known lot activites for lot {LotId}.");
                }
            }