예제 #1
0
        private void Run()
        {
            StartTime = DateTime.Now;
            InitializeHolders();

            RunReport.ReportTopology(EdgeHolder.GetCopyList());
            RunReport.ReportNodes(NodeHolder.GetCopyList(), true);

            foreach (var node in NodeHolder.GetCopyList().AsParallel())
            {
                Task.Run(() =>
                {
                    node.UserDefined_SingleInitiatorProcedure();
                });
            }

            NodeHolder.StartTerminationDetection();
        }
예제 #2
0
        private void Run()
        {
            StartTime = DateTime.Now;
            InitializeHolders();

            var graphGenerator = GraphFactory.GetGraphGenerator(GraphType);

            graphGenerator.Generate(NodeCount, NodeHolder, EdgeHolder, AlgorithmType);

            RunReport.ReportTopology(EdgeHolder.GetCopyList());
            RunReport.ReportNodes(NodeHolder.GetCopyList(), true);

            foreach (var node in NodeHolder.GetCopyList().AsParallel())
            {
                Task.Run(() =>
                {
                    node.UserDefined_SingleInitiatorProcedure();
                });
            }

            NodeHolder.StartTerminationDetection();
        }