Abstract:
Provided is a mission scheduling method. The mission scheduling method includes: when a time window representing a time range that a plurality of missions are executed and a duration of the missions are given, determining an execution start time and finish time of each of the missions; selecting a first mission that is first finished among the missions; selecting second missions which collide or do not collide with the first mission depending on the execution order of the second missions; and including in a schedule a mission that is first finished when the first mission and the second missions are respectively executed according to a combination of orders, wherein the first mission and the second missions according to the combination of orders do not collide with each other.

Description:
CROSS-REFERENCE TO RELATED PATENT APPLICATION 
       [0001]    This application claims the benefit of Korean Patent Application No. 10-2008-0075350, filed on Jul. 31, 2008 in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to a mission scheduling method, and more particularly, to a method of including a number of various missions in a schedule within a given time. 
         [0004]    2. Description of the Related Art 
         [0005]    Studies on mission scheduling can be classified into four types according to the number of resources and whether slack, namely, idle time is allowed or not; the four types are: &lt;single resource, slack allowed&gt;, &lt;single resource, slack not allowed&gt;, &lt;multiple resources, slack allowed&gt;, and &lt;multiple resources, slack not allowed&gt;. Multiple resources are a more complicated problem than single resource, and it is a more complicated problem when slack is allowed than when slack is not allowed. However, the complexity is more affected by whether slack is allowed or not than by the number of resources. The number of resources has only a polynomial time complexity, but the allowed slack has an exponential time complexity. 
         [0006]    When slack is not allowed, an optimal timeline is calculated within a polynomial time regardless of the number of resources. 
         [0007]    However, if slack is allowed, a problem that generates an optimal timeline regardless of the number of resources becomes a nondeterministic polynomial (NP)-Complete problem. In other words, it is impossible to generate an optimal timeline using a mission scheduling algorithm (MSA) when the size of the problem is slightly big. In this case, one should be satisfied with generating a near optimal time line within a shortest time. To this end, various heuristics including a random sampling algorithm have been used. 
       SUMMARY OF THE INVENTION 
       [0008]    The present invention provides a mission scheduling method in which a number of missions are executed within a limited time in the case of a single resource when slack is allowed. 
         [0009]    According to an aspect of the present invention, there is provided a mission scheduling method, the method comprising: when a time window representing a time range wherein a plurality of missions are executed and a duration of the missions are given, determining execution start time and finish time of each of the missions; selecting a first mission that is first finished among the missions; selecting second missions which collide or do not collide with the first mission depending on the execution order of the second missions; and including in a schedule a mission that is first finished when the first mission and the second missions are respectively executed according to a combination of orders, wherein the first mission and the second missions according to the combination of orders do not collide with each other. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0010]    The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which: 
           [0011]      FIG. 1  is a schematic view illustrating a mission operating system for a satellite to which an embodiment of the present invention is applied and the satellite performing missions according to a schedule of the mission operating system; and 
           [0012]      FIGS. 2A and 2B  illustrate processes of scheduling of multiple missions according to embodiments of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0013]    The present invention will now be described more fully with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. 
         [0014]      FIG. 1  is a schematic view illustrating a mission operating system  1  of a satellite to which an embodiment of the present invention is applied and the satellite performing missions according to a schedule of the mission operating system. 
         [0015]    The mission operating system  1  executes a mission scheduling method according to an embodiment of the present invention, to operate missions with respect to a satellite  2 . That is, the mission operating system  1  creates a mission plan and a timeline based on information on the satellite orbit and attitudes, according to the demand of the user who uses the satellite  2 , and schedules missions in consideration of whether the missions collide with each other and priorities of the missions. 
         [0016]    A program code syntax with respect to the mission scheduling method according to the current embodiment of the present invention that is executed in the mission operating system  1  is as follows. 
         [0000]    
       
         
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 def adt_pceb(req): 
               
               
                   
                  finish_time=0 
               
               
                   
                  sched=Schedule( ) 
               
               
                   
                  while True: 
               
               
                   
                   req=gen(req, finish_time) 
               
               
                   
                   if len(req)==0: 
               
               
                   
                    break 
               
               
                   
                   sort_by_finish_time(req) 
               
               
                   
                   finish_time=req[0].F 
               
               
                   
                   for t in req[1:]: 
               
               
                   
                    if t.F_w-t.D&lt;=finish_time and t.F&lt;req[0].F_w-req[0].D: 
               
               
                   
                     selected_later_F=t.F+req[0].D 
               
               
                   
                     req2=gen(req[1:], finish_time) 
               
               
                   
                     req2.remove(t) 
               
               
                   
                     if len(req2)==0: 
               
               
                   
                      finish_time=t.F 
               
               
                   
                      sched.append(t) 
               
               
                   
                      req.remove(t) 
               
               
                   
                      break 
               
               
                   
                     elif req2[0].F &gt; selected_later_F: 
               
               
                   
                      finish_time=t.F 
               
               
                   
                      sched.append(t) 
               
               
                   
                      req.remove(t) 
               
               
                   
                      break 
               
               
                   
                     else: 
               
               
                   
                      sched.append(req[0]) 
               
               
                   
                      req.remove(req[0]) 
               
               
                   
                     break 
               
               
                   
                   else: 
               
               
                   
                    sched.append(req[0]) 
               
               
                   
                    req.remove(req[0]) 
               
               
                   
                    return sched 
               
               
                   
                 def gen(req, finish_time): 
               
               
                   
                  req_list=[ ] 
               
               
                   
                  for t in req: 
               
               
                   
                   if finish_time &lt;= t.S_w: 
               
               
                   
                    t.S=t.S_w 
               
               
                   
                    t.F=t.S_w+t.D 
               
               
                   
                    req_list.append(t) 
               
               
                   
                   elif finish_time+t.D&lt;=t.F_w: 
               
               
                   
                    t.S=finish_time 
               
               
                   
                     t.F=finish_time+t.D 
               
               
                   
                    req_list.append(t) 
               
               
                   
                  return req_list 
               
               
                   
                   
               
             
          
         
       
     
         [0017]    Assume a time range, namely a time window during which mission t can be executed, is referred to as [t.S_w, t.F_w]. Since an actual start time t.S and a finish time t.F of mission t should be within the time window in this case, t.S_w≦t.S&lt;t.F &lt;t.F_w is established. Mission duration t.D of the mission t is equal to t.F−t.S. Slack, which is a spare period of the mission t within the time window, is denoted as t.Slack, and t.Slack=t.F_w−t.D−t.S_w. An ID of the mission t is t.ID. 
         [0018]    According to the above-described program code, a satellite mission scheduling algorithm of the present invention includes a mission list generating function gen() and a mission scheduling function adt_pceb(). 
         [0019]    First, the adt_pceb function adt_pceb() will the described. A mission request list, req, is received as an input parameter, wherein req includes a request of a user who is willing to use a satellite resource. That is, req is equal to a set of multiple missions. Each mission t includes six pieces of information, that is, t.ID, t.S_w, t.F_w, t.D, t.S, and t.F. However, in a request operation, t.S and t.F are not determined, and values of t.ID, t.S_w, t.F_w, and t.D are input. Thus, it is the role of scheduling to determine t.S and t.F. 
         [0020]    When the adt_pceb function is executed, finish_time is initialized to 0, and sched is initialized to an empty schedule to which no mission is allocated yet. Missions selected thereafter are added one by one to sched, and when the algorithm is finished, the selected missions are returned as the results of scheduling. Also, finish_time stores a finish time of a mission that is most recently added to sched, that is, t.F. 
         [0021]    Then, a while loop is executed repeatedly. First, the gen function is called in the wile loop. 
         [0022]    The gen function selects executable ones among the mission requests in the req and stores them in req_list. The gen function will be described below for each process. 
         [0023]    First, req_list is initialized to an empty list. In the gen function, t.S is adhered as closely as possible to the beginning part of the time window. That is, after examining the mission t corresponding to a current req, when a currently set finish_time is smaller than or equal to t.S_w, the mission t can be executed from the very front of the time window. Accordingly, t.S and t.F of the mission t are set as t.S_w and t.S_w+t.D, and the mission t is added to req_list. 
         [0024]    If the currently set finish_time+t.D is smaller than or equal to t.F_w, the mission t can be executed within the time window, but t.S needs to be set to be after finish_time so that no collision occurs between the mission t and a mission that is recently added to sched. Accordingly, t.S and t.F of the mission t are respectively set as finish_time and finish_time+t.D, and the mission t is added to req_list. 
         [0025]    If the mission t does not correspond to any one of the above-described two cases, the mission t collides with a mission that is recently added to sched, thus cannot be executed within the corresponding time window of the mission t and is not added to req_list. After the above operations are conducted with respect to all missions of req, the gen function is finished. 
         [0026]    When the gen function is finished and req_list is returned, the algorithm returns again to the adt_pceb function. If the return value from the gen function, that is, the length of updated req, is 0, there is no mission to be added and thus the algorithm left out of loop and is finished. 
         [0027]    When the length of req is not 0, the missions of req are arranged in an ascending order of their finish times. Next, the finish time of a mission req[0] whose finish time is earliest is set as finish_time. 
         [0028]    Then, during a for loop execution, other missions within req[0] and req, that is, req[1], req[2], . . . , etc., are sequentially compared. Here, assume another mission which is an object of comparison is referred to t. 
         [0029]    For example, when t collides with req[0] (that is, t.F_w−t.D&lt;=finish_time) but req[0] can only be executed after executing the mission t first (that is, t.F&lt;req[0].F_w−req[0].D), t.F+req[0].D is stored in selected_later_F. Then the results of the gen function performed with respect to requests other than req[0] in req, that is, req[1:] and finish_time, are stored in req2. 
         [0030]    If req2 is empty, the mission t needs to be executed first, and thus the mission t is added to the schedule sched (finish_time=t.F, sched.append(t)), and the mission t is removed from req and returns to the beginning of the while loop. If req2 is not empty and req2[0].F is greater than selected_later_F, that is, if the finish time of execution of req[0] after performing the mission t is shorter than the finish time of the execution of req2[0], the mission t needs to be executed first. Thus the mission t is selected instead of req[0] and added to the schedule sched (finish_time=t.F, sched.append(t)), and the mission t is removed from req and then the algorithm returns again to the beginning of while loop. 
         [0031]    When the finish time of execution of req[0] after the execution of the mission t is not shorter than the finish time of the execution of req2[0], it is not appropriate to execute the mission t. Thus req[0] is added to the schedule sched instead of the mission t (sched.append(req[0])), and req[0] is removed from req and the algorithm returns again to the beginning of the while loop. 
         [0032]    If a mission t does not collide with req[0] (that is, t.F_w−t.D&gt;finish_time) or it is not appropriate to execute req[0] after executing the mission t first (that is, t.F&gt;=req[0].F_w−req[0].D), req[0] is added to the schedule sched instead of the mission t, and req[0] is removed from req and the algorithm returns again to the beginning of while loop. 
         [0033]    When the while loop is finished, the adt_pceb function is finished, and the schedule sched is returned as the result of scheduling. 
         [0034]      FIGS. 2A and 2B  illustrate scheduling processes of multiple missions according to embodiments of the present invention. 
         [0035]    First, it is assumed that only two missions T 1  and T 2  are present in  FIG. 2A . In this case, T 1  basically needs to be executed at the position T 1 _a. T 2  is omitted from the schedule due to T 1 . However, if T 1  is not executed at T 1 _a and T 2  is first executed at the position T 2 _a, it is probable that T 1  is executed at T 1 _b after T 2 . In this manner, two missions T 2  and T 1  may be expected to be executed, unlike the case where only one mission, the mission T 1 , is executed. 
         [0036]    Here, a case where another mission T 3  other than T 1  and T 2  is present will be considered. Two missions T 2 _a and T 1 _b are executed in the above-described method and the final finish time is T 1 _b.F. 
         [0037]    On the other hand, when T 1 _a is selected, even if T 2  is omitted, T 3  which is executed at a position T 3 _a can be selected. As a result, two missions T 1 _a and T 3 _a are executed, and the final finish time is T 3 _a.F. 
         [0038]    Consequently, even if both of the above-described two methods execute two missions, it is preferable to select T 1 _a and T 3 _a in terms of executing a schedule as quickly as possible, because T 3 _a.F&lt;T 1 _b.F. 
         [0039]    According to the above-described method, it is more preferable to select T 2 _a and T 1 _b in the embodiment of  FIG. 2B  than to select T 1 _a and T 3 _a. Accordingly, according to the current embodiment of the present invention, an improved result can be obtained in both embodiments illustrated in  FIGS. 2A and 2B  compared to the conventional art. 
         [0040]    According to the mission scheduling method of the present invention, it is checked whether a mission that is selected because it can be finished as the first and another mission that is to be omitted due to the selected mission may coexist. If there is probability of coexistence, it is judged whether it is more advantageous to include the mission to be omitted instead of the selected mission. If it is advantageous to include the mission to be omitted, the mission to be omitted is included in the schedule, and if it is not advantageous, the selected mission is included in the schedule. Thus, further missions can be executed within a limited time compared with the conventional art. 
         [0041]    The invention can also be embodied as computer readable codes on a computer readable recording medium. The computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and carrier waves such as data transmission through the Internet. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. 
         [0042]    In alternative embodiments, hard-wired circuitry may be used in place of or in combination with processor/controller programmed with computer software instructions to implement the invention. Thus embodiments of the invention are not limited to any specific combination of hardware circuitry and software. 
         [0043]    As described above, preferred embodiments of the present invention have been described with reference to the attached drawings. The meaning of the terms used in the present specification and claims of the present invention should not be limited to be of ordinary or literary meaning but construed as meanings and concepts not departing from the spirit and scope of the invention. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the scope of the invention is defined not by the detailed description of the invention but by the appended claims.