public void Two_Flows_with_Ten_Resources()
        {
            var assets = Batch_Processing_Samples.Sample1();
            var sim    = assets.Sandbox();

            //state.Display = true;
            while (sim.ClockTime < DateTime.MinValue.AddDays(10))
            {
                if (sim.DebugMode)
                {
                    Debug.WriteLine(sim.HeadEventTime);
                }
                sim.Run(1);
                if (sim.DebugMode)
                {
                    Debug.WriteLine(sim.ToString());
                }
            }
            if (sim.RCQsModel.AllLoads.Count > 9)
            {
                Assert.Fail("Need to check if the RCQ is stationary.");
            }

            sim.RCQsModel.Output_Statistics_CSVs();
            sim.RCQsModel.Output_Snapshot_CSVs(sim.ClockTime);
            if (sim.RCQsModel.CountOfLoads_Exited == 0)
            {
                Assert.Fail();
            }
        }
Exemple #2
0
        public void ResourceCycle()
        {
            var assets = Batch_Processing_Samples.Sample1();

            assets.ResourceCycles = new Dictionary <IResource, (TimeSpan MTTF, TimeSpan MTTR)>
            {
                { assets.RCQueuesModel.Resources[0], (TimeSpan.FromHours(1), TimeSpan.FromMinutes(2)) },
                { assets.RCQueuesModel.Resources[1], (TimeSpan.FromHours(1), TimeSpan.FromMinutes(2)) },
        public void Two_Flows_with_Ten_Resources()
        {
            var assets = Batch_Processing_Samples.Sample1();
            var sim    = assets.Sandbox();

            sim.Run(TimeSpan.FromDays(10));
            if (sim.RCQsModel.AllLoads.Count > 9)
            {
                Assert.Fail("Need to check if the RCQ is stationary.");
            }
            if (sim.RCQsModel.CountOfLoads_Exited == 0)
            {
                Assert.Fail();
            }
        }
Exemple #4
0
        public void CallToEnter_and_OnEntered()
        {
            var assets = Batch_Processing_Samples.Sample1();
            var sim    = assets.Sandbox();

            while (sim.ClockTime < new DateTime(1, 1, 2))
            {
                var t = sim.HeadEventTime;
                while (t == sim.HeadEventTime)
                {
                    sim.Run(1);
                }
            }
            sim.RCQsModel.Output_Statistics_CSVs();

            if (sim.RCQsModel.CountOfLoads_Exited == 0)
            {
                Assert.Fail();
            }
        }