Selection and scheduling of jobs with time-dependent duration

In this paper two mathematical programming models, both with multiple objective functions, are proposed to solve four related categories of job scheduling problems. All four of these categories have the property that the duration of the jobs is dependent on the time of implementation and in some cases the preceding job. Furthermore, some jobs (restricted to subsets of the total pool of jobs) can, to different extents, run in parallel. In addition, not all the jobs need necessarily be implemented during the given time period.


Introduction
Over the last few decades a substantial amount of research has been done in the field of job scheduling where the duration of the jobs is time dependent [1,6].A vast number of algorithms and models have been developed to represent and solve a wide variety of real life problems arising form production and manufacturing.Notwithstanding a loss of generality, most of the algorithms developed to solve the problem above are more efficient than the equivalent algorithms based on conventional integer programming models.
The problem considered in this paper is concerned with determining an optimal sequence of tests to be performed at a specific test station.Individuals wanting to use the test station must apply to occupy the test station and sometimes may even choose the time at which to carry out the test.This results in a pool of tests and the management of the test station must select a subset of these tests and determine a sequence in which the tests should be performed in order to maximise income.In this case, not only is the test duration dependent on the start times, but may also depend on the preceding test as well.Furthermore, in certain circumstances parts of tests can run in parallel if they require the same equipment setup.This problem may be described as a multi-objective scheduling problem with time dependent duration and in which jobs can run in parallel to a certain degree.The first objective is to select the right jobs to implement from a pool of waiting jobs and the second is to minimise the total duration of the jobs selected.No models could be found in the literature to solve exactly the problem formulation as stated above.
In the next section a brief background to the problem and literature is given.In §3 the relevant mathematical models are provided to solve the different occurrences of the scheduling problem.These models are followed in §4 by a few notes on the complexity of the algorithms.Examples to demonstrate the implementation of the model are given in §5.In §6 conclusions are drawn and ideas for further research are suggested.

