Exemplo n.º 1
0
        private void AddInspection(MakinoDB.MachineResults m, IList <JobLogDB.EventLogMaterial> material)
        {
            if (_jobDB == null && _log == null)
            {
                return;
            }

            var job = _jobDB.LoadJob(m.OrderName);

            if (job == null)
            {
                return;
            }

            if (m.ProcessNum != job.NumProcesses)
            {
                return;
            }

            foreach (var mat in material)
            {
                _log.MakeInspectionDecisions(mat.MaterialID, m.ProcessNum, job.GetInspections());
            }
        }
Exemplo n.º 2
0
        public void Frequencies()
        {
            var freqProg = new JobInspectionData("insp1", "counter1", 0.5, TimeSpan.FromHours(100));

            for (int i = 0; i < 100; i++)
            {
                _insp.MakeInspectionDecisions(i, 1, new[] { freqProg });
            }

            int numInsp = 0;

            for (int i = 0; i < 100; i++)
            {
                if (FindDecision(i, "insp1", "counter1"))
                {
                    numInsp += 1;
                }
            }

            Assert.True(numInsp > 0);
            Assert.True(numInsp < 100);
        }