public void GeneratorConstructorTest() { RayleighGen gen1 = new RayleighGen(8); NormalGen gen2 = new NormalGen(7, 2); GammaGen gen3 = new GammaGen(0.6, 6); GammaGen timeGen = new GammaGen(8,30); Generator target = new Generator(timeGen, gen1, gen2, gen3); Assert.IsNotNull(target); }
public void generateRequestsTest() { Request[] actual; UniformGen gen1=new UniformGen(1,10); UniformGen gen2=new UniformGen(1,10); UniformGen gen3=new UniformGen(1,10); ExponentialGen timeGen = new ExponentialGen(30); Generator target = new Generator(timeGen, gen1, gen2, gen3); DateTime dt = new DateTime(2010,10,13,8,0,0); actual = target.generateRequests(dt); Assert.IsNotNull(actual); //Assert.AreEqual(expected, actual); }
private CStorage storage; //временное хранилище результатов моделирования #endregion Fields #region Constructors public CImitation() { this.backOffice = new BackOfficeInterface(); storage = new Storage.CStorage(); //содается временное хранилище результатов моделирования pauseDone = new AutoResetEvent(false); generator = new Generator( Generator.CreateGenerator(Params.GeneratorDemandsTime.GeneratorType, Params.GeneratorDemandsTime.fA, Params.GeneratorDemandsTime.fB), Generator.CreateGenerator(Params.Products[1].GeneratorType, Params.Products[1].fA, Params.Products[1].fB), Generator.CreateGenerator(Params.Products[2].GeneratorType, Params.Products[2].fA, Params.Products[2].fB), Generator.CreateGenerator(Params.Products[3].GeneratorType, Params.Products[3].fA, Params.Products[3].fB), Params.fUrgencyPropabilityDemand, Params.fRefusePropabilityDemand, Generator.CreateGenerator(Params.DemandModifyTime.GeneratorType, Params.DemandModifyTime.fA, Params.DemandModifyTime.fB), Generator.CreateGenerator(Params.ArticlesModify.GeneratorType, Params.ArticlesModify.fA, Params.ArticlesModify.fB), Generator.CreateGenerator(Params.Products[1].Modify.GeneratorType, Params.Products[1].Modify.fA, Params.Products[1].Modify.fB), Generator.CreateGenerator(Params.Products[2].Modify.GeneratorType, Params.Products[2].Modify.fA, Params.Products[2].Modify.fB), Generator.CreateGenerator(Params.Products[3].Modify.GeneratorType, Params.Products[3].Modify.fA, Params.Products[3].Modify.fB), Generator.CreateGenerator(Params.UgrToStandModify.GeneratorType, Params.UgrToStandModify.fA, Params.UgrToStandModify.fB), Generator.CreateGenerator(Params.StandToUrgModify.GeneratorType, Params.StandToUrgModify.fA, Params.StandToUrgModify.fB), Generator.CreateGenerator(Params.DeliveryDelayGenerator.GeneratorType, Params.DeliveryDelayGenerator.fA, Params.DeliveryDelayGenerator.fB), new IGen[] { Generator.CreateGenerator(Params.Materials[1].GeneratorType, Params.Materials[1].fA, Params.Materials[1].fB), Generator.CreateGenerator(Params.Materials[2].GeneratorType, Params.Materials[2].fA, Params.Materials[2].fB), Generator.CreateGenerator(Params.Materials[3].GeneratorType, Params.Materials[3].fA, Params.Materials[3].fB), Generator.CreateGenerator(Params.Materials[4].GeneratorType, Params.Materials[4].fA, Params.Materials[4].fB), Generator.CreateGenerator(Params.Materials[5].GeneratorType, Params.Materials[5].fA, Params.Materials[5].fB), Generator.CreateGenerator(Params.Materials[6].GeneratorType, Params.Materials[6].fA, Params.Materials[6].fB), Generator.CreateGenerator(Params.Materials[7].GeneratorType, Params.Materials[7].fA, Params.Materials[7].fB), Generator.CreateGenerator(Params.Materials[8].GeneratorType, Params.Materials[8].fA, Params.Materials[8].fB), Generator.CreateGenerator(Params.Materials[9].GeneratorType, Params.Materials[9].fA, Params.Materials[9].fB), Generator.CreateGenerator(Params.Materials[10].GeneratorType, Params.Materials[10].fA, Params.Materials[10].fB), Generator.CreateGenerator(Params.Materials[11].GeneratorType, Params.Materials[11].fA, Params.Materials[11].fB), Generator.CreateGenerator(Params.Materials[12].GeneratorType, Params.Materials[12].fA, Params.Materials[12].fB) } ); this.modelingDays = Params.ModelingDayToWork; this.modelTime = new DateTime(DateTime.Now.Year,DateTime.Now.Month,DateTime.Now.Day,0,0,0); this.startTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0); }