Discrete Optimization
Optimal timing of a sequence of tasks with general completion costs

https://doi.org/10.1016/j.ejor.2004.01.025Get rights and content

Abstract

Scheduling a sequence of tasks––in the acceptation of finding the execution times––is not a trivial problem when the optimization criterion is irregular as for instance in earliness–tardiness problems. This paper presents an efficient dynamic programming algorithm to solve the problem with general cost functions depending on the end time of the tasks, idle time costs and variable durations also depending on the execution time of the tasks. The algorithm is also valid when the precedence graph is a tree and it can be adapted to determine the possible execution windows for each task not exceeding a maximum fixed cost.

Introduction

Just-in-time scheduling has interested both practitioners and researchers for over a decade. A very common idea is to recognize that a job that completes either tardily or early in a schedule incurs extra costs. Therefore, a usual model consists in introducing earliness and tardiness penalties per unit time for each task and the objective is to minimize the sum of all the earliness and tardiness costs.

However, such a model may be insufficient. Very often, the earliness and tardiness costs are not linear on the whole time horizon. For example, practitioners sometimes want to model several good time periods during which a task would preferably be processed, but with bad time periods in between the good periods. Moreover, they also have to deal with idle periods: in schedules minimizing the earliness–tardiness costs, periods of inactivity are generally inserted but in practice, these periods when no work is done have an extra cost (e.g. for intermediate storage) that cannot be ignored in the model and must be penalized.

In this paper, the single-machine problem with general completion costs and idle period penalties is studied. More precisely, we will mainly consider the key problem where the tasks are already sequenced. Even if the main difficulty of the problem is in the sequencing, this subproblem is very important because most scheduling algorithms first rank the tasks by the mean of either a (meta)heuristic or an enumeration scheme and next determine the optimal––if possible––timing for the sequenced tasks. For example, both the branch-and-bound algorithms by Hoogeveen and van de Velde [10] or by Sourd and Kedad-Sidhoum [14] and the tabu search by Wan and Yen [16] are based upon this approach to solve the single machine problem with earliness/tardiness penalties. Section 5 of this paper presents how our results on this subproblem can be used in a constraint-programming based approach when solving the general sequencing problem.

When the completion costs are non-decreasing––criteria such as the flow time and the total tardiness––and when the cost of idle period is non-decreasing with the length of the period, the problem is obvious: each task is scheduled as early as possible when its predecessor in the sequence is completed.

The pure earliness–tardiness case (without idle time penalties) can be formulated as a linear program [7] but this problem can be more efficiently solved in O(nlogn) time by a direct algorithm based on the blocks of adjacent tasks [6], [8], [15]. When the minimization criterion is the maximum cost instead of the sum of all the costs, the problem of finding optimum start times for a sequence of tasks can be efficiently solved with general cost functions [12].

Our problem is also related to the project scheduling problem with irregular starting time costs [13]. However, the approach, based on network flows, adopted by Mörhing et al. [13], requires to explicitly define the cost of each task at any time point so that the time horizon of the schedule appears in the complexity of the algorithm. Chrétienne and Sourd [4] present an algorithm for the special case where the cost functions are convex. Another recent approach to schedule tasks in parallel with earliness and tardiness is due to Della Croce and Trubian [5].

The algorithm presented in this paper is based on dynamic programming (DP) [3]. The scheme is fairly simple and, which is interesting, it can deal with additional features that cannot be dealt by the existing algorithms. For example, the problem can be formulated as a continuous linear program when the cost functions are convex but integer variables must be used to represent non-convex cost functions. Our DP approach is able to solve the problem with both convex and non-convex cost functions, but also idleness costs and durations depending on the execution time of the task, which can be very useful to model breaks or transportation activities. Moreover, the method can also be adapted to solve the problem in which the precedence graph is a tree instead of a complete sequence.

In a methodological view, this paper focuses on piecewise linear functions. We show the influence of the input encoding on the resulting complexity of the algorithm, which is expressed in function of the number of segments of the cost functions. To the best of our knowledge, there is no previously published similar analysis for a dynamic programming algorithm. Moreover, this analysis can be generalized to several classes of problems in which a function is given in input. In practice, this analysis is very useful because piecewise linear functions are very practical to represent time-varying parameters. For example, if we consider a problem that can be solved either by our approach or by the algorithm of Möhring et al. in which the cost functions are piecewise linear, our approach is polynomial whereas the algorithm of Möhring et al. is pseudo-polynomial because its complexity depends on the number of time points.

