arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2102.03555v1 [cs.AI] 06 Feb 2021

Scheduling Plans of Tasks
Internship report. Supervisors: Amal El Fallah Seghrouchni, Safia-Kedad Sidhoum

Davide Andrea Guastella
Abstract

We present a heuristic algorithm for solving the problem of scheduling plans of tasks. The plans are ordered vectors of tasks, and tasks are basic operations carried out by resources. Plans are tied by temporal, precedence and resource constraints that makes the scheduling problem hard to solve in polynomial time.

The proposed heuristic, that has a polynomial worst-case time complexity, searches for a feasible schedule that maximize the number of plans scheduled, along a fixed time window, with respect to temporal, precedence and resource constraints.

I Introduction

Scheduling is a decision-making process that is used on a regular basis in many manufacturing and services industries [1]. It deals with the allocation of resources to tasks over given time periods and its goal is to optimize one or more objectives.

From a theoretical point of view, a scheduling problem is a constrained combinatorial optimization problem where a set of task must be ordered in such a way that all these are arranged, according to one or more constraints, to constitute a schedule that minimize or maximize a given objective function.

One of the most popular scheduling problem is the resource-constrained project scheduling problem (RCPSP) [2]: the objective of resource-constrained scheduling consists in developing a schedule such that a set of tasks is completed as early as possible considering both the precedence relationships and the restricted availabilities of resources.

The scheduling problem we are facing can be thought as a particular case of the RCPSP problem: in our case we are facing the problem of scheduling plans of tasks subject to both precedence, resource and temporal constraints. Also, rather than scheduling tasks as in the RCPSP, our problem aims at selecting a maximum number of plans.

II Case studies

Nowadays, airborne platforms such as Remote Piloted Air Vehicles (RPAS) are employed in different scenario including conflicts, surveillance and rescue [3]. In these scenario, airborne platforms operate in highly dynamic environments with a low predictability. In this context, onboard instruments (i.e. sensors) allow the platform, hence the mission manager, to collect knowledge from the field. Sensors carried by RPAS are now able to perform a large panel of functions such as image acquisition, spectrum analysis, and object tracking [4]. All these sensors play a major role in operation and their optimization has become essential.

Because of the criticality of the context and the mission’s objectives, it is important to develop a method that orchestrates the operations conducted by the sensors, such that the mission is accomplished correctly and by satisfying all the constraints. Moreover, due to both critical contexts and dynamic environment, it is important to orchestrate the operations of the sensors within a relatively short time.

As further case study, consider the in-flight airplane safety [5]. In this context there is a need for detecting and resolving data errors which could come from faulty sensor measurements, inaccurate data processing, or poor information transmission, that can lead to catastrophic accidents as in the case of the Air France 447’s accident. Our scheduling technique can be employed as a fault recovery technique: for example, once the fault has been detected by the on-board sensors, a system scheduler could discards the remaining flight plans, and schedules a set of emergency plans into the current flight schedule. These emergency plans are strictly time constrained, and their orchestration necessarily needs to lead to a schedule which can guarantee the safety of passengers.

III Definitions

Definition 1 (Plan of Tasks).

A plan of tasks Πk\Pi_{k} is a partial ordering of tasks JikJ^{k}_{i} to address a specific goal. Each plan Πk\Pi_{k} is characterized by a priority value αk\alpha_{k}. The structure of the plan is depicted by an activity-on-node (AON) network where the nodes and the arcs represent the tasks and the precedence relations respectively [6]. The precedence relations are described by the notation \prec. For example, given two plans Πk\Pi_{k} and Πj\Pi_{j}, ΠkΠj\Pi_{k}\prec\Pi_{j} indicates that the plan Πk\Pi_{k} must be scheduled before Πj\Pi_{j}.

A plan is defined by the following notation:

Πk=(J1k,,Jnkk)\Pi_{k}=(J^{k}_{1},...,J^{k}_{n_{k}})

where kk is an arbitrary index for the plan, nkn_{k} is the number of tasks in the plan Πk\Pi_{k} and JikJ^{k}_{i}, with 0ink0\leq i\leq n_{k} is the ii-th task of the plan Πk\Pi_{k}. The set of tasks is topologically sorted (see 3).

A plan Πk\Pi_{k} could not be scheduled if at least one task JikΠkJ^{k}_{i}\in\Pi_{k} could not be scheduled due to unsatisfied constraints.

A plan Πk\Pi_{k} is characterized by a set of resources k\mathcal{R}^{k}\subseteq\mathcal{R}.

Definition 2.

A graph G=(V,E)G=(V,E) consists of a set of vertices VV, and a set of edges EV×VE\subseteq V\times V. In a directed graph the edges are directed from one vertex to another. A directed acyclic graph (or DAG) is a directed graph with no directed cycles: a directed cycle is a path that starts from any vertex uu and ends in uu.

Definition 3 (Topological Sort).

A topological sort of a directed acyclic graph (DAG) G=(V,E)G=(V,E) is a linear ordering of all its vertices such that if the graph GG contains an edge (u,v)(u,v) then uu appears before vv in the ordering [7, 8]. If the graph contains a cycle, then no linear ordering is possible.

For example, in Figure 1 a directed acyclic graph is showed, for which a topological sorting can be found, since it has no cycles. Figure 2 shows a possible topological sorting for the graph in Figure 1, where the different colors depict the different frontiers in the corresponding DFS graph.

Definition 4 (Frontier).

A frontier ff for a graph G=(V,E)G=(V,E) is a set of nodes fVf\subseteq V such that the maximum distance between each node ufu\in f and the root node in the corresponding DFS graph is the same.

Refer to caption
Fig. 1: A Directed Acyclic Graph.
Refer to caption
Fig. 2: A possible topological sorting for the DAG in Figure 1.
Definition 5 (Task).

A task JikJ^{k}_{i} is an atomic operation that a subset of resources must execute. Each task JikJ^{k}_{i} belongs uniquely to one plan Πk\Pi_{k}. Tasks are characterized by the following elements:

  • a processing time pik0p^{k}_{i}\in\mathbb{N}_{0}, pik1p^{k}_{i}\geq 1;

  • a release date rikr^{k}_{i}\in\mathbb{N};

  • a due date dik0d^{k}_{i}\in\mathbb{N}_{0};

  • a time lag δijk\delta^{k}_{ij}\in\mathbb{N}, if JikJjkJ^{k}_{i}\prec J^{k}_{j};

  • a set of resources ik={ρ1,,ρn}\mathcal{R}^{k}_{i}=\{\rho_{1},...,\rho_{n}\}, ikk\mathcal{R}^{k}_{i}\subseteq\mathcal{R}^{k}, which the task JikJ^{k}_{i} is assigned to.

The tasks within a plan can be dependent by a precedence graph that provides the precedence constraints between the tasks. As for the plans, the precedence relations between tasks are described by the notation \prec. For example, given two tasks J1kJ_{1}^{k} and J2kJ_{2}^{k} belonging to the same plan Πk\Pi_{k}, J1kJ2kJ_{1}^{k}\prec J_{2}^{k} indicates that the task J1kJ_{1}^{k} precedes the execution of the task J2kJ_{2}^{k}.

Definition 6 (Time lag).

A time lag δijk\delta^{k}_{ij} is a fixed amount of time which separates the finishing and starting times of a pair of tasks JikJ^{k}_{i} and JjkJ^{k}_{j} respectively. By default, it is 00.

In this paper, we assume that there is no preemption in the task execution. Therefore, the execution of the tasks can not be interrupted once started. Moreover, we assume that each task could consume more than one resource during its execution.

Definition 7 (Resource).

A resource ρ\rho is any hardware or software tool that tasks can use to handle information. A resource ρ\rho has a limited availability value BρB_{\rho}. Resources are typically distinct in renewable and nonrenewable [6]: renewable resources have a fixed value of availability in each time period, while nonrenewable resources have a fixed value of availability along the entire project’s time horizon. In the addressed scheduling problem, we deal with renewable resources with a fixed availability value of Bρ=1,ρB_{\rho}=1,~\forall\rho\in\mathcal{R}, in each time period. In particular, resources with a fixed availability value of Bρ=1B_{\rho}=1 are also called unary or disjunctive resources.

Definition 8 (Resource availability).

The availability Bρ0B_{\rho}\in\mathbb{N}_{0} of a resource ρ\rho represents the maximum value of availability of the resource ρ\rho in each time period.

The abstract amount of usage of the resource ρ\rho by the task JikJ^{k}_{i}, in each time period, is represented by biρk={0,1}b^{k}_{i\rho}=\{0,1\}.

In this work we are concerned with solving the problem of scheduling plans of tasks by using a heuristic that maximizes the number of plans scheduled in a fixed time window, taking into account precedence, time, and resource constraints.

IV Problem statement

IV-A Constraints

IV-A1 Temporal constraints

When a plan Πk\Pi_{k} is scheduled, for each task JikΠkJ^{k}_{i}\in\Pi_{k} both the starting time siks^{k}_{i} and the completion time Cik=sik+pikC^{k}_{i}=s^{k}_{i}+p^{k}_{i} must be inside the temporal window [Ws,We][W_{s},W_{e}] and also inside the temporal window [rik,dik][r^{k}_{i},d^{k}_{i}], where

(rikWs)(dikWe),JikΠk.(r^{k}_{i}\geq W_{s})\wedge(d^{k}_{i}\leq W_{e}),~\forall J^{k}_{i}\in\Pi_{k}.

The value of siks^{k}_{i} for a task JikPikJ^{k}_{i}\in Pi_{k} is calculated as the maximum value between WsW_{s}, the release date rikr^{k}_{i} of the task JikJ^{k}_{i} augmented by the time lag δijk\delta^{k}_{ij}, and the maximum completion time CjkC^{k}_{j} for each predecessor JjkΠkJ^{k}_{j}\in\Pi_{k}. Formally,

