Patent Publication Number: US-2023137363-A1

Title: Electronic device and method of filtering dispatching rules for workstation

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     This application claims the priority benefit of Taiwan application serial no. 110140155, filed on Oct. 28, 2021. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification. 
     TECHNICAL FIELD 
     The disclosure relates to an electronic device and a method of filtering dispatching rules for a workstation. 
     BACKGROUND 
     In order to improve product production performance and increase corporate competitiveness, production line automation has become an inevitable trend. With the development of artificial intelligence technology, more and more manufacturers are applying artificial intelligence technology to production line automation to optimize the production efficiency of the production line, and to use artificial intelligence technology to select dispatching rules for a workstation. However, due to factors such as different industrial environments, different production lines may have different manufacturing processes or require different machines. Therefore, the dispatching rules for workstations of different production lines are not the same. Failure to select an appropriate number of dispatching rules for a production line to train an artificial intelligence model results in poor performance of a trained artificial intelligence model or increase the cost of training the model. Therefore, proposing a dispatching rule recommendation method that may be applied to different industrial environments is an important issue in the field. 
     SUMMARY 
     The disclosure provides an electronic device and a method of filtering dispatching rules for a workstation, which select suitable dispatching rules for the workstation based on a genetic algorithm (GA) to improve the scheduling efficiency of the workstation. 
     An electronic device of filtering dispatching rules for a workstation of the disclosure includes a processor, a storage medium, and a transceiver. The storage medium stores multiple modules and a dispatch rule set including a first dispatching rule. The processor is coupled to the storage medium and the transceiver, and accesses and executes the modules, and the modules include a data obtaining module, a multi-level dispatching rule creation module, an evolution module, a rule block filtering module, and a dispatching rule recommendation module. The data obtaining module receives a first test data set through the transceiver. The multi-level dispatching rule creation module generates an initial individual according to the dispatch rule set based on a genetic algorithm. The evolution module generates a first individual according to the first test data set and the initial individual based on the genetic algorithm, and the first individual includes a first dispatching rule sequence corresponding to a first workstation, and the first dispatching rule sequence includes the first dispatching rule. The rule block filtering module calculates a first score corresponding to the first dispatching rule according to a first order of the first dispatching rule in the first dispatching rule sequence, and updates the dispatch rule set according to the first score. The dispatching rule recommendation module outputs the dispatch rule set that is updated through the transceiver. 
     A method of filtering dispatching rules for a workstation of the disclosure includes the following. A dispatch rule set including a first dispatching rule and a first test data set are obtained. An initial individual is generated according to the dispatch rule set based on a genetic algorithm. A first individual is generated according to the first test data set and the initial individual based on the genetic algorithm, and the first individual includes a first dispatching rule sequence corresponding to a first workstation, and the first dispatching rule sequence includes the first dispatching rule. A first score corresponding to the first dispatching rule is calculated according to a first order of the first dispatching rule in the first dispatching rule sequence, and the dispatch rule set is updated according to the first score. The dispatch rule set that is updated is output. 
     Based on the above, the electronic device of the disclosure selects or recommends an applicable dispatch rule set for multiple workstations on the production line according to the genetic algorithm. The user assigns dispatching rules to workstations according to the dispatch rule set recommended by the electronic device to optimize production line scheduling. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG.  1    illustrates a schematic diagram of an electronic device of filtering dispatching rules for a workstation according to an embodiment of the disclosure. 
         FIG.  2    illustrates a schematic diagram of generating individuals based on a genetic algorithm according to an embodiment of the disclosure. 
         FIG.  3    illustrates a flow chart of a method of filtering dispatching rules for a workstation according to an embodiment of the disclosure. 
     
    
    
     DETAILED DESCRIPTION 
     To provide a further understanding of the content of the disclosure, embodiments as examples of how this disclosure may be implemented are described below. In addition, wherever possible, elements/components/steps with the same reference numeral in the drawings and embodiments represent the same or similar components. 
       FIG.  1    illustrates a schematic diagram of an electronic device of filtering dispatching rules for a workstation according to an embodiment of the disclosure. The electronic device  100  may include a processor  110 , a storage medium  120 , and a transceiver  130 . 
     The processor  110  is, for example, a central processing unit (CPU), or other programmable general-purpose or special-purpose elements including a micro control unit (MCU), a microprocessor, a digital signal processor (DSP), a programmable controller, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), an image signal processor (ISP), an image processing unit (IPU), an arithmetic logic unit (ALU), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), or other similar elements or a combination of the above elements. The processor  110  may be coupled to the storage medium  120  and the transceiver  130 , and access and execute a plurality of modules and various applications stored in the storage medium  120 . 
     The storage medium  120  is, for example, any type of fixed or removable element including a random access memory (RAM), a read-only memory (ROM), a flash memory, a hard disk drive (HDD), a solid state drive (SSD), or a similar element or a combination of the above elements, and is used for storing a plurality of modules or various applications that may be executed by the processor  110 . In this embodiment, the storage medium  120  may store a plurality of modules such as a data obtaining module  121 , a multi-level dispatching rule creation module  122 , an evolution module  123 , a rule block filtering module  124 , and a dispatching rule recommendation module  125 . and functions thereof will be described later. In addition, the storage medium  120  may further store a dispatch rule set  126  that includes a plurality of dispatching rules. Table 1 is an example of dispatching rules. The initial dispatch rule set  126  may include 20 dispatching rules as shown in Table 1, but the disclosure is not limited thereto. For example, the dispatch rule set  126  may further include “Dispatching rule RANDOM” representing a random dispatch. 
     
       
         
           
               
               
             
               
                 TABLE 1 
               
               
                   
               
               
                 Dispatching 
                   
               
               
                 rule 
                 Description 
               
               
                   
               
             
            
               
                 LWIP 
                 The higher the water level before the workstation point, the 
               
               
                   
                 more priority to being dispatched 
               
               
                 SWIP 
                 The lower the water level before the workstation point, the 
               
               
                   
                 more priority to being dispatched 
               
               
                 HCM 
                 The more processes a machine may execute, the more 
               
               
                   
                 priority to being used 
               
               
                 LCM 
                 The fewer processes a machine may execute, the more 
               
               
                   
                 priority to being used 
               
               
                 LPT 
                 The longer the working hours, the more priority 
               
               
                 SPT 
                 The shorter the working hours, the more priority 
               
               
                 FOPNR 
                 The less the number of remaining processes, the more 
               
               
                   
                 priority 
               
               
                 MOPNR 
                 The more the number of remaining processes, the more 
               
               
                   
                 priority 
               
               
                 NINQ 
                 The fewer remaining processes the machine may execute, 
               
               
                   
                 the more priority to being used 
               
               
                 WINQ 
                 The shorter the online waiting time of the machine where 
               
               
                   
                 this process is located, the more priority 
               
               
                 FIFO 
                 The earlier a process starts, the more priority 
               
               
                 FILO 
                 The later a process starts, the more priority 
               
               
                 FMRT 
                 The earlier the release time of the machine used in this 
               
               
                   
                 process, the higher the priority 
               
               
                 LMRT 
                 The later the release time of the machine used in this 
               
               
                   
                 process, the higher the priority 
               
               
                 LWKR 
                 The one with the least total working hours of the remaining 
               
               
                   
                 processes has priority 
               
               
                 LMT 
                 The one with the largest product of the working hours of 
               
               
                   
                 this process and total working hours has priority 
               
               
                 SMT 
                 The one with the smallest product of the working hours of 
               
               
                   
                 this process and total working hours has priority 
               
               
                 TWORK 
                 The one with the least total working hours has priority 
               
               
                 LDT 
                 The one with the working hours of this process accounting 
               
               
                   
                 for the largest proportion of the total working hours has 
               
               
                   
                 priority 
               
               
                 SSO 
                 The one with the shortest working hours of the next process 
               
               
                   
                 has priority 
               
               
                   
               
            
           
         
       
     
     The transceiver  130  transmits and receives signals in a wireless or wired manner. The transceiver  130  may further execute operations such as low noise amplification, impedance matching, frequency mixing, up or down frequency conversion, filtering, amplification, and the like. 
     In order to recommend a suitable dispatching rule for a workstation on the production line, the data obtaining module  121  may receive a plurality of test data sets collected from the production line through the transceiver  130 . The test data set may include a plurality of work orders, and each work order may include workstation scheduling associated with a plurality of workstations. Workstation scheduling may include information such as the machines of workstations or process working hours. Table 2 is an example of two work orders. 
     
       
         
           
               
               
               
             
               
                   
                 TABLE 2 
               
               
                   
                   
               
             
            
               
                   
                 Work order #1 
                 Machine #11 (83 minutes) &gt; Machine #7 (59 
               
               
                   
                   
                 minutes) &gt; . . . &gt; Machine #10 (58 minutes) 
               
               
                   
                 Work order #2 
                 Machine #1 (11 minutes) &gt; Machine #14 (67 
               
               
                   
                   
                 minutes) &gt; . . . &gt; Machine #3 (9 minutes) 
               
               
                   
                   
               
            
           
         
       
     
     After the test data sets are obtained, the multi-level dispatching rule creation module  122  may generate an initial individual (or referred to as an initial chromosome) for each of the test data sets. Taking a first test data set among the test data sets as an example, the multi-level dispatching rule creation module  122  may generate one or more initial individuals according to the dispatch rule set  126  based on the genetic algorithm. The initial individual may include a plurality of genes respectively corresponding to a plurality of workstations, and each gene may include a dispatching rule sequence. The dispatching rule sequence may include one or more dispatching rules arranged in sequence. In other words, each workstation may be assigned a plurality of dispatching rules. 
     Table 3 is an example of initial individuals corresponding to 3 workstations (that is, assuming there are 3 workstations on the production line). The dispatching rule sequence corresponding to Workstation #1 (or referred to as a first workstation) may include “Dispatching rule LWIP”, “Dispatching rule MOPNR” and “Dispatching rule NINQ” arranged in sequence. The dispatching rule sequence corresponding to Workstation #2 (or referred to as a second workstation) may include “Dispatching rule LWIP” and “Dispatching rule FOPNR” arranged in sequence. The dispatching rule sequence corresponding to Workstation #3 may include “Dispatching rule LPT” and “Dispatching rule NINQ” arranged in sequence. 
     
       
         
           
               
               
               
               
             
               
                   
                 TABLE 3 
               
               
                   
                   
               
               
                   
                 Workstation #1 
                 Workstation #2 
                 Workstation #3 
               
               
                   
                   
               
             
            
               
                   
                 LWIP 
                 LWIP 
                 LPT 
               
               
                   
                 MOPNR 
                 FOPNR 
                 NINQ 
               
               
                   
                 NINQ 
               
               
                   
                   
               
            
           
         
       
     
     In an embodiment, the data obtaining module  121  may obtain available resource information collected from the production line through the transceiver  130 . The available resource information may include available workstations, available dispatching rules of the workstations, or information such as process working hours. The multi-level dispatching rule creation module  122  may generate one or more initial individuals for the first test data set according to available resource information. 
     After the multi-level dispatching rule creation module  122  generates one or more initial individuals for the first test data set, the evolution module  123  may generate one or more first individuals based on the genetic algorithm according to the first test data set and the initial individual. That is, the initial individual is the paternal generation of the first individual, and the first individual is the offspring of the first generation of the initial individual. Similar to the initial individual, the first individual may include a plurality of genes respectively corresponding to a plurality of workstations, and each gene may include a dispatching rule sequence. 
     The evolution module  123  may update at least one of the genes in the initial individual according to the genetic algorithm to generate the first individual.  FIG.  2    illustrates a schematic diagram of generating individuals based on a genetic algorithm according to an embodiment of the disclosure. The evolution module  123  may allocate a plurality of initial individuals to a first individual set  210  corresponding to high fitness or an individual set (or referred to as a second individual set)  220  corresponding to low fitness. Specifically, the evolution module  123  may output the initial individual through the transceiver  130 . Next, the evolution module  123  may receive the fitness corresponding to the output initial individual through the transceiver  130 . If the fitness of the initial individual is greater than a fitness threshold value, the evolution module  123  may allocate the initial individual to the first individual set  210  corresponding to the high fitness. If the fitness of the initial individual is less than or equal to the fitness threshold value, the evolution module  123  may allocate the initial individual to the second individual set  220  corresponding to the low fitness. 
     For example, the user may configure dispatching rules for a plurality of workstations on the production line according to the initial individual output by the evolution module  123 , and record the resources consumed by the configured production line, and the resources include, for example, the total consumption of working hours of the production line. The lower the total working hours, the higher the fitness of the initial individual. The higher the total working hours, the lower the fitness of the initial individual. The user may feed the fitness corresponding to the initial individual back to evolution module  123 . 
     In an embodiment, it is assumed that a plurality of initial individuals generated by the multi-level dispatching rule creation module  122  include an initial individual allocated to the first individual set  210  and a second initial individual allocated to the second individual set  220 . The evolution module  123  may select the initial individual from the first individual set  210 , and may select the second initial individual from the second individual set  220 . The evolution module  123  may perform crossover on the selected initial individual and the second initial individual to update one or more genes on the initial individual to generate the first individual. In other words, the paternal generation of the first individual may include the initial individual with high fitness and the second initial individual with low fitness. 
     Taking  FIG.  2    as an example, it is assumed that the first individual set  210  includes an initial individual #1 and an initial individual #2, and the second individual set  220  includes an initial individual #3, an initial individual #4, and an initial individual #5. The evolution module  123  may select the initial individual #1 from the first individual set  210  and the initial individual #5 from the second individual set  220 . The initial individual #1 may include a gene  11  corresponding to the workstation #1, a gene  12  corresponding to the workstation #2, and a gene  13  corresponding to the workstation #3. The dispatching rule sequence in the gene  11  includes “Dispatching rule A” and “Dispatching rule B”, the dispatching rule sequence in the gene  12  includes “Dispatching rule C”, and the dispatching rule sequence in the gene  13  includes “Dispatching rule D” and “Dispatching rule E”. The initial individual #5 may include a gene  51  corresponding to the workstation #1, a gene  52  corresponding to the workstation #2, and a gene  53  corresponding to the workstation #3. The dispatching rule sequence in the gene  51  includes “Dispatching rule F” and “Dispatching rule G”, the dispatching rule sequence in the gene  52  includes “Dispatching rule H” and “Dispatching rule I”, and the dispatching rule sequence in the gene  53  includes “Dispatching rule J”. 
     The evolution module  123  may perform crossover on the initial individual #1 and the initial individual #5 to update the gene  11  on the initial individual #1. In the evolution module  123 , the gene  51  on the initial individual #5 corresponding to the workstation #1 may be used to replace the gene  11  on the initial individual #1 to generate an individual #6. The individual #6 may include the gene  51  corresponding to the workstation #1, the gene  12  corresponding to the workstation #2, and the gene  13  corresponding to the workstation #3. 
     In an embodiment, the evolution module  123  may perform mutation on one or more genes on the initial individual according to the genetic algorithm to update one or more dispatching rules in the gene of the initial individual, thereby generating the first individual. Taking  FIG.  2    as an example, it is assumed that the initial individual #2 may include a gene  21  corresponding to the workstation #1, a gene  22  corresponding to the workstation #2, and a gene  23  corresponding to the workstation #3. The dispatching rule sequence in the gene  21  includes “Dispatching rule A” and “Dispatching rule B”, the dispatching rule sequence in the gene  22  includes “Dispatching rule C”, and the dispatching rule sequence in the gene  23  includes “Dispatching rule G” and “Dispatching rule H”. 
     The evolution module  123  may perform mutation on the gene  22  or the gene  23  on the initial individual #2 to update the gene  22  or the gene  23 , thereby generating an individual #7. The individual #7 may include the gene  21  corresponding to the workstation #1, a gene  24  corresponding to the workstation #2, and a gene  25  corresponding to the workstation #3. The gene  24  is generated by mutation of the gene  22 , and the dispatching rule sequence in the gene  24  contains “Dispatching rule D”. The gene  25  is generated by mutation of the gene  23 , and the dispatching rule sequence in the gene  25  contains “Dispatching rule J” and “Dispatching rule H”. 
     After the evolution module  123  updates the gene in the initial individual according to the genetic algorithm to generate the first individual (that is, a first offspring), the evolution module  123  may update the gene in the first individual to generate a second offspring based on a method similar to the embodiment in  FIG.  2   . By analogy, the evolution module  123  may generate a plurality of individuals of different generations according to the initial individual. The rule block filtering module  124  may select an individual from the individuals, and perform scoring on the dispatching rule according to the selected individual. In an embodiment, the rule block filtering module  124  may calculate the fitness of each of the individuals according to the first test data set, and select an optimal individual from the individuals according to the fitnesses. The rule block filtering module  124  may perform scoring on the dispatching rule according to the selected optimal individual. In an embodiment, the dispatching rule recommendation module  125  may output the selected optimal individual through the transceiver  130  for the user&#39;s reference. 
     Specifically, it is assumed that the rule block filtering module  124  selects the first individual. The rule block filtering module  124  may perform scoring on the dispatching rule according to the first individual, and the first individual may include a plurality of dispatching rule sequences (for example, a first dispatching rule sequence or a second dispatching rule sequence) respectively corresponding to a plurality of workstations (for example, the workstation #1 or the workstation #2). The rule block filtering module  124  may, according to the order of a specific dispatching rule (for example, a first dispatching rule or a second dispatching rule) in each of the dispatching rule sequences, calculate the score corresponding to the specific dispatching rule. The higher the order of a specific dispatching rule, the higher the priority and score of the specific dispatching rule. In other words, the score of the dispatching rule may be related to the order of the dispatching rule in the dispatching rule sequence, and the score of the dispatching rule may be related to different genes (that is, different dispatching rule sequences) on the first individual. 
     Table 4 is an example of the first individual (or the optimal individual) selected by the rule block filtering module  124 . The first individual includes the first dispatching rule sequence corresponding to the workstation #1, the second dispatching rule sequence corresponding to the workstation #2, and a third dispatching rule sequence corresponding to the workstation #3. The rule block filtering module  124  may assign weights to each order in the dispatching rule sequence. For example, if the dispatching rule is in the first order in the dispatching rule sequence, the dispatching rule may get 4 points. If the dispatching rule is located in the second order in the dispatching rule sequence, the dispatching rule may get 3 points. If the dispatching rule is located in the third order in the dispatching rule sequence, the dispatching rule may get 2 points. If the dispatching rule is located in the fourth order in the dispatching rule sequence, the dispatching rule may get 1 point. In this way, the rule block filtering module  124  may calculate the score for each dispatching rule, as shown in Table 5. 
     
       
         
           
               
               
               
               
             
               
                   
                 TABLE 4 
               
               
                   
                   
               
               
                   
                 Workstation #1 
                 Workstation #2 
                 Workstation #3 
               
               
                   
                   
               
             
            
               
                   
                 SWIP 
                 LPT 
                 FOPNR 
               
               
                   
                 SPT 
                   
                 NINQ 
               
               
                   
                   
                   
                 SPT 
               
               
                   
                   
                   
                 LCM 
               
               
                   
                   
               
            
           
         
       
     
     
       
         
           
               
               
               
               
               
             
               
                 TABLE 5 
               
               
                   
               
               
                   
                 Order in 
                 Order in 
                 Order in 
                   
               
               
                 Dispatching 
                 workstation 
                 workstation 
                 workstation 
               
               
                 rule 
                 #1 
                 #2 
                 #3 
                 Score 
               
               
                   
               
             
            
               
                 SWIP 
                 1 (4 points) 
                 N/A 
                 N/A 
                 4 
               
               
                 SPT 
                 2 (3 points) 
                 N/A 
                 3 (2 points) 
                 3 + 2 = 5 
               
               
                 LPT 
                 N/A 
                 1 (4 points) 
                 N/A 
                 4 
               
               
                 FOPNR 
                 N/A 
                 N/A 
                 1 (4 points) 
                 4 
               
               
                 NINQ 
                 N/A 
                 N/A 
                 2 (3 points) 
                 3 
               
               
                 LCM 
                 N/A 
                 N/A 
                 4 (1 point) 
                 1 
               
               
                   
               
            
           
         
       
     
     After the score for each dispatching rule is obtained, the rule block filtering module  124  may remove the dispatching rule with a lower score from the first individual to update the first individual, and may output the updated first individual through the transceiver  130  for the user&#39;s reference. Taking Tables 4 and 5 as examples, the rule block filtering module  124  may remove “Dispatching rule LCM” corresponding to the smallest score from the first individual in Table 4, thereby generating the updated first individual shown in Table 6. The rule block filtering module  124  may output the updated first individual for the user&#39;s reference. 
     
       
         
           
               
               
               
               
             
               
                   
                 TABLE 6 
               
               
                   
                   
               
               
                   
                 Workstation #1 
                 Workstation #2 
                 Workstation #3 
               
               
                   
                   
               
             
            
               
                   
                 SWIP 
                 LPT 
                 FOPNR 
               
               
                   
                 SPT 
                   
                 NINQ 
               
               
                   
                   
                   
                 SPT 
               
               
                   
                   
                   
                 
                   
                 
               
               
                   
                   
               
            
           
         
       
     
     It is worth noting that after the rule block filtering module  124  determines the specific dispatching rule to be removed from the first individual according to the score, if the dispatching rule sequence in the first individual only contains the specific dispatching rule to be removed, the rule block filtering module  124  may use another dispatching rule (that is, a dispatching rule that is different from the specific dispatching rule) in the dispatch rule set  126  to replace the specific dispatching rule, thereby removing the specific dispatching rule from the dispatching rule sequence. Taking the first individual in Table 4 as an example, it is assumed that “Dispatching rule LPT” has the smallest score. Since the second dispatching rule sequence corresponding to the workstation #2 only contains “Dispatching rule LPT”, the rule block filtering module  124  may use another dispatching rule (that is, a dispatching rule different from “Dispatching rule LPT”) in the dispatch rule set  126  to replace “Dispatching rule LPT” to update the second dispatching rule sequence. 
     On the other hand, after the score of each dispatching rule is obtained, the rule block filtering module  124  may remove the dispatching rule with a lower score from the dispatch rule set  126  to update the dispatch rule set  126 , and output the updated dispatch rule set  126  through the transceiver  130  for the user&#39;s reference. Next, the multi-level dispatching rule creation module  122  may generate a new initial individual according to the updated dispatch rule set  126  based on the genetic algorithm. The evolution module  123  may generate a new first individual based on the new initial individual. The rule block filtering module  124  may calculate the score for each dispatching rule in the dispatch rule set  126  according to the new first individual, and remove the dispatching rule with a lower score from the dispatch rule set  126  to update the dispatch rule set  126  again. As such, the dispatch rule set  126  is updated repeatedly, and the number of dispatching rules in the dispatch rule set  126  decreases. The electronic device  100  may repeatedly update the dispatch rule set  126  until the number of dispatching rules in the dispatch rule set  126  is equal to zero. 
     Taking Table 5 as an example, it is assumed that the rule block filtering module  124  removes two dispatching rules with the lowest scores in one update of the dispatch rule set  126 . When the dispatch rule set  126  is updated for the first time, the rule block filtering module  124 , in response to the score of “Dispatching rule LCM” being the lowest score among all the scores in Table 5, may remove “Dispatching rule LCM” from the dispatch rule set  126 . Next, the rule block filtering module  124  may, in response to the score of “Dispatching rule NINQ” being the second lowest score among all the scores in Table 5, remove “Dispatching rule NINQ” from the dispatch rule set  126 . After “Dispatching rule LCM” and “Dispatching rule NINQ” are removed from the dispatch rule set  126 , the rule block filtering module  124  may complete the first update of the dispatch rule set  126 . The dispatching rule recommendation module  125  may output the updated dispatch rule set  126  through the transceiver  130  for the user&#39;s reference. Since in the update process of the dispatch rule set  126 , the number of dispatching rules may be significantly reduced, the user may perform scheduling for workstations on the production line according to fewer dispatching rules. Accordingly, the performance of the production line may be improved and the complexity of scheduling may be reduced. 
     The rule block filtering module  124  may select the optimal individual from a plurality of individuals based on the updated dispatch rule set  126 . The individual may include the initial individual generated by the multi-level dispatching rule creation module  122  according to the first test data set or the individual generated after the evolution module  123  performs crossover or mutation. The dispatching rule recommendation module  125  may output the optimal individual through the transceiver  130  for the user&#39;s reference. 
     The rule block filtering module  124  may generate the optimal individual for the first test data set according to the initial dispatch rule set  126 , and the optimal individual is also referred to as a local optimal individual. After the rule block filtering module  124  removes the dispatching rule (for example, the first dispatching rule) from the initial dispatch rule set  126  to update the dispatch rule set  126 , the rule block filtering module  124  may increase the count value corresponding to the removed dispatching rule. Updating the dispatch rule set  126  may generate a dispatching rule subset (that is, the updated dispatch rule set  126 ). The rule block filtering module  124  may generate another local optimal individual for the first test data set according to the dispatching rule subset. The electronic device  100  may perform a plurality of updates for the dispatch rule set  126  until the number of dispatching rules in the dispatch rule set  126  is equal to zero. After the updates of the dispatch rule set  126  are completed, the rule block filtering module  124  may obtain a plurality of local optimal individuals, and the local optimal individuals may include the local optimal individual corresponding to the initial dispatch rule set  126 , and may include the local optimal individual corresponding to each dispatching rule subset. 
     In each update of the dispatch rule set  126 , the rule block filtering module  124  may increase the count value (increase the count value by one) for the dispatching rule that is removed. After the updates of the dispatch rule set  126  are completed, that is, after the number of dispatching rules in the dispatch rule set  126  is equal to zero, the rule block filtering module  124  may generate a plurality of local optimal individuals, and may calculate the count value of each dispatching rule. The rule block filtering module  124  may, in response to the Nth local optimum individual corresponding to the Nth update among the local optimum individuals being a global optimum individual (that is, the optimum individual among all the local optimum individuals), decrease the count value corresponding to the Mth update (decrease the count value of the dispatching rule removed at the Mth update by one), where N and M are positive integers and M is greater than N. 
     
       
         
           
               
               
             
               
                   
                 TABLE 7 
               
               
                   
                   
               
             
            
               
                   
                 The i-th update of the dispatch rule set 126 
               
            
           
           
               
               
               
               
               
               
            
               
                 i 
                 0 
                 1 
                 2 
                 3 
                 4 
               
               
                   
               
               
                 Fitness 
                 20 
                 30 
                  50 
                  60 
                 90 
               
               
                 Deleted 
                 LWIP 
                 SWIP 
                 HCM 
                 LCM 
                 LPT 
               
               
                 dispatching rule 
                 SSO 
                 LDT 
                 TWORK 
                 SMT 
                 LMT 
               
               
                   
               
               
                 i 
                 5 
                 6 
                 7 
                 8 
                 9 
               
               
                   
               
               
                 Fitness 
                 65 
                 75 
                 120 
                 100 
                 80 
               
               
                 Deleted 
                 SPT 
                 FOPNR 
                 MOPNR 
                 NINQ 
                 WINQ 
               
               
                 dispatching rule 
                 LWKR 
                 LMRT 
                 FMRT 
                 FILO 
                 FIFO 
               
            
           
           
               
            
               
                 First test data 
               
               
                   
               
            
           
         
       
     
     Taking Table 7 as an example, Table 7 shows the fitness of the local optimal individual corresponding to the dispatching rule subset generated by the i-th update of dispatch rule set  126 , and the case of (i=0) represents the dispatch rule set  126  that is not updated (that is, the initial dispatch rule set  126 ). In this embodiment, it is assumed that the initial dispatch rule set  126  includes 20 kinds of dispatching rules as shown in Table 1, and the rule block filtering module  124  removes two dispatching rules from the dispatch rule set  126  in each update of the dispatch rule set  126 . 
     When the dispatch rule set  126  is not updated, the rule block filtering module  124  may calculate the fitness of each of a plurality of individuals according to the first test data set, and select the local optimal individual from the individuals according to the fitnesses. The fitness of the local optimal individual is 20. 
     Next, the rule block filtering module  124  may remove “Dispatching rule LWIP” and “Dispatching rule SSO” from the initial dispatch rule set  126 , so as to complete the initial update of the dispatch rule set  126 . When removing “Dispatching rule LWIP” and “Dispatching rule”, the rule block filtering module  124  may increase the count value of “Dispatching rule LWIP” and the count value of “Dispatching rule SSO”. After completing the initial update of the dispatch rule set  126 , the rule block filtering module  124  may calculate the fitness of each of a plurality of individuals according to the updated dispatch rule set  126  and the first test data set, and select the local optimal individual from the individuals according to the fitnesses. The fitness of the local optimal individual is 30. 
     By analogy, after  9  updates, the number of dispatching rules in the dispatch rule set  126  is equal to zero. The rule block filtering module  124  may stop updating the dispatch rule set  126  and obtain the information shown in Table 7. The rule block filtering module  124  may, in response to the 7th local optimal individual corresponding to the 7th update among the 10 local optimal individuals having the highest fitness, determine that the 7th local optimal individual is the global optimal individual. The rule block filtering module  124  may, in response to the seventh local optimal individual being the global optimal individual, reduce the count values corresponding to the 8th to 9th updates; that is, the rule block filtering module  124  may reduce the count value of “Dispatching rule NINQ”, the count value of “Dispatching rule FILO”, the count value of “Dispatching rule WINQ”, and the count value of “Dispatching rule FIFO”. Finally, the rule block filtering module  124  may obtain the statistical result of the count values shown in Table 8 according to the first test data set. Based on a similar method, the rule block filtering module  124  may obtain the statistical result of a plurality of count values according to a plurality of test data sets. The rule block filtering module  124  may add a plurality of count values respectively corresponding to the specific dispatching rules of a plurality of test data sets to obtain the sum of the count values of the specific dispatching rules, as shown in Table 9. 
     
       
         
           
               
               
               
             
               
                   
                 TABLE 8 
               
               
                   
                   
               
               
                   
                 Dispatching rule 
                 Count value 
               
               
                   
                   
               
             
            
               
                   
               
            
           
           
               
               
               
            
               
                   
                 LWIP 
                 1 
               
               
                   
                 SWIP 
                 1 
               
               
                   
                 HCM 
                 1 
               
               
                   
                 LCM 
                 1 
               
               
                   
                 LPT 
                 1 
               
               
                   
                 SPT 
                 1 
               
               
                   
                 FOPNR 
                 1 
               
               
                   
                 MOPNR 
                 1 
               
               
                   
                 NINQ 
                 0 
               
               
                   
                 WINQ 
                 0 
               
               
                   
                 FIFO 
                 0 
               
               
                   
                 FILO 
                 0 
               
               
                   
                 FMRT 
                 1 
               
               
                   
                 LMRT 
                 1 
               
               
                   
                 LWKR 
                 1 
               
               
                   
                 LMT 
                 1 
               
               
                   
                 SMT 
                 1 
               
               
                   
                 TWORK 
                 1 
               
               
                   
                 LDT 
                 1 
               
               
                   
                 SSO 
                 1 
               
               
                   
                   
               
            
           
         
       
     
     
       
         
           
               
               
               
             
               
                   
                 TABLE 9 
               
               
                   
                   
               
               
                   
                 Dispatching rule 
                 Count value 
               
               
                   
                   
               
             
            
               
                   
               
            
           
           
               
               
               
            
               
                   
                 LWIP 
                 39 
               
               
                   
                 SWIP 
                 38 
               
               
                   
                 HCM 
                 38 
               
               
                   
                 LCM 
                 35 
               
               
                   
                 LPT 
                 37 
               
               
                   
                 SPT 
                 34 
               
               
                   
                 FOPNR 
                 35 
               
               
                   
                 MOPNR 
                 32 
               
               
                   
                 NINQ 
                 32 
               
               
                   
                 WINQ 
                 31 
               
               
                   
                 FIFO 
                 28 
               
               
                   
                 FILO 
                 28 
               
               
                   
                 FMRT 
                 25 
               
               
                   
                 LMRT 
                 25 
               
               
                   
                 LWKR 
                 23 
               
               
                   
                 LMT 
                 17 
               
               
                   
                 SMT 
                 18 
               
               
                   
                 TWORK 
                 7 
               
               
                   
                 LDT 
                 14 
               
               
                   
                 SSO 
                 13 
               
               
                   
                   
               
            
           
         
       
     
     The dispatching rule recommendation module  125  selects one or more dispatching rules with smaller count values from the initial dispatch rule set  126  as recommended dispatching rules. The dispatching rule recommendation module  125  may output the recommend dispatching rule(s) through the transceiver  130  for user&#39;s reference for scheduling workstations. Taking Table 9 as an example, it is assumed that the electronic device  100  intends to generate three recommended dispatching rules. The dispatching rule recommendation module  125  may, in response to the count value of “Dispatching rule TWORK” being less than the other count values in Table 9, set “Dispatching rule TWORK” as the recommended dispatching rule. The dispatching rule recommendation module  125  may, in response to the count value of “Dispatching rule SSO” being less than the other count values (that is, all count values except for the count value of “Dispatching rule TWORK”) in Table 9, set “Dispatching rule SSO” as the recommended dispatching rule. The dispatching rule recommendation module  125  may, in response to the count value of “Dispatching rule LDT” being less than the other count values (that is, all count values except for the count value of “Dispatching rule TWORK” and the count value of “Dispatching rule SSO”) in Table 9, set “Dispatching rule LDT” as the recommended dispatching rule. 
       FIG.  3    illustrates a flow chart of a method of filtering dispatching rules for a workstation according to an embodiment of the disclosure, and the method may be implemented by the electronic device  100  as shown in  FIG.  1   . In step S 301 , a dispatch rule set including a first dispatching rule and a first test data set are obtained. In step S 302 , an initial individual is generated according to the dispatch rule set based on a genetic algorithm. In step S 303 , a first individual is generated according to the first test data set and the initial individual based on the genetic algorithm, and the first individual includes a first dispatching rule sequence corresponding to a first workstation, and the first dispatching rule sequence includes a first dispatching rule. In step S 304 , a first score corresponding to the first dispatching rule is calculated according to a first order of the first dispatching rule in the first dispatching rule sequence, and the dispatch rule set is updated according to the first score. In step S 305 , an updated dispatch rule set is output. 
     In summary, the electronic device of the disclosure may select or recommend the applicable dispatching rule for a plurality of workstations on the production line according to the genetic algorithm. The electronic device may create the individual corresponding to the workstations, and the individual may include the dispatching rule sequence related to the workstation, and the dispatching rule sequence may include a plurality of dispatching rules. The electronic device may perform scoring on the dispatching rule according to the order of the dispatching rule in the dispatching rule sequence, and determine whether the dispatching rule is suitable for the production line according to the score and generate the determination result. After using a plurality of test data sets to generate a plurality of determination results, the electronic device may select the dispatching rule that may significantly improve the efficiency of the workstation according to the determination results. The user may optimize the scheduling of the production line according to the dispatching rule recommended by the electronic device.