protected void Initialize(string choiceModelName, string coefficientsPath, int totalAlternatives, int totalNestedAlternatives, int totalLevels, int maxParameter, ICoefficientsReader reader = null) { if (coefficientsPath == null) { return; } _reader = reader; for (int x = 0; x < ParallelUtility.NThreads; x++) { ChoiceModelHelper.Initialize(ref _helpers[x], choiceModelName, Global.GetInputPath(coefficientsPath), totalAlternatives, totalNestedAlternatives, totalLevels, maxParameter, _reader); } }
public static void Initialize(ref ChoiceModelHelper helper, string choiceModelName, string coefficientsPath, int totalAlternatives, int totalNestedAlternatives, int totalLevels, int maxParameter, ICoefficientsReader reader = null) { if (helper != null) { return; } bool modelIsInEstimationMode = Global.Configuration.IsInEstimationMode && Global.Configuration.EstimationModel == choiceModelName && !Global.Configuration.TestEstimationModelInApplicationMode; helper = new ChoiceModelHelper { ModelIsInEstimationMode = modelIsInEstimationMode }; helper.InitializeFactory(coefficientsPath, modelIsInEstimationMode, totalAlternatives, totalNestedAlternatives, totalLevels, maxParameter, reader); UpdateTimesModelRun(choiceModelName); }