sik=max(Ws,rik,maxjpredik(Cjk+δijk)),\begin{split}s^{k}_{i}=max(W_{s},r^{k}_{i},~max_{j\in pred^{k}_{i}}(C^{k}_{j}+\delta^{k}_{ij})),\end{split} (1)

where predikpred^{k}_{i} is the set of predecessors of the task JikJ^{k}_{i}.

Given a set 𝒫\mathcal{P} of plans, the plan Πk𝒫\Pi_{k}\in\mathcal{P} satisfies the temporal constraints if

sikJikΠk:(sikrik)(sik+pikdik).\exists s^{k}_{i}~\forall J^{k}_{i}\in\Pi_{k}:(s^{k}_{i}\geq r^{k}_{i})\wedge(s^{k}_{i}+p^{k}_{i}\leq d^{k}_{i}).

IV-A2 Precedence constraints

In order to maintain the precedence constraints between plans, a set 𝒫\mathcal{P} of plans to be scheduled is topologically ordered, since the precedence between plans can be represented as an acyclic directed graph (DAG), as showed in Figure 1. In our context, a graph GG is a tuple (V,E)(V,E) where VV is a set of vertices and vkVv_{k}\in V represents a plan Πk𝒫\Pi_{k}\in\mathcal{P}, and an arc (u,v)(u,v) represents a precedence constraint between the plans that are represented by nodes uu and vv respectively.

IV-A3 Resource constraints

The scheduling problem we address assumes that each task JikΠkJ^{k}_{i}\in\Pi_{k} which has a feasible starting time siks^{k}_{i}, can be executed by a subset ikk\mathcal{R}^{k}_{i}\subseteq\mathcal{R}^{k} of resources if in the time period [sik,Cik][s^{k}_{i},C^{k}_{i}] the utilization of each resource ρik\rho\in\mathcal{R}^{k}_{i} does not exceed its availability BρB_{\rho}.

IV-B Classification and mathematical formulation

A typical formal way to describe the scheduling problems is by using the three-field classification [α,β,γ][\alpha,\beta,\gamma] introduced by Graham et al. [9], where

  • α\alpha specifies the machine environment,

  • β\beta specifies the characteristics of the activities,

  • γ\gamma and describes the objective function(s).

An extension of the Graham’s classification has been proposed in order to provide a more accurate way to formally describe the scheduling problems [10]. According to the extended notation, the plans of tasks scheduling problem can be stated as

PS1,1,1|precΠ;precJ;[Ws,We];[rik,dik];δijk|maxkkαkxkPS1,1,1~|~prec_{\Pi};~prec_{J};~[W_{s},W_{e}];~[r^{k}_{i},d^{k}_{i}];~\delta^{k}_{ij}~|~\max_{k}\sum_{k}\alpha_{k}x_{k}

where PSm,1,1αPSm,1,1\in\alpha indicates a resource environment for a project scheduling problem with mm resources, a maximum availability of 11 unit per time for each resource, and a resource utilization, by each task, of at most 11 unit per time period. precΠ;precJ;[Ws,We];[rik,dik];δijkβprec_{\Pi};~prec_{J};~[W_{s},W_{e}];~[r^{k}_{i},d^{k}_{i}];~\delta^{k}_{ij}\in\beta depicts the characteristics of both plans and tasks: precΠprec_{\Pi} indicates a precedence constraints between plans; precJprec_{J} indicates a precedence constraints between tasks; [Ws,We][W_{s},W_{e}] and [rik,dik][r^{k}_{i},d^{k}_{i}] indicates, for each task JikΠkJ^{k}_{i}\in\Pi_{k}, the time constraints discussed in IV-A1; δijk\delta^{k}_{ij} indicates that each task JikJ^{k}_{i} can have a time lag between its starting time siks^{k}_{i} and the completion time CjkC^{k}_{j} of its predecessor.

The mathematical formulations for the RCPSP can be conveniently employed to model the objective function with respect to the temporal, precedence and resource constraints [11]. The proposed formulation is based on time discretization for describing the usage of the resources and the processing of the tasks over time. In our context the time horizon, divided into unitary time periods, is a fixed time window [Ws,We][W_{s},W_{e}], where the maximum number of plans has to be scheduled. Given a plan Πk𝒫\Pi_{k}\in\mathcal{P} and a task JikΠkJ^{k}_{i}\in\Pi_{k}, and a time instant t[rik,dik]t\in[r^{k}_{i},d^{k}_{i}], let yitky^{k}_{it} be a boolean variable that indicates whether the task JikJ^{k}_{i} starts exactly at time tt. Also, let xkx_{k} be a boolean variable that indicates whether a plan Πk𝒫\Pi_{k}\in\mathcal{P} is executed. Thus, a plan Πk𝒫\Pi_{k}\in\mathcal{P} is executed if

i=1nkt=rikdikyitk=nkxk=1,\sum_{i=1}^{n_{k}}\sum_{t=r^{k}_{i}}^{d^{k}_{i}}y^{k}_{it}=n_{k}~\Rightarrow~x_{k}=1,

where nkn_{k} is the number of tasks in Πk\Pi_{k}. If a task JikJ^{k}_{i} has a feasible starting time siks^{k}_{i} equals to tt, then yitk=1y^{k}_{it}=1 for a time instant t[rik,dik]t\in[r^{k}_{i},d^{k}_{i}]. Thus, if the sum

i=1nkt=rikdikyitk\sum_{i=1}^{n_{k}}\sum_{t=r^{k}_{i}}^{d^{k}_{i}}y^{k}_{it}

is equal to nkn_{k}, then Πk\Pi_{k} is executed. Therefore, the variable xkx_{k} is equal to 11. By using this notation, the objective function to maximize can be formulated as:

maxk=1Kkαkxk\displaystyle\max_{k}\sum_{k=1}^{K}\alpha_{k}x_{k}

such that,

i=1nkt=rikdikyitk=nkxk=1\displaystyle\sum_{i=1}^{n_{k}}\sum_{t=r^{k}_{i}}^{d^{k}_{i}}y^{k}_{it}=n_{k}\Rightarrow x_{k}=1 Πk𝒫\displaystyle\forall\Pi_{k}\in\mathcal{P} (2)
(t+δijkrik)\displaystyle(t+\delta^{k}_{ij}\geq r^{k}_{i})~\wedge
(t+δijk+pikdik)yitk=1\displaystyle(t+\delta^{k}_{ij}+p^{k}_{i}\leq d^{k}_{i})\Rightarrow y^{k}_{it}=1 t[Ws,We],\displaystyle\forall t\in[W_{s},W_{e}],
JikΠk\displaystyle\forall J^{k}_{i}\in\Pi_{k} (3)
tt(yitkyjtk)pik+δijk\displaystyle\sum_{t}t\cdot(y^{k}_{it}-y^{k}_{jt})\geq p^{k}_{i}+\delta^{k}_{ij} if JikJjk,\displaystyle\textnormal{if }J^{k}_{i}\prec J^{k}_{j},
Jik,JjkΠk,ij\displaystyle\forall J^{k}_{i},J^{k}_{j}\in\Pi_{k},i\neq j (4)
i=1nkbiρkτ=tt+pikyiτkBk\displaystyle\sum_{i=1}^{n_{k}}b^{k}_{i\rho}\cdot\sum_{\tau=t}^{t+p^{k}_{i}}y_{i\tau}^{k}\leq B_{k} ρ,t[Ws,We]\displaystyle\forall\rho\in\mathcal{R},~\forall t\in[W_{s},W_{e}] (5)

Constraint (2) imposes that for each plan Πk𝒫\Pi_{k}\in\mathcal{P} all the tasks JikΠkJ^{k}_{i}\in\Pi_{k} have a starting time assigned. Constraint (3) imposes that each task JikJ^{k}_{i} has a starting time and a completion time within the time window [rik,dik][r^{k}_{i},d^{k}_{i}]. Constraints (4) and (5) impose respectively the precedence and resource constraints.

V Proposed method

In this section is discussed a greedy heuristic for the problem of scheduling plans of tasks.

Definition 9 (Schedule).

A schedule SS is a vector (sik)(s^{k}_{i}), i=1,,nk,k=1,,Ki=1,...,n_{k},~k=1,...,K such that sikSs^{k}_{i}\in S is a starting time for the task JikJ^{k}_{i}. A schedule represents a solution for the scheduling problem if it satisfies the scheduling constraints.

Given a temporal window W=[Ws,We]W=[W_{s},W_{e}], the goal of the proposed heuristic is to create a feasible schedule that contains the maximum number of plans of tasks, inside the temporal window [Ws,We][W_{s},W_{e}], regarding their weight, such that each scheduled plan Πk\Pi_{k} satisfies the precedence, temporal and resource constraints discussed in IV. The set 𝒫\mathcal{P} of plans given as input to the algorithm is preventively sorted in order to maintain their precedence relations, and also to evaluate, at each iteration of the algorithm, the plan with the highest priority value. The feasibility of the plans is evaluated in a schedule SwS_{w} until no plans remains to schedule, or there is no plan that can be scheduled due to a violation of the constraints.

Each plan Πk𝒫\Pi_{k}\in\mathcal{P} could have precedence relations between its tasks. The topological sorting of the tasks ensures that the execution of the tasks is done with respect to the their precedence relations. Example 1 shows an example of feasible schedule where a precedence relation occurs between the tasks of a plan.

Example 1.

Figure 3 shows a Gantt diagram for a feasible schedule for a set of plans 𝒫={Π1,Π2}\mathcal{P}=\{\Pi_{1},\Pi_{2}\}, which parameters are listed in Table I. A precedence constraint occurs between the tasks J12J^{2}_{1} and J22J^{2}_{2}, both belonging to the plan Π2\Pi_{2}.

