public IReadOnlyList <IParameterIdentificationRun> CreateFor(ParameterIdentification parameterIdentification, CancellationToken cancellationToken) { var runInitializer = _runInitializerFactory.Create <StandardParameterIdentificationRunInitializer>(); runInitializer.Initialize(parameterIdentification, runIndex: 0); return(new[] { runInitializer.Run }); }
public IReadOnlyList <IParameterIdentificationRun> CreateFor(ParameterIdentification parameterIdentification, CancellationToken cancellationToken) { var multipleOptimizationOption = parameterIdentification.Configuration.RunMode.DowncastTo <MultipleParameterIdentificationRunMode>(); var allParameterIdentificationRuns = new List <IParameterIdentificationRun>(); for (int i = 0; i < multipleOptimizationOption.NumberOfRuns; i++) { cancellationToken.ThrowIfCancellationRequested(); var runInitializer = _runInitializerFactory.Create <MultipleParameterIdentificationRunInitializer>(); runInitializer.Initialize(parameterIdentification, i, _randomGenerator); allParameterIdentificationRuns.Add(runInitializer.Run); } return(allParameterIdentificationRuns); }
public IReadOnlyList <IParameterIdentificationRun> CreateFor(ParameterIdentification parameterIdentification, CancellationToken cancellationToken) { var allParameterIdentificationRuns = new List <IParameterIdentificationRun>(); var uniqueCombinations = _categorialToCalculationMethodPermutationMapper.MapFrom(parameterIdentification).ToList(); var isSingleCategory = hasSingleCategory(uniqueCombinations); uniqueCombinations.Each((combination, index) => { cancellationToken.ThrowIfCancellationRequested(); var runInitializer = _runInitializerFactory.Create <CategorialParameterIdentificationRunInitializer>(); runInitializer.Initialize(parameterIdentification, index, combination, isSingleCategory); allParameterIdentificationRuns.Add(runInitializer.Run); }); return(allParameterIdentificationRuns); }