private void PrepareData() { networks = new AbstractNetwork[RealizationCount]; for (int i = 0; i < RealizationCount; ++i) { /*ModelTypeInfo[] info = (ModelTypeInfo[])ModelType.GetType().GetField(ModelType.ToString()).GetCustomAttributes(typeof(ModelTypeInfo), false); Type t = Type.GetType(info[0].Implementation); Type[] constructTypes = new Type[] { typeof(String), typeof(GenerationType), typeof(Dictionary<ResearchParameter, object>), typeof(Dictionary<GenerationParameter, object>), typeof(AnalyzeOption) }; object[] invokeParams = new object[] { ResearchName, GenerationType, ResearchParamaterValues, GenerationParameterValues, AnalyzeOptions }; networks[i] = (AbstractNetwork)t.GetConstructor(constructTypes).Invoke(invokeParams);*/ networks[i] = AbstractNetwork.CreateNetworkByType(ModelType, ResearchName, GenerationType, ResearchParamaterValues, GenerationParameterValues, AnalyzeOptions); networks[i].NetworkID = i; networks[i].OnUpdateStatus += new NetworkStatusUpdateHandler(NetworkStatusUpdateHandlerMethod); } int threadCount = Math.Min(networks.Length, Environment.ProcessorCount); // Creating thread related members threads = new Thread[threadCount]; waitHandles = new AutoResetEvent[threadCount]; threadData = new ThreadEntryData[threadCount]; // Initialize threads and handles for (int i = 0; i < threadCount; ++i) { waitHandles[i] = new AutoResetEvent(false); threadData[i] = new ThreadEntryData(threadCount, i); threads[i] = new Thread(new ParameterizedThreadStart(ThreadEntry)) { Priority = ThreadPriority.Lowest }; } }
public NonHierarchicAnalyzer(AbstractNetwork n) : base(n) { }
public RegularHierarchicNetworkAnalyzer(AbstractNetwork n) : base(n) { }