Section 2 presents with more mathematical details the problem studied in the paper. It also considers modelization questions. Section 3 is devoted to the solution of the problem by dynamic programming; the computational complexity is studied when the cost functions are piecewise linear. Some polynomial special cases are studied in Section 4. Finally, in Section 5, we adapt the dynamic programming approach to compute the possible start times of all the activities such that a fixed maximum total cost is not exceeded.

Section snippets

Problem definition

The problem is to find the execution times of n sequenced tasks denoted by T1,T2,…,Tn that is Ti can start only after Ti−1 is completed. In a feasible schedule, Si and Ci respectively denote the start time and the end time of Ti. The relationship between Si and Ci is assumed to be known in advance, CiSi being the duration of Ti. More precisely, it is assumed that Si is a continuous non-decreasing function of Ci, which is denoted by Si=Si(Ci). In other words, the later a task starts, the later

Solving the problem by dynamic programming

We are going to show that this problem can be solved by dynamic programming. For any k∈{1,…,n} and any t∈R, Pk(t) denotes the subproblem in which:

  • the sequence of tasks is the subsequence T1,…,Tk and

  • we add the additional constraint that Tk completes at t, that is Ck=t.


Σk(t) is the minimum cost of the solutions of Pk(t). Clearly, the optimal cost of the whole problem is mint∈RΣn(t).

Special cases

In this section, we present some special cases in which there are some additional properties that make the problem simpler. In this section, we assume that the durations of the tasks are time-independent, that is for any i there is a constant pi such that Si=Cipi.

Optimal filtering algorithm

Filtering algorithms are of key importance in Constraint Programming because their role is to remove from the domain of the variables, the values that cannot lead to a feasible solution. Sometimes, the removal of values that cannot lead to an optimal solution can be implemented. In constraint-based scheduling [2], a pair of variables is usually devoted to the start and end times of each activity. In this section, we give an algorithm that determines the possible end times for each activity so

Conclusion

We presented a Dynamic Programming algorithm to schedule––i.e. to time––a sequence of tasks in order to minimize the total cost, including idle time costs. The algorithm is polynomial when idle time costs are linear, which is not restrictive for practical problems. Moreover, the algorithm is still valid for the project scheduling problem without resource constraint and with a tree precedence graph.

An interesting point of this algorithm is that it can be very easily implemented. For example, the

Acknowledgements

Part of the work was done while the author was working for ILOG.

References (16)

There are more references available in the full text version of this article.

Cited by (32)

  • Just-in-time scheduling problem with affine idleness cost

    2024, European Journal of Operational Research
  • Total completion time minimization in two-machine flow shop scheduling problems with a fixed job sequence

    2012, Discrete Optimization
    Citation Excerpt :

    A fixed job sequence can also appear due to the application of the First-Come–First-Served principle, which is commonly regarded fair by customers. Algorithms with machine idle time insertion for a fixed job sequence, also called timing algorithms [4], were applied for a single machine [5–11], parallel machines [12] and a flow shop [13,4]. The problem studied by Lin and Cheng [13] belongs to the area of scheduling with time-dependent processing times, as the machine-2 processing time depends on job’s waiting time between the machines.

  • Scheduling jobs with values dependent on their completion times

    2012, International Journal of Production Economics
    Citation Excerpt :

    It was also proved that the problem with uniform processors, unit-time jobs and the general cost functions is polynomially solvable (Lawler et al., 1993). Among more recent papers considering minimization of the total cost there are e.g. Chrétienne and Sourd (2003) and Sourd (2005), where some polynomial and pseudo-polynomial time algorithms were constructed for cases with some additional assumptions (e.g., the precedence constraints between jobs, convex cost functions, idle time penalties). As an example, the problems with determined cost functions (tardiness and earliness-tardiness) were solved by the constructed algorithms.

  • Techniques for inserting additional trains into existing timetables

    2009, Transportation Research Part B: Methodological
    Citation Excerpt :

    Due date/tardiness problems have been addressed greatly in the literature and on a regular basis. Recent examples included He et al. (1996), Jain and Elmaraghy (1997), Valls et al. (1998), Asano and Ohta (2002), Sourd (2005a,b), Viswanath et al. (2006) and Hendel and Sourd (2006). He et al. (1996) considered a job shop environment and applied a simulated annealing heuristic integrated with an enhanced exchange heuristic.

View all citing articles on Scopus
View full text