Пример #1
0
        private NetworkTable_line_class[] Generate_networkTable_lines(Leave_out_class leave_out, Dictionary <string, bool> scps_that_shall_not_be_connected_with_eachOther_dict)
        {
            leave_out.Order_by_processLevel_descending_newSymbolsRankIncreaseDividedByOriginalProcessSize();
            int leave_out_length = leave_out.Leave_out_lines.Length;
            Leave_out_line_class        leave_out_line;
            List <Leave_out_line_class> sameLevel_leave_out_list = new List <Leave_out_line_class>();

            NetworkTable_line_class[]      new_networkTable_lines;
            List <NetworkTable_line_class> networkTable_list = new List <NetworkTable_line_class>();

            for (int indexL = 0; indexL < leave_out_length; indexL++)
            {
                leave_out_line = leave_out.Leave_out_lines[indexL];
                if ((indexL == 0) || (!leave_out_line.ProcessLevel.Equals(leave_out.Leave_out_lines[indexL - 1].ProcessLevel)))
                {
                    sameLevel_leave_out_list.Clear();
                }
                sameLevel_leave_out_list.Add(leave_out_line);
                if ((indexL == leave_out_length - 1) || (!leave_out_line.ProcessLevel.Equals(leave_out.Leave_out_lines[indexL + 1].ProcessLevel)))
                {
                    new_networkTable_lines = Generate_networkTable_lines_for_one_level(sameLevel_leave_out_list.ToArray(), scps_that_shall_not_be_connected_with_eachOther_dict);
                    networkTable_list.AddRange(new_networkTable_lines);
                }
            }
            return(networkTable_list.ToArray());
        }
Пример #2
0
        public Leave_out_class Deep_copy()
        {
            Leave_out_class copy             = (Leave_out_class)this.MemberwiseClone();
            int             leave_out_length = this.Leave_out_lines.Length;

            copy.Leave_out_lines = new Leave_out_line_class[leave_out_length];
            for (int indexL = 0; indexL < leave_out_length; indexL++)
            {
                copy.Leave_out_lines[indexL] = this.Leave_out_lines[indexL].Deep_copy();
            }
            return(copy);
        }
Пример #3
0
        public void Generate_scp_scp_network_from_leave_out(Leave_out_class leave_out)
        {
            Dictionary <string, bool> scps_that_shall_not_be_connected_with_eachOther_dict = new Dictionary <string, bool>();

            if (!Options.Consider_scp_interactions_between_signaling_processes)
            {
                scps_that_shall_not_be_connected_with_eachOther_dict = Generate_dictionary_with_all_signaling_processes();
            }
            NetworkTable_line_class[] networkTable_lines = Generate_networkTable_lines(leave_out, scps_that_shall_not_be_connected_with_eachOther_dict);

            Scp_nw = new Network_class();
            Scp_nw.Add_from_networkTable_lines(networkTable_lines);
        }