rikr^{k}_{i} dikd^{k}_{i} pikp^{k}_{i} δijk\delta^{k}_{ij} ik\mathcal{R}^{k}_{i} JikJjkJ^{k}_{i}\prec J^{k}_{j}
J11J^{1}_{1} 22 77 33 00 {1}\{1\}
J12J^{2}_{1} 33 88 22 00 {2}\{2\} J12J22J^{2}_{1}\prec J^{2}_{2}
J22J^{2}_{2} 44 99 22 00 {1}\{1\}
TABLE I: The parameters of the tasks of the plans Π1\Pi_{1} and Π2\Pi_{2} in the Example 1.
Refer to caption
Fig. 3: A feasible schedule for the set 𝒫\mathcal{P} of two plans. A precedence constraint occurs between J12J^{2}_{1} and J22J^{2}_{2}.

The task J22J^{2}_{2} has been scheduled after the end of the execution of the task J12J^{2}_{1}, since there is a precedence constraint between J12J^{2}_{1} and J22J^{2}_{2}. For this reason, the task J22J^{2}_{2} has not been scheduled at 55.

For a given DAG, more than one topological sort could exist. Under this assumption, different topological sorting for a plans’ precedence graph could lead to different schedules. For this reason, the plans belonging to the same frontier are sorted by their priority value, since for these plans the order in which they are scheduled is irrelevant according to the precedence constraints. Moreover, different plans may have the same priority value: in this case, the plans must be sorted according to a different criterion described in the following.

Given a feasible schedule SwS_{w} and a subset 𝒫αk𝒫\mathcal{P}_{\alpha_{k}}\subseteq\mathcal{P} of plans having the same priority value αk\alpha_{k}, in order to maximize the resource utilization for each tasks JikΠk𝒫αkJ^{k}_{i}\in\Pi_{k}\in\mathcal{P}_{\alpha_{k}} we calculate an idle time between each task JikΠkJ^{k}_{i}\in\Pi_{k} and its predecessor, in the same resource.

Definition 10 (Idle time).

Let SS be a feasible schedule containing two plans Πk\Pi_{k}, Πp\Pi_{p}, pkp\neq k. Let JikΠkJ^{k}_{i}\in\Pi_{k} and JjpΠpJ^{p}_{j}\in\Pi_{p} be two tasks scheduled on the same resource ρ\rho\in\mathcal{R}, where sik>Cjps^{k}_{i}>C^{p}_{j}. If there is at least one plan Πq\Pi_{q} schedulable in SS such that JlqΠq\exists J^{q}_{l}\in\Pi_{q} executed by the same resource ρ\rho\in\mathcal{R} such that

(Cjpslq<sik)(Cjp<Clqsik),(C^{p}_{j}\leq s^{q}_{l}<s^{k}_{i})\wedge(C^{p}_{j}<C^{q}_{l}\leq s^{k}_{i}),

the time window [Cjp,sik][C^{p}_{j},s^{k}_{i}] is said to be an idle time.

In Figure 4 is showed an idle time between two tasks.

Refer to caption
Fig. 4: The time window [Cjp,sik][C^{p}_{j},s^{k}_{i}] is an idle time because JlqΠqJ^{q}_{l}\in\Pi_{q} can be scheduled in this interval.

Let SS be a feasible schedule, and 𝒫αk\mathcal{P}_{\alpha_{k}} a set of plans having each one priority αk\alpha_{k}. The plans of 𝒫αk\mathcal{P}_{\alpha_{k}} are scheduled in order to minimize the presence of idle times. This is done by choosing iteratively the plans who minimize the following quantity:

isikCΓik(ρi),JikΠk𝒫αk\sum_{i}s^{k}_{i}-C_{\Gamma^{k}_{i}(\rho_{i})},~\forall J^{k}_{i}\in\Pi_{k}\in\mathcal{P}_{\alpha_{k}}

where CΓik(ρi)C_{\Gamma^{k}_{i}(\rho_{i})} is the completion time of the task Γik(ρi)\Gamma^{k}_{i}(\rho_{i}), that is, the predecessor of task JikJ^{k}_{i} in the same resource ρi\rho_{i} executing the task JikJ^{k}_{i}.

Example 2 shows how the idle time is used by the proposed heuristic to determine the order according to which two plans have to be scheduled.

Example 2.

Let 𝒫={Π1,Π2,Π3,Π4}\mathcal{P}=\{\Pi_{1},\Pi_{2},\Pi_{3},\Pi_{4}\} be a set of plans to schedule, which information are listed in Table II, and let SwS_{w} be a feasible schedule where Π1\Pi_{1} and Π2\Pi_{2} have been scheduled (Figure 5(a)). Let 𝒫l={Π3,Π4}\mathcal{P}_{l}=\{\Pi_{3},\Pi_{4}\} be a set of two plans such that Π3\Pi_{3} and Π4\Pi_{4} have priority values α3=l\alpha_{3}=l and α4=l\alpha_{4}=l respectively. As showed in Figure 5(b)-5(c), both plans Π3\Pi_{3} and Π4\Pi_{4} generate two feasible schedules.

rikr^{k}_{i} dikd^{k}_{i} pikp^{k}_{i} δijk\delta^{k}_{ij} ik\mathcal{R}^{k}_{i} JikJjkJ^{k}_{i}\prec J^{k}_{j}
J11J^{1}_{1} 22 77 33 00 {1}\{1\}
J12J^{2}_{1} 22 66 22 00 {2}\{2\}
J22J^{2}_{2} 44 1010 33 00 {1}\{1\}
J13J^{3}_{1} 44 77 22 00 {3}\{3\}
J14J^{4}_{1} 33 66 11 00 {4}\{4\} J14J24J^{4}_{1}\prec J^{4}_{2}
J24J^{4}_{2} 22 77 33 00 {2}\{2\}
TABLE II: The parameters of the tasks of a set 𝒫\mathcal{P} of 44 plans.

The difference between the starting time s13s^{3}_{1} and its predecessor (in this case WsW_{s} since there is no predecessor of J13J^{3}_{1}) is equal to 2. Within 𝒫l\mathcal{P}_{l}, the plan Π4\Pi_{4} has a task J14J^{4}_{1} that can be scheduled at s14=3<s13s^{4}_{1}=3<s^{3}_{1}, where all the constraints are satisfied, and both J14J^{4}_{1} and J13J^{3}_{1} demand the same resource. Moreover, scheduling the plan Π4\Pi_{4} before Π3\Pi_{3} leads to a schedule where no idle times are generated. Therefore, plan Π4\Pi_{4} is scheduled before plan Π3\Pi_{3}.

Refer to caption
(a)
Refer to caption
(b)
Refer to caption
(c)
Fig. 5: Scheduling plans with the same priority value into a schedule with two plans schedule (Figure 5(a)). Scheduling plan Π3\Pi_{3} before plan Π4\Pi_{4} (Figure 5(b)) leads to a schedule with an idle time of 2, since in the interval [2,4][2,4] the task J14J^{4}_{1} of the feasible plan Π4\Pi_{4} can be scheduled. Scheduling plan Π4\Pi_{4} before Π3\Pi_{3} (Figure 5(c)) leads to a schedule with an idle time of 0. Therefore, Π3\Pi_{3} is scheduled before Π4\Pi_{4}.