Background
Pinedo [14] classifies scheduling problems according to a triplet notation α|β|γ, where α describes the machine environment, β the processing characteristics and constraints, and γ the objective to be optimised.According to this notation, the machine environment for our problem is a single machine setup (denoted by 1).The processing characteristics can be pre-emptive1 (prmp) with sequence-dependent setup times (s j,k ) and precedence (prec) restrictions.Finally, there are two objectives, namely, the maximisation of the total weighted jobs ( w j ) and the minimisation of makespan (C max ).Thus in triplet notation our problem is related to a 1|prmp, s j,k , prec| w j , C max scheduling problem.
Generally, objective functions considered in the scheduling literature [1,6,14] are based on time measures, such as the maximisation or minimisation of one or a combination of makespan C max , maximum lateness L max , maximum tardiness T max and variance of makespan var(C max ).On the contrary, our problem is not purely pre-emptive and does not include any time measure.Consequently, it is not possible to solve our problem by means of existing algorithms.Alternatively, one could formulate the problem as a 0/1 integer programming problem, but the resulting model is complex.Cheng et al. [6] state that almost all scheduling problems where the duration of jobs is time dependent are NP-complete.
Another difference between the problem considered here and the general problems in the literature, where durations of jobs depends on their start times, is that the models in the literature assume some functional relationship between the duration of a job and its start time [6].The suggested functional relationships are: 1.The duration is either increasing or decreasing as the start time increases.The functional relationship is then given by d i = a i ± b i s i , where d i is the duration, s i the start time of job i, and a i and b i are constants.See, for example, [2,4,7,8] for articles using this approach.
2. The duration is either constant and then increasing ( or decreasing and then constant (d i = a i − b i min(s i , p i )) as the start time increases.The same notation as above is used, with the addition that p i is a constant too.See, for example, [5,11] for this approach.
3. The duration is a step function (d i = a i or a i + b i ).See, for example, [3,9] for this approach.
No such functional relationships exist in the situation considered here.In our application the durations can, for example, be constant, increase, decrease and increase again.

Mathematical models
The objective in this paper is to formulate the selection and scheduling of jobs with time dependent duration as an integer program (IP) with multiple objective functions.Cases are considered where the job duration and cost are dependent on the time and sequence of job implementation.The pool of jobs is restricted to a predetermined set and the set of time periods is restricted to integer values.The job duration functions are restricted to cases where the job duration can be predetermined for a given start time.The discreteness of the job durations and start times do not impose restrictions on the applicability of the models.If necessary, the models can accommodate any length of interval by simply choosing smaller intervals (for example, hours instead of days or weeks).
Four scheduling models which model different degrees of job duration and overlap, and therefore different degrees of complexity, are considered.Problems are classified in the following four categories: Category 1: The duration of a job depends on its start time and jobs cannot run in parallel.
Category 2: The duration of a job depends on its start time and jobs can run in parallel.

Category 3:
The duration of a job depends on its start time and on the preceding job, and jobs cannot run in parallel.

Category 4:
The duration of a job depends on its start time and on the preceding job, and jobs can run in parallel.
An optimal job sequence should be determined according to the two objectives (in order of priority) given below: 1. Maximise the profit generated by jobs that are implemented; and 2. Minimise the total duration of the jobs that are implemented.
Only two mathematical models are necessary to model the four categories.The value of one parameter determines whether or not jobs can run in parallel as well the extent to which jobs can run in parallel.The two model formulations follow in the sections below.

Job duration depends on the start time only
Categories 1 and 2 are considered first.In both these categories precedence is not important and will be modelled by means of an IP.A description of the variables required in modelling the case where the job duration dependents on the start times is given below: d i,k duration of job i when implemented during period k, c i,k profit margin of job i when implemented during period k, h i parameter indicating the fraction of the facility that job i occupies for the full duration of implementation, r i relative weight representing the relative importance of job i, x i,k binary variable equal to unity if the implementation of job i starts during period k, and b i,k binary variable equal to unity if job i is implemented during period k.
The following assumptions are made in the model: 1. Jobs run continuously and must be completed within the given time intervals 1, . . ., w.

The durations of jobs have integer values.
3. A discrete range of values is assigned to h i , for example, h i = [1, 0.75, 0.5, 0.25].
4. Jobs do not require a specific equipment/facility setup, which implies that any subset of jobs can run in parallel, if the resources permit.
5. The durations of jobs that can run in parallel are defined for a specific value of h i .
Usually, jobs running one after the other will imply shorter individual job durations and therefore separate jobs are defined with relative durations and cost functions for the range of valid h i values.The set of derived jobs is denoted by H i .Take, for example, job J 1 which has a duration of 4 units if it is run on its own.If it can run in parallel with h 1 taking on the values 1, 0.75, 0.5 and 0.25, then the set of four derived jobs H 1 = {J 1a , J 1b , J 1c , J 1d } with durations of 4, 6, 7 and 8 respectively are created.The cost function of the additional jobs should reflect a saving in cost in the overheads, since running jobs in parallel generally decreases the total duration and costs to complete all the jobs.Only one of these derived jobs will be implemented.
6. Maximisation of the weighted number of jobs has priority over the minimisation of total job durations and will be optimised first.
A mathematical formulation for the case where jobs can run in parallel is presented.The case where jobs cannot run in parallel may be treated as a special case by simply setting the parameter h i = 1 for all jobs.With reference to the variables defined, the IP formulation is given by and subject to x s,k = 0, for all (s, k) ∈ S k (7) for all H i (8) Constraint (3) ensures that a job starts once only.If the value of h i is less than 1 it means that jobs can run in parallel.Constraint (4) dictates how many jobs can run in parallel during a certain time period, while not exceeding the capacity of equipment or the facility.Constraint (5) ensures that the binary variables b i,k take on a value of one for all the time periodes k during which job i is running.Constraint (6) In other words, it ensures that a job can only start if it can be finished before the end of the time periods over which the model is solved.Constraint ( 6) is thus a simplification of where M is a large positive number.If it is assumed that max i,k {d i,k } < w, then M = w−1 is sufficiently large.Constraint (7) prohibits job s from starting during time period k.The set S k contains all the jobs that are not allowed to start at the beginning of time period k.
The final constraint in equation ( 8) ensures that at most one element from the set of derived jobs H i can be chosen.

Job duration depends on the start time and the preceding job
Many applications arise where job execution requires a specific setup of the facilities and resources.In this section we consider the situation where the setup times for job execution depend on the state of the facility after the preceding job has been completed.The sequence thus plays an integral part in the duration and cost of implementing jobs.Since jobs require specific facility setups, not all jobs can run in parallel.Jobs should therefore be categorised into classes of similar facility setup requirements with similar setup durations and cost portions of the total job cost.This case is again formulated as an IP and the case where jobs cannot run in parallel is a special case obtained by simply setting the parameter h i equal to unity for all jobs.In addition the following assumptions are added to those in §3.1: 1. Jobs may be categorised into classes of similar facility requirements, with similar setup cost portions of the total job cost and similar setup duration portions of the total duration required for job implementation.
2. The facilities are in an initial setup state before the commencement of the first period.

Only jobs within the same setup category can run in parallel.
The description of the variables required in modelling the case where the job duration depends on the start times is given below: x i,j,k binary variable equal to unity if the implementation of job i starts during period k and follows on job j, d i,j,k duration of job i if it follows on job j and is implemented during period k, c i,j,k profit if job i is implemented during period k and follows on job j, h i parameter indicating the fraction of the facility that job i occupies for the full duration of implementation, r i relative weight representing the relative importance of job i, and b i,k binary variable equal to unity if job i is implemented during period k.
In terms of the notation above, the model formulation for categories 3 and 4 is max and subject to x s,j,k = 0, for all (s, j, k) ∈ S k (18) The goal given by (11) maximises the weighted number of chosen jobs, while the goal given in (12) minimises the total duration of these jobs.The constraints are similar to the ones used in §3.1, with generalisation for the precedence complications.The only constraint not present in the formulation in §3.1 is constraint (17).This constraint is also an if-then constraint and states that if job i is preceded by job j and starts during time period k, then job j should have started before time period k.

Complexity of models
The size of the IP is a function of the number of jobs in the pool, the number of time periods, the problem classification and problem-specific limitations.Problem-specific limitations may involve the following: 1.The refinement of a unit period interval into fractions of a period, which defines the range of valid h i values.For example, when refining the unit interval to quarter units and specifying a job with an h i value of 1, 3 4 , 1 2 and 1 4 implies that 3 new jobs must be defined with valid cost and duration parameters.This increases the job pool to select from.
2. For category 3 and category 4 classifications, jobs are classified according to facility configuration requirements.Jobs within different classes cannot run in parallel.
Table 1 gives a summary of the order of magnitude of the size of a typical scheduling problem solved by the IP models discussed above.The data in this table are based on a model where there are a total of n jobs including derived jobs and a total of w time periods.From Table 1 it may be seen that the complexity increases as the number of jobs and periods increases.The most serious problem, however, is not the number of constraints but the number of 0/1 variables which blow up the solution times unacceptably.
There are problem-dependent complexities, such as the ones reflected in constraints ( 7), ( 8), ( 18) and ( 19), that should also be taken into account and that are not reflected in Table 1.All four of the categories can become more complex if there are time preferences, i.e. certain jobs are strongly preferred to be completed during certain time periods.Categories 2 and 4 become more complex with an increase in the number of jobs that can run in parallel.Categories 3 and 4 become more complex with an increase in the number of job classes.The different formulations were coded for, and implemented in LINGO [12,13].Formulations for real problems were solved using LINGO, but solution times are unrealistically long.Typical solution times for practical problems are in the order of one to three days.

Examples
The following examples demonstrate the implementation of the different models.The examples were solved with LINGO.The four different categories discussed in §3 are considered for the example.
Consider a pool of jobs {J 1 , J 2 , J 3 , J 4 , J 5 , J 6 , J 7 , J 8 } that may be implemented in the time periods 0, . . ., 12.The duration (D) in months and profit (P ) in thousands of rands for categories 1 and 3 (i.e.jobs cannot run in parallel) are 0 0 0 0 0 0 0 0 J 5 0 0 0 0 0 0 0 0 J 6 0 0 0 0 0 0 0 0  , where s ij is the additional setup time for job i if job j precedes it and c ij is additional cost added to job i if job j precedes it.If jobs can run in parallel, more rows and columns are added to S and C, to supply the values for all the derived jobs in the set(s) H i .The values in these additional rows and columns stay the same as values in the original row or column for that job.
The setup times must be added to the normal durations of jobs in D, while the costs in C must be subtracted from the profits in P .
The schedules for the 4 categories are given schematically in Figure 1.The values of the first objective function in each of the four categories are (in thousands) R128, R150, R124 and R124, respectively.In all the cases the optimum value of the second objective function is 12 time units.
6 Conclusions and ideas for future research Formulating a scheduling problem as an IP where job duration is dependent on the start time and the preceding job is relatively complex, but has the advantage of being very flexible.Many different scenarios may be modelled and additional constraints limiting job implementation times and precedence may easily be accommodated.Multiple objective functions may easily be incorporated by recursively running the same application with different objective functions and additional constraints imposed by enforcing previous objective values.The solution times of the IPP increases drastically as the pool of jobs and number of periods increase.The number of 0/1 variables and constraints become too large for commercial software to solve the IP model within an acceptable time frame.Fairly small but realistic examples of scenarios with 15 jobs and 30 time periods took days to converge to an optimal solution using LINGO.The possibilities for future research thus lies in the development of heuristics or meta-heuristics to find good job schedules as opposed to optimal job schedules.

Table 1 :
Summary of the order of magnitude of the number of variables and constraints for the job scheduling models in §3.1 and §3.2.
ik is the duration if job i if it starts during period k, and p ik is the profit of job i if it starts during time period k.The set of jobs {J 1 , J 6 , J 7 } can run in parallel with corresponding h i values of 0.5 for all of them.The artificially created jobs that can run in parallel will be called {J 1a , J 6a , J 7a , J 1b , J 6b , J 7b }.The duration (D) in months and profit (P ) in thousands of rand for categories 2 and 4 (i.e.jobs can run in parallel) are {J 1 , J 3 , J 4 , J 6 }, class 2 = {J 2 , J 7 , J 8 } and class 3 = {J 5 }.The jobs in class 2 require 1 day additional setup time if preceded by jobs in class 1, with an additional setup cost of R5 000.The setup times (S) due to necessary adjustments to equipment and the cost associated with the adjustments (C) are