public async void RunAsync(int simulationType, int orderAmount, double arivalRate, int estimatedThroughputTime) { _context.ClearCustomerOrders(); var simConfig = ArgumentConverter.ConfigurationConverter(resultCtx: _resultCtx, 1); // update customized Items simConfig.AddOption(new DBConnectionString(_resultCtx.Database.GetDbConnection().ConnectionString)); simConfig.ReplaceOption(new KpiTimeSpan(240)); simConfig.ReplaceOption(new TimeToAdvance(value: TimeSpan.FromMilliseconds(50))); simConfig.ReplaceOption(new TimeConstraintQueueLength(480)); simConfig.ReplaceOption(new OrderArrivalRate(value: arivalRate)); simConfig.ReplaceOption(new OrderQuantity(value: orderAmount)); simConfig.ReplaceOption(new EstimatedThroughPut(value: estimatedThroughputTime)); simConfig.ReplaceOption(new TimePeriodForThroughputCalculation(value: 2880)); simConfig.ReplaceOption(new Seed(value: 169)); simConfig.ReplaceOption(new SettlingStart(value: 2880)); simConfig.ReplaceOption(new SimulationEnd(value: 10080)); simConfig.ReplaceOption(new SaveToDB(value: false)); simConfig.ReplaceOption(new DebugSystem(value: false)); simConfig.ReplaceOption(new WorkTimeDeviation(0.2)); simConfig.ReplaceOption(new MaxDeliveryTime(3120)); simConfig.ReplaceOption(new MinDeliveryTime(2160)); switch (simulationType) { case 1: RunAgentSimulation(simConfig); return; case 2: RunGanttSimulation(simConfig); return; default: return; } }