The scheduling algorithm operates in a similar way as the serial scheduling scheme proposed in [11]. In our context, we assume that each resource has a maximum availability of 1 in each time period. In this case, each resource can execute one task at a time. The idea of the proposed heuristic is to schedule all the plans as soon as possible by respecting the resource, precedence and temporal constraints. The insertion of the plans into a schedule is done by handling an event list \mathcal{EL}. An event is a 44-tuple (t(e),𝒮(e),𝒞(e),(bρ(e))ρ)(t(e),\mathcal{S}(e),\mathcal{C}(e),(b_{\rho}(e))_{\rho\in\mathcal{R}}):

  • t(e)t(e) denotes the time instant of the event;

  • 𝒮(e)\mathcal{S}(e) is the set of tasks starting exactly at time t(e)t(e);

  • 𝒞(e)\mathcal{C}(e) is the set of tasks completing exactly at time t(e)t(e);

  • bρ(e)b_{\rho}(e) represents the usage of resource ρ\rho during interval [t(e),t(nexte)[[t(e),t(next_{e})[, where nextenext_{e} is the first event following ee in \mathcal{EL}.

When a feasible task JikJ^{k}_{i} is scheduled and inserted into 𝒮(e)\mathcal{S}(e) for a an event ee\in\mathcal{EL}, the usage of the resource bρ(e)b_{\rho}(e) is set to 11. The resource constraints for the scheduling problem we address assumes that no task can be scheduled at t(e)t(e) if bρ(e)=1b_{\rho}(e)=1.

V-A Description of the heuristic

The proposed heuristic (Algorithm 1) (BuildScheduleBuildSchedule) takes in input a set 𝒫\mathcal{P} of plans and a set \mathcal{R} of resources, and it gives as output a feasible schedule SlS_{l}, that is, a vector of starting times siks^{k}_{i} for each scheduled task JikΠkJ^{k}_{i}\in\Pi_{k} such that the constraints discussed in the previous section are met.

At the beginning, the algorithm initializes the used data structures. At line 1 and  2 respectively, two set 𝒫s\mathcal{P}_{s} and 𝒫f\mathcal{P}_{f} are initialized: they will be used to store respectively the successfully scheduled plans and the discarded (unscheduled) plans. Then, two empty schedules SlS_{l} and SwS_{w} are initialized. They will contain respectively the last feasible schedule found and the current working schedule. The working schedule is a schedule used for testing the feasibility of the plans during the search. Finally, an event list \mathcal{EL} is initialized at line 5. The first step of the algorithm is to sort the set 𝒫\mathcal{P} of plans according to both precedence relations and priority values (line 6). This is done by Algorithm 2, that returns a sorted list 𝒫u\mathcal{P}_{u} of plans. Then, a loop over 𝒫u\mathcal{P}_{u} starts until there is a plan left to schedule (line 7). At line 8, the highest priority plan Πk\Pi_{k} is taken from the sorted set 𝒫u\mathcal{P}_{u} of plans. Then, at line 10 the algorithm checks if there exists more than one plan in 𝒫u\mathcal{P}_{u} with the same priority value αk\alpha_{k} of Πk\Pi_{k}. If the value of αk\alpha_{k} is unique among the values of priority of the plans in 𝒫u\mathcal{P}_{u}, the algorithm tries to schedule the plan (line 11), otherwise a set 𝒫αk𝒫\mathcal{P}_{\alpha_{k}}\subset\mathcal{P} of plans is calculated, containing all the plans that have priority value αk\alpha_{k}. All the plans in 𝒫αk\mathcal{P}_{\alpha_{k}} are then scheduled by Algorithm 5. Thus, the plans successfully scheduled are added into 𝒫s\mathcal{P}_{s} (line 20), and the plans not scheduled are removed from the working schedule (line 22). Finally, the last feasible schedule SlS_{l} is updated (line 24).

Algorithm 1 takes at most O(K3n3)O(K^{3}n^{3}) time, where K=|𝒫|K=|\mathcal{P}| is the number of plans to schedule.

All the data structures used for storing plans, 𝒫\mathcal{P}, 𝒫u\mathcal{P}_{u}, 𝒫s\mathcal{P}_{s} and 𝒫f\mathcal{P}_{f}, are implemented as self-balancing binary search trees to ensure insertion, removal and get operations in logarithmic time [7]. At line 5 the event list \mathcal{EL} is initialized. As the data structures used for storing plans, the event list is implemented as self-balancing binary search tree. At line 6 the plans are sorted by the Algorithm 2.

The while loop 7-26 iterates until the set of plans 𝒫u\mathcal{P}_{u} is not empty. In the worst case, if the plans belongs all to the same frontier, the inner loop takes at most O(K3n3)O(K^{3}n^{3}) time.

The GetGet operations at line 8 takes logarithmic time with respect to the number of elements in 𝒫u\mathcal{P}_{u}.

At line 9 the algorithm get the number of plans in 𝒫u\mathcal{P}_{u} that have priority value αk\alpha_{k}. We use an auxiliary data structure to store this information and get the value in O(1)O(1).

The AddAdd and RemoveRemove operations at line 13 and 15 respectively require both O(logK)O(\log K) time. Getting the plans with priority αk\alpha_{k} (line 18) requires constant time, since a hash map is used to store the plans with the same priority value: the key of a record is a value of priority αk\alpha_{k}, and the value is a list of plans having each one αk\alpha_{k} as priority value.

The AddAdd operation at line 20 requires O(KlogK)O(K\log K) time. The RemoveRemove operations at line 21 and 22 require both O(KlogK)O(K\log K) time.

Algorithm 1 BuildSchedule
0:  A set of plans 𝒫\mathcal{P}
0:  A feasible schedule SlS_{l}, a set 𝒫s\mathcal{P}_{s} of scheduled plans, a set 𝒫f\mathcal{P}_{f} of unscheduled plans
1:𝒫s{}\mathcal{P}_{s}\leftarrow\{\} {Scheduled plans}
2:𝒫f{}\mathcal{P}_{f}\leftarrow\{\} {Discarded plans}
3:Sl()S_{l}\leftarrow\left(\right) {Feasible schedule}
4:Sw()S_{w}\leftarrow\left(\right) {Working schedule}
5:{}\mathcal{EL}\leftarrow\{\}
6:𝒫u\mathcal{P}_{u}\leftarrow SortPlans(𝒫\mathcal{P})
7:while 𝒫u\mathcal{P}_{u}\neq\emptyset do
8:   Πk\Pi_{k}\leftarrow Get(𝒫u\mathcal{P}_{u})
9:   𝒩αk\mathcal{N}_{\alpha_{k}}\leftarrow number of plans in 𝒫u\mathcal{P}_{u} with priority αk\alpha_{k}
10:   if 𝒩αk=1\mathcal{N}_{\alpha_{k}}=1 then
11:    successsuccess\leftarrow SchedulePlan(Πk\Pi_{k}, SwS_{w}, \mathcal{EL})
12:    if successsuccess then
13:     Add(Πk\Pi_{k}, 𝒫s\mathcal{P}_{s})
14:    else
15:     Remove(Πk\Pi_{k}, SwS_{w})
16:    end if
17:   else
18:    𝒫αk\mathcal{P}_{\alpha_{k}}\leftarrow plans of 𝒫\mathcal{P} with priority αk\alpha_{k}
19:    𝒰\mathcal{U}\leftarrow SchedulePlanSet(𝒫αk\mathcal{P}_{\alpha_{k}}, SwS_{w}, \mathcal{EL})
20:    Add(𝒫αk𝒰\mathcal{P}_{\alpha_{k}}\setminus\mathcal{U}, 𝒫s\mathcal{P}_{s})
21:    Remove(𝒫αk\mathcal{P}_{\alpha_{k}}, 𝒫u\mathcal{P}_{u})
22:    Remove(𝒰\mathcal{U}, SwS_{w})
23:   end if
24:   SlSwS_{l}\leftarrow S_{w}
25:   𝒫f=𝒫𝒫s\mathcal{P}_{f}=\mathcal{P}\setminus\mathcal{P}_{s}
26:end while

Algorithm 2 (SortPlansSortPlans) sort a set 𝒫\mathcal{P} of plans in decreasing order of priority so that the precedence constraints between plans are also respected. At line 1 a topological sort algorithm is executed for the plan set. A set of couples (Πi,Fi)(\Pi_{i},F_{i}) is returned, where Πi\Pi_{i} is the ii-th plan in the topological sorting, and FiF_{i} is the subset of plans of the frontier fif_{i} which the plan Πi\Pi_{i} belongs to. Then, let FF be the set of subsets FiF_{i} of plans for each frontier fif_{i} (line 2), a loop over each set FiF_{i} is done (line 4-7), where each FiF_{i} is sorted according to the priority value the plans in the frontier fif_{i} (line 5), and then added to the set 𝒫u\mathcal{P}_{u} of sorted plans (line 6).

Algorithm 2 takes at most O(KlogK+nk)O(K\log K+n_{k}), where K=|𝒫|K=|\mathcal{P}| is the number of the plans to be sorted. At line 1, the set of plans is topologically sorted. The topological sort requires at most O(K+nk)O(K+n_{k}) where nkn_{k} is the number of predecessors in the precedence’s graph of the plan Πk\Pi_{k}.

At line 2 the set of frontiers discovered by the topological sort is assembled: this set is implemented as an hash table where the key of a record is a priority value αk\alpha_{k}, and the value is a list of plans having each one αk\alpha_{k} as priority value.

The loop 4-7 iterates over each frontier in the precedence’s graph, and sort the plans belonging to that frontier according to their priority value. At line 5, plans belonging to a specific frontier ff are sorted by using the timsort algorithm [12]. The for loop requires at most O(KlogK)O(K\log K) time if all the plans belong to the same frontier.

Algorithm 2 SortPlans
0:  A set of plans 𝒫\mathcal{P}
0:  A sorted set of plans 𝒫u\mathcal{P}_{u}
1:𝒫tTopologicalSort(𝒫)\mathcal{P}_{t}\leftarrow TopologicalSort(\mathcal{P})
2:  compute FiF_{i} for i=1,,fi=1,...,f
3:𝒫u=\mathcal{P}_{u}=\emptyset
4:for i=1,,fi=1,...,f do
5:   sort FiF_{i} according to α\alpha
6:   Add(Fi,𝒫u)Add(F_{i},\mathcal{P}_{u})
7:end for
8:return 𝒫u\mathcal{P}_{u}

Algorithm 3 (SchedulePlanSchedulePlan) schedules a single plan Πk\Pi_{k} into a schedule SwS_{w} using an event list \mathcal{EL}. It iterates over all the tasks JikΠkJ^{k}_{i}\in\Pi_{k} and for each task, the precedence constraints are checked, and then the task is scheduled into the schedule SwS_{w}. If at least one task could not be scheduled, the algorithm immediately breaks the loop, and false is returned, since the plan could not be scheduled such that all the constraints are satisfied.

Algorithm 3 takes O(n3)O(n^{3}) time, where n=knk,Πk𝒫n=\sum_{k}n_{k},\forall\Pi_{k}\in\mathcal{P} is the total number of tasks already scheduled in SwS_{w}. Inside the loop the Algorithm 4 is executed O(nk)O(n_{k}) time.

Algorithm 3 SchedulePlan
0:  A plan Πk\Pi_{k}, a schedule SwS_{w}, an event list \mathcal{EL}
0:truetrue if Πk\Pi_{k} has been scheduled in SwS_{w}, falsefalse otherwise.
1:for all task JikΠkJ^{k}_{i}\in\Pi_{k} do
2:   success \leftarrow scheduleTask(JikJ^{k}_{i}, SwS_{w}, \mathcal{EL})
3:   if not success then
4:    mark Πk\Pi_{k} as unschedulable
5:    return falsefalse
6:   end if
7:end for
8:return truetrue

Algorithm 4 (ScheduleTaskScheduleTask) do the actual task insertion into a schedule. It starts by calculating the earliest possible starting time given by (1) if we do not consider the resource availability. At line 2 the algorithm searches for an event ee in \mathcal{EL} such that t(e)=sikt(e)=s^{k}_{i}. If such event does not exist, a new event ee is created at t(e)=sikt(e)=s^{k}_{i}. At line 4, the algorithm starts a loop to search for the earliest feasible start and end events ee and ff for the task JikJ^{k}_{i}. The loop iterates until ff is not the last event or the remaining duration μ\mu, initially set to pikp^{k}_{i}, it is not null. If the condition of the while loop is satisfied, gg is assigned the event following ff (line 5), and the algorithm proceeds by checking the resource availability and the constraints test for JikJ^{k}_{i} in t(e)t(e) (line 6). If both the tests succeed, μ\mu is decreased by t(g)t(f)t(g)-t(f) and gg is assigned to ff. If the tests fail, then ee is not a valid insertion position, and then ee is set to gg while μ\mu is reset to pikp^{k}_{i}. After the loop, a final check for the constraints is done (line 13). If the final check fails, then all the tasks of the plan Πk\Pi_{k} are removed from each event ee in the event list \mathcal{EL} (line 14), the plan Πk\Pi_{k} is marked as unschedulable (line 15) and falsefalse is returned.

Once the constraints are verified for ee at line 13, the algorithm proceed with the insertion of the task JikJ^{k}_{i} into the working schedule (line 18), and into the event ee (line 19). Then, at line 21, the event ee is added into the event list \mathcal{EL} if it is not already in. The steps (23-31) update the event list. The last step consists in updating the resources usage by the scheduled tasks (line 32).

Algorithm 4 has a time complexity of O(n2)O(n^{2}), where n=knkn=\sum_{k}n_{k}. Searching for a feasible starting time siks^{k}_{i} (line 1) requires at most O(n1)O(n-1) time if task JikJ^{k}_{i} has n1n-1 predecessors. Searching for the event ee such that t(e)=sikt(e)=s^{k}_{i} (line 2) requires at most O(log||)O(\log|\mathcal{EL}|) since a balanced tree data structure is used for the event list.

In the worst case, for a set 𝒫\mathcal{P} of plans with cardinality |𝒫|=K|\mathcal{P}|=K, the maximum number of events in \mathcal{EL} is 2n2n if we suppose that all the tasks are scheduled consecutively with a minimal lag between each task, that is

|𝒮(e)|=1|𝒞(e)|=0|\mathcal{S}(e)|=1\wedge|\mathcal{C}(e)|=0~\vee
|𝒮(e)|=0|𝒞(e)|=1,e.|\mathcal{S}(e)|=0\wedge|\mathcal{C}(e)|=1,~\forall e\in\mathcal{EL}.

The while loop (lines 4-12) iterates over the event list \mathcal{EL}. Since there are less than 2n2n events, the while loop takes O(n)O(n) time.

Searching for the event following ff in \mathcal{EL} (line 5) takes at most O(log||)O(\log|\mathcal{EL}|) time. Checking if the temporal constraints are satisfied at t(e)t(e) (line 6) takes O(1)O(1) time. The remaining operations inside the loop require constant time.

Removing all the tasks JikΠkJ^{k}_{i}\in\Pi_{k} from each event ee\in\mathcal{EL} (line 14) takes O(nklog||)O(n_{k}\log|\mathcal{EL}|).

Adding the task JikJ^{k}_{i} to the schedule SwS_{w} (line 18) requires at most O(logn)O(\log n) since an efficient balanced tree data structure is used for the schedules. Adding the task JikJ^{k}_{i} to the set 𝒮e\mathcal{S}_{e} (line 19) requires constant time.

Adding the event ee to the event list \mathcal{EL} (line 21) requires O(log||)O(\log|\mathcal{EL}|) time.

The event list update takes O(log||)O(\log|\mathcal{EL}|) if the event gg has to be inserted in \mathcal{EL} (lines 26,29), otherwise the insertion of JikJ^{k}_{i} into 𝒞(f)\mathcal{C}(f) (line 24) requires O(1)O(1) time.

Algorithm 4 ScheduleTask
0:  A task JikJ^{k}_{i}, a schedule SwS_{w}, an event list \mathcal{EL}
0:truetrue if JikJ^{k}_{i} has been scheduled in SwS_{w}, falsefalse otherwise.
1:sik=max(Ws,rik,maxjpredik(Cjk+δijk))s^{k}_{i}=max(W_{s},r^{k}_{i},~max_{j\in pred^{k}_{i}}(C^{k}_{j}+\delta^{k}_{ij}))
2:ee\leftarrow GetEvent(siks^{k}_{i}, \mathcal{EL})
3:μpik;fe\mu\leftarrow p^{k}_{i};f\leftarrow e
4:while (ff is not the last event of OPEN)(μ>0)\mathcal{EL})\wedge(\mu>0) do
5:   gnextfg\leftarrow next_{f}
6:   if (bρ(f)=0,ρik)(b_{\rho}(f)=0,~\forall\rho\in\mathcal{R}^{k}_{i})\wedge((CheckConstraintsOPEN(t(e),Jik))(t(e),J^{k}_{i})) then
7:    μmax(0,μt(g)+t(f))\mu\leftarrow max(0,\mu-t(g)+t(f))
8:    fgf\leftarrow g
9:   else
10:    μpik\mu\leftarrow p^{k}_{i}; ege\leftarrow g; fgf\leftarrow g
11:   end if
12:end while
13:if not CheckConstraints(t(e),Jik)(t(e),J^{k}_{i}) then
14:   remove all tasks JikΠkJ^{k}_{i}\in\Pi_{k} from ee, e\forall e\in\mathcal{EL}
15:   mark Πk\Pi_{k} as unschedulable
16:   return false
17:end if
18:  Add(JikJ^{k}_{i}, SwS_{w})
19:  Add(JikJ^{k}_{i}, 𝒮\mathcal{S}(ee))
20:if ee\notin\mathcal{EL} then
21:   e\mathcal{EL}\leftarrow\mathcal{EL}\cup e
22:end if
23:if t(e)+pik=t(f)t(e)+p^{k}_{i}=t(f) then
24:   Add(JikJ^{k}_{i}, 𝒞\mathcal{C}(ff))
25:else if t(e)+pik>t(f)t(e)+p^{k}_{i}>t(f) then
26:   insert g=(t(e)+pik,,{t},(bρ(f))ρik)g=(t(e)+p^{k}_{i},\emptyset,\{t\},(b_{\rho}(f))_{\forall\rho\in\mathcal{R}^{k}_{i}}) in \mathcal{EL}
27:   fgf\leftarrow g
28:else
29:   insert g=(t(e)+pik,,{t},(bρ(predf))ρik)g=(t(e)+p^{k}_{i},\emptyset,\{t\},(b_{\rho}(pred_{f}))_{\forall\rho\in\mathcal{R}^{k}_{i}}) in \mathcal{EL}
30:   fgf\leftarrow g
31:end if
32:bρ(g)=1ρik,gb_{\rho}(g)=1~\forall\rho\in\mathcal{R}^{k}_{i},~\forall g between ee and predfpred_{f} in \mathcal{EL}
33:return true

Algorithm 5 (SchedulePlanSetSchedulePlanSet) schedules a set 𝒫αk\mathcal{P}_{\alpha_{k}} of plans such that each plan Πk𝒫αk\Pi_{k}\in\mathcal{P}_{\alpha_{k}} has a priority value αk\alpha_{k}. The idea of the algorithm is to find, at each iteration, the plan who minimizes the sum of the size of the idle time windows generated by its tasks. The algorithm starts by creating a copy VV of the plan set 𝒫αk\mathcal{P}_{\alpha_{k}} (line 1). The while loop (lines 3-25) iterates until there is no plan left in VV to schedule. At each iteration, two variables minIdleTimeminIdleTime and bestPlanbestPlan are used to keep the next candidate plan to schedule. The loop at (6-19) iterates over the plans in VV and searches for the candidate plan to schedule. Each plan Πk\Pi_{k} is scheduled into a temporary schedule StempS_{temp} (line 9). At each iteration, the algorithm chooses the plan Πk𝒫αk\Pi_{k}\in\mathcal{P}_{\alpha_{k}} that minimizes the sum of the time differences between t(e)t(e) and t(prede)t(pred_{e}) (line 11), for each event ee such that Jik𝒮(e)J^{k}_{i}\in\mathcal{S}(e), JikΠk\forall J^{k}_{i}\in\Pi_{k}.

Algorithm 5 takes at most O(K2n3)O(K^{2}n^{3}) time. The main loop (lines 3-25) is repeated until there is some plan left to schedule, and it is repeated at most O(K)O(K) time. The inner loop (lines 6-19) schedule each plan Πk𝒫αk\Pi_{k}\in\mathcal{P}_{\alpha_{k}} and keeps the plan which minimize the idle times between each task and its predecessor. The inner loop takes O(Kn3)O(Kn^{3}) time.

Algorithm 5 SchedulePlanSet
0:  A set 𝒫αk𝒫\mathcal{P}_{\alpha_{k}}\subset\mathcal{P} of plans, a schedule SwS_{w}, an event list \mathcal{EL}
0:  A set 𝒰\mathcal{U} of unscheduled plans
1:V𝒫αkV\leftarrow\mathcal{P}_{\alpha_{k}}
2:𝒰\mathcal{U}\leftarrow\emptyset
3:while VV\neq\emptyset do
4:   minIdleTime+minIdleTime\leftarrow+\infty
5:   bestPlanbestPlan\leftarrow\emptyset
6:   for all Πk𝒫αk\Pi_{k}\in\mathcal{P}_{\alpha_{k}} do
7:    StempSwS_{temp}\leftarrow S_{w}
8:    temp\mathcal{EL}_{temp}\leftarrow\mathcal{EL}
9:    successschedulePlan(Πk,Stemp,temp)success\leftarrow schedulePlan(\Pi_{k},S_{temp},\mathcal{EL}_{temp})
10:    if successsuccess then
11:     it=i(t(e)t(prede)),Jik𝒮(e)it=\sum_{i}(t(e)-t(pred_{e})),\forall J^{k}_{i}\in\mathcal{S}(e)
12:     if itminIdleTimeit\leq minIdleTime then
13:      minIdleTimeitminIdleTime\leftarrow it
14:      bestPlanΠkbestPlan\leftarrow\Pi_{k}
15:     end if
16:    else
17:     Remove(Πk,V)Remove(\Pi_{k},V)
18:    end if
19:   end for
20:   successschedulePlan(bestPlan,Sw,)success\leftarrow schedulePlan(bestPlan,S_{w},\mathcal{EL})
21:   if not successsuccess then
22:    Add(bestPlan,𝒰)Add(bestPlan,\mathcal{U})
23:   end if
24:   Remove(bestPlan,V)Remove(bestPlan,V)
25:end while
26:return 𝒰\mathcal{U}

Algorithm 6 (CheckConstraintsCheckConstraints) checks if a starting time t(e)t(e) satisfies the temporal constraints, discussed in IV-A1, for a task JikJ^{k}_{i}. If the temporal constraints are satisfied, the algorithm returns true.

Algorithm 6 requires constant time.

Algorithm 6 CheckConstraints
0:  A task JikJ^{k}_{i}, a starting time t(e)t(e) for JikJ^{k}_{i}
0:truetrue if JikJ^{k}_{i} satisfies the temporal constraints, falsefalse otherwise.
1:if (t(e)[rik,dik])(t(e)[Ws,We])(t(e)+pik[Ws,We])\left(t(e)\in[r^{k}_{i},d^{k}_{i}]\right)\wedge\left(t(e)\in[W_{s},W_{e}]\right)\wedge\left(t(e)+p^{k}_{i}\in[W_{s},W_{e}]\right) then
2:   return true
3:end if
4:return false

In Table III are resumed the functions employed by the proposed method, together with a short description and their time complexity.

Function name and description Time complexity
BuildSchedule(𝒫)BuildSchedule(\mathcal{P})
Entry point algorithm. It is responsible
for assembling a feasible schedule for a set 𝒫\mathcal{P} of plans. O(K3n3)O(K^{3}n^{3})
SchedulePlan(Πk,Sw,)SchedulePlan(\Pi_{k},S_{w},\mathcal{EL})
Schedule the plan Πk\Pi_{k} into the schedule SwS_{w}. O(n3)O(n^{3})
SchedulePlanSet(𝒫αk,Sw,)SchedulePlanSet(\mathcal{P}_{\alpha_{k}},S_{w},\mathcal{EL})
Schedule a set of plans 𝒫αk\mathcal{P}_{\alpha_{k}} that have the same priority value into the schedule SwS_{w}. O(K2n3)O(K^{2}n^{3})
ScheduleTask(Jik,Sw,)ScheduleTask(J^{k}_{i},S_{w},\mathcal{EL})
Schedule the task JikJ^{k}_{i} into the schedule SwS_{w}. O(n2)O(n^{2})
SortPlans(𝒫)SortPlans(\mathcal{P})
Sort a set of plans 𝒫\mathcal{P} according to their precedence relations by using TopologicalSortTopologicalSort algorithm. Then, the plans that belong to the same frontier in the topological sorting are sorted by their priority value. O(KlogK+nk)O(K\log K+n_{k})
TopologicalSort(𝒫)TopologicalSort(\mathcal{P})
Sort a set of plans 𝒫\mathcal{P} according to their precedence relations by using a topological sorting algorithm. It returns a sorted copy of the plan set given as input. O(K+nk)O(K+n_{k})
GetEvent(sik,)GetEvent(s^{k}_{i},\mathcal{EL})
Get the event ee\in\mathcal{EL} such that t(e)=sikt(e)=s^{k}_{i}. If such event does not exists, a new event ee is created at t(e)=sikt(e)=s^{k}_{i}. O(log||)O(\log|\mathcal{EL}|)
Get(𝒫)Get(\mathcal{P}) Get the highest priority plan from 𝒫\mathcal{P}. O(logK)O(\log K)
TABLE III: Descriptions of the functions used by the scheduling algorithm.
Example 3.

In this example we show how different plans are scheduled according to the proposed heuristic. We start from a feasible schedule containing two plans Π1\Pi_{1} and Π2\Pi_{2}, and we try to schedule in order the plans Π3\Pi_{3}, Π4\Pi_{4} and Π5\Pi_{5}. In Table IV are listed the parameters of the plans of tasks 𝒫={Π1,Π2,Π3,Π4,Π5}\mathcal{P}=\{\Pi_{1},\Pi_{2},\Pi_{3},\Pi_{4},\Pi_{5}\}.

rikr^{k}_{i} dikd^{k}_{i} pikp^{k}_{i} δijk\delta^{k}_{ij} ik\mathcal{R}^{k}_{i} JikJjkJ^{k}_{i}\prec J^{k}_{j}
J11J^{1}_{1} 11 77 44 00 {1}\{1\} J11J21J^{1}_{1}\prec J^{1}_{2}
J21J^{1}_{2} 55 88 22 11 {3}\{3\}
J12J^{2}_{1} 44 77 22 00 {2}\{2\} J12J22J^{2}_{1}\prec J^{2}_{2}
J22J^{2}_{2} 55 99 33 00 {1}\{1\}
J13J^{3}_{1} 11 88 33 00 {3}\{3\}
J14J^{4}_{1} 22 77 22 00 {2}\{2\} J14J24J^{4}_{1}\prec J^{4}_{2}
J24J^{4}_{2} 33 77 11 22 {3}\{3\}
J15J^{5}_{1} 55 1010 33 00 {2}\{2\} J15J25J^{5}_{1}\prec J^{5}_{2}
J25J^{5}_{2} 55 1111 11 00 {1,3}\{1,3\}
TABLE IV: The parameters of the tasks of the plans in Example 3.

Let Π3\Pi_{3} be the next plan to be scheduled, which has only one task J13J^{3}_{1}. The earliest starting time s13s^{3}_{1} is set to the release time r13=1r^{3}_{1}=1. The event e1e_{1}\in\mathcal{EL} has a time instant t(e)=r13=1t(e)=r^{3}_{1}=1, thus e1e_{1} is the first event in which J13J^{3}_{1} can be scheduled. The resource constraints in e1e_{1} are satisfied for J13J^{3}_{1}, so it can be scheduled at t(e1)=2t(e_{1})=2. The resource usages b3(e1)b_{3}(e_{1}) and b3(e2)b_{3}(e_{2}) are finally updated.

Table V shows the resulting Gantt diagram and the event list \mathcal{EL} after the insertion of the plan Π3\Pi_{3}.

ee t(e)t(e) 𝒮(e)\mathcal{S}(e) 𝒞(e)\mathcal{C}(e) b1(e)b_{1}(e) b2(e)b_{2}(e) b3(e)b_{3}(e)
e1e1 22 {J11,𝑱𝟏𝟑}\{J^{1}_{1},\bm{{\color[rgb]{1,0,0}J^{3}_{1}}}\} \emptyset 11 00 11
e2e2 44 {J12}\{J^{2}_{1}\} \emptyset 11 11 11
e3e3 55 \emptyset {𝑱𝟏𝟑}\{\bm{{\color[rgb]{1,0,0}J^{3}_{1}}}\} 11 11 00
e4e4 66 {J22}\{J^{2}_{2}\} {J12,J11}\{J^{2}_{1},J^{1}_{1}\} 11 00 00
e5e5 77 {J21}\{J^{1}_{2}\} \emptyset 11 00 11
e6e6 99 \emptyset {J21,J22}\{J^{1}_{2},J^{2}_{2}\} 00 00 00
[Uncaptioned image]
TABLE V: Insertion of the plan Π3\Pi_{3} into a feasible schedule.

Following, plan Π4\Pi_{4} is the next plan to be scheduled. The earliest starting time s14s^{4}_{1} for J14J^{4}_{1} is s14=t(e1)=Wss^{4}_{1}=t(e_{1})=W_{s}. At e1e_{1} the temporal and resource constraints for J14J^{4}_{1} are satisfied, so it is scheduled at s14=t(e1)=2s^{4}_{1}=t(e_{1})=2, and then the resource usages b2(e1)b_{2}(e_{1}) is updated. Following, an insertion point is searched for the task J24J^{4}_{2}. The earliest starting time for J24J^{4}_{2} is s24=t(e4)=6s^{4}_{2}=t(e_{4})=6, since there is a time lag between J24J^{4}_{2} and its predecessor J14J^{4}_{1}. The event e4e_{4} is a good insertion point for the task J24J^{4}_{2}, since here the precedence, resource and temporal constraints are met. J24J^{4}_{2} is finally scheduled at s24=t(e4)=6s^{4}_{2}=t(e_{4})=6. The resource usage b3(e4)b_{3}(e_{4}) is updated. Since a feasible insertion point has been found for both J14J^{4}_{1} and J24J^{4}_{2}, the plan Π4\Pi_{4} is scheduled correctly and the schedule generated is considered as feasible schedule.

Table VI shows the resulting Gantt diagram and the event list \mathcal{EL} after the insertion of the plan Π4\Pi_{4}.

ee t(e)t(e) 𝒮(e)\mathcal{S}(e) 𝒞(e)\mathcal{C}(e) b1(e)b_{1}(e) b2(e)b_{2}(e) b3(e)b_{3}(e)
e1e1 22 {J11,J13,𝑱𝟏𝟒}\{J^{1}_{1},J^{3}_{1},\bm{{\color[rgb]{1,0,0}J^{4}_{1}}}\} \emptyset 11 11 11
e2e2 44 {J12}\{J^{2}_{1}\} {𝑱𝟏𝟒}\{\bm{{\color[rgb]{1,0,0}J^{4}_{1}}}\} 11 11 11
e3e3 55 \emptyset {J13}\{J^{3}_{1}\} 11 11 00
e4e4 66 {𝑱𝟐𝟒,J22}\{\bm{{\color[rgb]{1,0,0}J^{4}_{2}}},J^{2}_{2}\} {J12,J11}\{J^{2}_{1},J^{1}_{1}\} 11 00 11
e5e5 77 {J21}\{J^{1}_{2}\} {𝑱𝟐𝟒}\{\bm{{\color[rgb]{1,0,0}J^{4}_{2}}}\} 11 00 11
e6e6 99 \emptyset {J21,J22}\{J^{1}_{2},J^{2}_{2}\} 00 00 00
[Uncaptioned image]
TABLE VI: Insertion of the plan Π4\Pi_{4} into a feasible schedule.

Finally, plan Π5\Pi_{5} is the last plan to be scheduled. The earliest starting time for J15J^{5}_{1} is s15=5s^{5}_{1}=5. At t(e3)=5t(e_{3})=5 the temporal and resource constraints for J15J^{5}_{1} are not satisfied (b2(e3)=1b_{2}(e_{3})=1). The next event e4e_{4} is a good insertion point for the task J15J^{5}_{1}, since here the resource constraint and also the temporal constraints are met. The task J15J^{5}_{1} is finally scheduled at s15=t(e4)s^{5}_{1}=t(e_{4}). Following, an insertion point is searched for the task J25J^{5}_{2}, which consumes both the resources 11 and 33. The earliest starting time for J25J^{5}_{2} is s25=5s^{5}_{2}=5. The resources constraints are not satisfied in the events e3e_{3}, e4e_{4} and e5e_{5}. The event e6e_{6} is the first feasible insertion point for the task J25J^{5}_{2}, since at t(e6)t(e_{6}) the precedence and temporal constraints are met. Also, in e6e_{6} both resources 11 and 33 are available (b1(e6)=0b_{1}(e_{6})=0 and b3(e6)=0b_{3}(e_{6})=0). The task J25J^{5}_{2} is finally scheduled at s25=t(e6)s^{5}_{2}=t(e_{6}), and the usages of resources 11 and 33, respectively b1(e6)b_{1}(e_{6}) and b3(e6)b_{3}(e_{6}), are updated. Since a feasible insertion point has been found for both J15J^{5}_{1} and J25J^{5}_{2}, the plan Π5\Pi_{5} is scheduled correctly and the schedule generated is considered as feasible schedule.

Table VII shows the resulting Gantt diagram and the event list \mathcal{EL} after the insertion of the plan Π5\Pi_{5}.

ee t(e)t(e) 𝒮(e)\mathcal{S}(e) 𝒞(e)\mathcal{C}(e) b1(e)b_{1}(e) b2(e)b_{2}(e) b3(e)b_{3}(e)
e1e1 22 {J11,J13,J14}\{J^{1}_{1},J^{3}_{1},J^{4}_{1}\} \emptyset 11 11 11
e2e2 44 {J12}\{J^{2}_{1}\} {J14}\{J^{4}_{1}\} 11 11 11
e3e3 55 \emptyset {J13}\{J^{3}_{1}\} 11 11 00
e4e4 66 {J24,J22,𝑱𝟏𝟓}\{J^{4}_{2},J^{2}_{2},\bm{{\color[rgb]{1,0,0}J^{5}_{1}}}\} {J12,J11}\{J^{2}_{1},J^{1}_{1}\} 11 11 11
e5e5 77 {J21}\{J^{1}_{2}\} {J24}\{J^{4}_{2}\} 11 11 11
e6e6 99 {𝑱𝟐𝟓}\{\bm{{\color[rgb]{1,0,0}J^{5}_{2}}}\} {J21,J22,𝑱𝟏𝟓}\{J^{1}_{2},J^{2}_{2},\bm{{\color[rgb]{1,0,0}J^{5}_{1}}}\} 11 00 11
e7e7 1010 \emptyset {𝑱𝟐𝟓}\{\bm{{\color[rgb]{1,0,0}J^{5}_{2}}}\} 00 00 00
[Uncaptioned image]
TABLE VII: Insertion of the plan Π5\Pi_{5} into a feasible schedule.

VI Computational results

In this section we present the computational results for the proposed heuristic. All the experiments were run on an entry-level machine (Intel i5-4210U, 6GB RAM, Linux OS). The algorithms were entirely written in Java (version 88).

We run different experiments of our algorithm by using a benchmark that depicts a realist scenario of a mission carried out by a Remote Piloted Air Vehicle (RPAS), which set of plans, listed in Table VIII, has to be scheduled. The validity of the mission is constrained between 00 and 180180 seconds. Therefore, the time window [Ws,We][W_{s},W_{e}] is fixed to [0,180][0,180].

Πk\Pi_{k} nkn_{k} αk\alpha_{k} k\mathcal{R}^{k} [rk,dk][r^{k},d^{k}] p1kp^{k}_{1} p2kp^{k}_{2} p3kp^{k}_{3} p4kp^{k}_{4} δijk\delta^{k}_{ij} ΠkΠj\Pi_{k}\prec\Pi_{j} JikJjkJ^{k}_{i}\prec J^{k}_{j}
Π1\Pi_{1} 22 33 {1,2}\{1,2\} [0,180][0,180] 33 33 J11J21J^{1}_{1}\prec J^{1}_{2}
Π2\Pi_{2} 22 33 {3,4}\{3,4\} [0,180][0,180] 44 44
Π3\Pi_{3} 11 33 {5}\{5\} [0,180][0,180] 33
Π4\Pi_{4} 11 33 {6}\{6\} [0,180][0,180] 33
Π5\Pi_{5} 11 33 {7}\{7\} [0,180][0,180] 11
Π6\Pi_{6} 11 33 {8}\{8\} [0,180][0,180] 11
Π7\Pi_{7} 44 11 {5,9,10,11}\{5,9,10,11\} [80,160][80,160] 2020 2020 2020 2020 J37J47J^{7}_{3}\prec J^{7}_{4}
Π8\Pi_{8} 44 11 {5,9,10,11}\{5,9,10,11\} [40,120][40,120] 2020 2020 2020 2020 J38J48J^{8}_{3}\prec J^{8}_{4}
Π9\Pi_{9} 44 11 {5,9,10,11}\{5,9,10,11\} [40,120][40,120] 2020 2020 2020 2020 J39J49J^{9}_{3}\prec J^{9}_{4}
Π10\Pi_{10} 33 55 {1,2,10}\{1,2,10\} [50,80][50,80] 55 55 55 J110J210J^{10}_{1}\prec J^{10}_{2}
Π11\Pi_{11} 44 55 {5,9,10,11}\{5,9,10,11\} [80,120][80,120] 2020 2020 2020 2020 Π10Π11\Pi_{10}\prec\Pi_{11} J311J411J^{11}_{3}\prec J^{11}_{4}
Π12\Pi_{12} 44 11 {5,9,10,11}\{5,9,10,11\} [0,80][0,80] 2020 2020 2020 2020 J312J412J^{12}_{3}\prec J^{12}_{4}
Π13\Pi_{13} 33 55 {1,2,10}\{1,2,10\} [0,40][0,40] 55 55 55 J113J213J^{13}_{1}\prec J^{13}_{2}
Π14\Pi_{14} 44 55 {5,9,10,11}\{5,9,10,11\} [40,80][40,80] 2020 2020 2020 2020 Π13Π14\Pi_{13}\prec\Pi_{14} J314J414J^{14}_{3}\prec J^{14}_{4}
Π15\Pi_{15} 33 66 {1,2,10}\{1,2,10\} [0,20][0,20] 55 55 55 J115J215J^{15}_{1}\prec J^{15}_{2}
Π16\Pi_{16} 44 66 {5,9,10,11}\{5,9,10,11\} [20,80][20,80] 2020 2020 2020 2020 Π15Π16\Pi_{15}\prec\Pi_{16} J316J416J^{16}_{3}\prec J^{16}_{4}
Π17\Pi_{17} 22 88 {3,4}\{3,4\} [60,120][60,120] 22 22 J117J217J^{17}_{1}\prec J^{17}_{2}
Π18\Pi_{18} 22 88 {3,4}\{3,4\} [60,120][60,120] 22 22 J118J218J^{18}_{1}\prec J^{18}_{2}
Π19\Pi_{19} 22 88 {3,4}\{3,4\} [60,120][60,120] 22 22 J119J219J^{19}_{1}\prec J^{19}_{2}
Π20\Pi_{20} 33 66 {1,2,10}\{1,2,10\} [0,20][0,20] 55 55 55 J120J220J^{20}_{1}\prec J^{20}_{2}
Π21\Pi_{21} 44 66 {6,9,10,11}\{6,9,10,11\} [20,60][20,60] 2020 2020 2020 2020 Π20Π21\Pi_{20}\prec\Pi_{21} J321J421J^{21}_{3}\prec J^{21}_{4}
Π22\Pi_{22} 22 66 {14,10}\{14,10\} [30,70][30,70] 22 22
Π23\Pi_{23} 44 11 {6,9,10,11}\{6,9,10,11\} [40,90][40,90] 2020 2020 2020 2020 J323J423J^{23}_{3}\prec J^{23}_{4}
Π24\Pi_{24} 44 11 {6,9,10,11}\{6,9,10,11\} [80,150][80,150] 2020 2020 2020 2020 J324J424J^{24}_{3}\prec J^{24}_{4}
Π25\Pi_{25} 44 11 {6,9,10,11}\{6,9,10,11\} [80,130][80,130] 2020 2020 2020 2020 J325J425J^{25}_{3}\prec J^{25}_{4}
Π26\Pi_{26} 44 11 {6,9,10,11}\{6,9,10,11\} [130,160][130,160] 2020 2020 2020 2020 J326J426J^{26}_{3}\prec J^{26}_{4}
Π27\Pi_{27} 22 44 {14,10}\{14,10\} [0,180][0,180] 22 22
Π28\Pi_{28} 33 66 {1,2,10}\{1,2,10\} [80,120][80,120] 55 55 55 J128J228J^{28}_{1}\prec J^{28}_{2}
Π29\Pi_{29} 22 66 {3,4}\{3,4\} [120,140][120,140] 22 22 Π28Π29\Pi_{28}\prec\Pi_{29} J129J229J^{29}_{1}\prec J^{29}_{2}
Π30\Pi_{30} 22 66 {14,10}\{14,10\} [120,140][120,140] 22 22
Π31\Pi_{31} 44 11 {6,9,10,11}\{6,9,10,11\} [150,190][150,190] 2020 2020 2020 2020 J331J431J^{31}_{3}\prec J^{31}_{4}
Π32\Pi_{32} 22 44 {3,4}\{3,4\} [120,140][120,140] 22 22 J132J232J^{32}_{1}\prec J^{32}_{2}
TABLE VIII: The benchmark used for evaluating the performance of the proposed method.

We first evaluated the proposed heuristic on the benchmark listed in Table VIII. Then, we evaluated the performance of the proposed heuristic on different benchmarks obtained by modifying the set of plans listed in Table VIII. These modified benchmarks are opportunely set up in such a way that the constraints are more or less relaxed. Thus, we studied eight different scenarios, which results are listed in Table IX. Following are listed the differences between each scenario:

  • Scenario 1: set of plans listed in Table VIII;

  • Scenario 2: in this scenario all the plans have the same temporal window [rk,dk][r^{k},d^{k}] fixed to [0,180][0,180], and the plans are all tied by precedence relations, so that i,j,j>i,ΠiΠj\forall i,j,j>i,\Pi_{i}\prec\Pi_{j};

  • Scenario 3: in this scenario we modified the release time of each plan in such way to have the maximum number of events;

  • Scenario 4: in this scenario we duplicated all the plans with priority 66 and 88;

  • Scenario 5: in this scenario we duplicated all the plans with priority 11 and 33;

  • Scenario 6: in this scenario we used the same benchmark as the scenario 1, but we used a time window [Ws,We][W_{s},W_{e}] fixed to [0,90][0,90];

  • Scenario 7: in this scenario we used the same benchmark as the scenario 1, but we used a time window [Ws,We][W_{s},W_{e}] fixed to [0,270][0,270];

  • Scenario 8: in this scenario we used the same benchmark as the scenario 1, but each plan has a duplicate.

Table IX presents the execution times for each scenario. Each execution time is calculated as the mean of the execution times of ten runs of the algorithm on the same benchmark.

K=|𝒫|K=|\mathcal{P}| KnkKn_{k} |𝒫s||\mathcal{P}_{s}| |𝒫s|nk|\mathcal{P}_{s}|n_{k} Time (in ms)
Scenario 1 3232 9191 2424 5656 183\sim 183
Scenario 2 3232 9191 2424 6767 183\sim 183
Scenario 3 3232 9191 2424 6464 219\sim 219
Scenario 4 4242 118118 3030 6868 316\sim 316
Scenario 5 4747 135135 2929 6464 345\sim 345
Scenario 6 3232 9191 1616 3535 197\sim 197
Scenario 7 3232 9191 2424 6060 228\sim 228
Scenario 8 6464 182182 3737 8181 538\sim 538
TABLE IX: Execution times of the eight scenarios.

The obtained computational results of the algorithm gave us a first proof of concept concerning the complexity of the scheduling problem we address. Moreover, the results are yet satisfactory in the context of scheduling plans for RPAS. As the problem of scheduling plans of tasks is difficult due to its tight constraints, we conclude that the quality of the schedules provided by the proposed heuristic is good with respect to the complexity of the evaluated benchmarks.

VII Future works

VII-A Variable resource availability

The proposed heuristic considers only resources with a fixed availability of Bρ=1,ρB_{\rho}=1,~\forall\rho\in\mathcal{R}. A generalization of the algorithm could take into account resources with variable availability values, so that one resource could be used by different tasks at the same time. Augmenting the resource availability could also lead to better schedules in terms of number of plans scheduled into a fixed time window, as showed in Example 4.

Example 4.

Let 𝒫={Π1,Π2}\mathcal{P}=\{\Pi_{1},\Pi_{2}\} be a set of two plans Π1\Pi_{1} and Π2\Pi_{2} which have each one task, respectively J11J^{1}_{1} (r11=1r^{1}_{1}=1, d11=6d^{1}_{1}=6, p11=3p^{1}_{1}=3) and J12J^{2}_{1} (r12=4r^{2}_{1}=4, d12=10d^{2}_{1}=10, p12=4p^{2}_{1}=4). In Figure 6 are showed two possible schedules for the task J12J^{2}_{1}. If the resource 11 has a maximum availability B1=1B_{1}=1 (Figure 6(a)), the earliest starting time for the task J12J^{2}_{1} would be 66, because otherwise the usage of resource would exceed its availability. Instead, if the availability of the resource is 22 (Figure 6(b)), the earliest starting time would be set to 44 (that is, the release time of the task), and so the use of the resource is maximized. Also, in the schedule showed in Figure 6(b) the time interval [5,8][5,8] can be employed for scheduling other tasks, whereas this is not possible in the schedule in Figure 6(a).

Refer to caption
(a)
Refer to caption
(b)
Fig. 6: Scheduling of task J12J^{2}_{1}, which has a release time of 44, into a resource with availability B1=1B_{1}=1 (6(a)) and a resource with availability B1=2B_{1}=2 (6(b)).

VII-B pikp^{k}_{i} as function of time

The value of the processing time pikp^{k}_{i} for a task JikJ^{k}_{i} could be modeled as a function of time pik(t)p^{k}_{i}(t) in such a way that the processing time of a task JikJ^{k}_{i} can vary according to the time instant in which it is scheduled. To motivate this extension, we present in Example 5 a case study of a RPAS that has to accomplish some in-flight operation.

Example 5.

Let us consider a RPAS that has to accomplish a mission where it has to follow a straight trajectory and collect data from an object RR located in the terrain during a fixed time range, as depicted in Figure 7. During the the time range in which the RPAS is within the object’s range it has to send information to the object RR in the terrain. The operation of sending information could require more time when the RPAS is far from the object, but less time when it is near the object. Thus, the processing time function related to the operation of sending information could be modeled as an inverse Gaussian function, as showed in Figure 8, where dmaxd_{max} and dmind_{min} are respectively the maximum and the minimum distance between the RPAS and the object RR.

Fig. 7: An example of RPAS that has to communicate informations to an object RR. The processing time of the tasks communicating with RR could vary according to the distance between the object RR and the RPAS with respect to the time instant tt.
Fig. 8: An inverse Gaussian used to model the processing time p(t)p(t) of the the operation of sending information to a fixed object for the RPAS in Figure 7.

VII-C Alternative schedules

The proposed heuristic works in an incremental fashion, adding plans in order to a working schedule SwS_{w} and keeping a set 𝒫s\mathcal{P}_{s} of successfully scheduled plans, as well as a set 𝒫f\mathcal{P}_{f} of unscheduled plans. The incremental process of construction of a feasible schedule can be represented as an directed acyclic graph, as shown in the example graph in Figure 9. According to this representation, each vertex represents a feasible schedule, while a directed arc (i,j)(i,j), which has label Πk\Pi_{k}, represents the insertion of the plan Πk\Pi_{k} into the schedule SiS_{i}, that leads to a new feasible schedule SjS_{j}.

Refer to caption
Fig. 9: The graph representation of a feasible schedule with four plans (in blue), and two possible alternative schedule (yellow and green).

The incremental manner of constructing the schedules has the advantage of being able to return a feasible schedule at each iteration of the algorithm.

Since the proposed method builds only a graph with no branches (no alternative schedule paths), a possible extension could consider different metrics to build alternative paths in the graph of solutions. For example, as the proposed heuristic returns a set 𝒫f\mathcal{P}_{f} of plans unscheduled due to constraints violations, one possible extension could increase the priority values of the unscheduled plans in 𝒫f\mathcal{P}_{f} while lowering those of a subset of feasible plans in 𝒫s\mathcal{P}_{s}. In this manner, alternative paths in the solution graph could be found. Also, these alternative paths could maximize further the objective function, thus allowing the heuristic method to escape from the local optima.

VIII Conclusions

This article presented a heuristic algorithm for the problem of scheduling plans of tasks. The algorithm may be employed in realistic scenarios where the classical scheduling technique can not be used due to the considered constraints.

References

  • [1] M. L. Pinedo, Scheduling. Springer US, 2012. DOI: 10.1007/978-1-4614-2361-4.
  • [2] R. Klein, Scheduling of Resource-Constrained Projects, vol. 10 of Operations Research/Computer Science Interfaces Series. Boston, MA: Springer US, 2000. DOI: 10.1007/978-1-4615-4629-0.
  • [3] L. Grivault, A. E. Fallah-Seghrouchni, and R. Girard-Claudon, “Agent-Based Architecture for Multi-sensors System Deployed on Airborne Platform,” pp. 86–89, IEEE, Sept. 2016.
  • [4] S. Kemkemian and M. Nouvel-Fiani, “Toward common radar & EW multifunction active arrays,” pp. 777–784, IEEE, Oct. 2010.
  • [5] S. Imai, E. Blasch, A. Galli, W. Zhu, F. Lee, and C. A. Varela, “Airplane flight safety using error-tolerant data stream processing,” IEEE Aerospace and Electronic Systems Magazine, vol. 32, pp. 4–17, Apr. 2017.
  • [6] C. Schwindt and J. Zimmermann, eds., Handbook on Project Management and Scheduling Vol.1. Cham: Springer International Publishing, 2015. DOI: 10.1007/978-3-319-05443-8.
  • [7] T. H. Cormen, C. Stein, R. L. Rivest, and C. E. Leiserson, Introduction to Algorithms. McGraw-Hill Higher Education, 2nd ed., 2001.
  • [8] A. B. Kahn, “Topological sorting of large networks,” Communications of the ACM, vol. 5, pp. 558–562, Nov. 1962.
  • [9] R. L. Graham, E. L. Lawler, J. K. Lenstra, and A. H. G. R. Kan, “Optimization and Approximation in Deterministic Sequencing and Scheduling: a Survey,” Annals of Discrete Mathematics, vol. 5, pp. 287–326, Jan. 1979.
  • [10] P. Brucker, A. Drexl, R. Möhring, K. Neumann, and E. Pesch, “Resource-constrained project scheduling: Notation, classification, models, and methods,” European Journal of Operational Research, vol. 112, pp. 3–41, Jan. 1999.
  • [11] C. Artigues, S. Demassey, and E. Neron, Resource-Constrained Project Scheduling: Models, Algorithms, Extensions and Applications. ISTE, 2007.
  • [12] T. Peters, “Timsort.” http://bugs.python.org/file4451/timsort.txt, 2002.