Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Job shop scheduling problems have been the subject of intensive researches by the Operation Research community

Job shop scheduling problems have been the subject of intensive researches by the Operation Research community

Computer Science

Job shop scheduling problems have been the subject of intensive researches by the Operation Research community. They are actually hard optimization problems for which not only no efficient algorithm is known, but also it is known that no such algorithm can exist. They enter into the category of so-called NP-hard problems. Consider a workshop with m machines M1,... Mm. A job shop scheduling problem consists in n jobs J.n. Each job A consists in a sequence of n-it of operations 01,1,... 0 . Each operation OL., is performed on a certain machine mid E MO and has a certain duration dE > 0. No two operations can be performed on the same machine at the same time. As an ilustration, consider the following job shop scheduling problem. - •/1 = ((3,4), (2,2),(1,1)); -J2 = (3 33)); - = ((2, , (1, 4) , (3, 1)); This problem consists thus of 3 jobs: cli, J2 and .11 consists in 3 operations, 01,1 performed on machine M3 and lasting 4 time units, 01.2 performed on machine M2 and lasting 2 time units, and 01,3 performed on machine M1 and lasting 1 time units. Similary, J2 consists in 2 operations, 02,1 performed on machine M1 and lasting 3 time units, and 01.2 performed on

M2

M3

Figure 1: Graphical representation of a schedule

machine M3 and lasting 3 time units. Eventually, J3 consists in 3 operations, 03.1 performed on machine M3 and lasting 2 time units, 03,2 performed on machine M1 and lasting 4 time units, and 03,3 performed on machine M3 and lasting 1 time units. A schedule for such a problem is an assignment of starting dates for each operation such that all of the constraints are satisfied, namely: - Operations of a job must be performed in order, i.e. the next operation cannot be started before the current is completed; - Operations performed on the same machine cannot overlap. The makespan of a job shop scheduling problem is the minimum total processing time for this problem. Figure 1 shows an optimal scheduling for the above problem. Operations of J2 and .13 are represented respectively in blue, greed and red. The makespan of this problem is thus S times units. In the above example, finding an optimal schedule is not very difficult. The difficulty comes when, at a given date, several operations are competing for the same machine. In this case, a choice must be made, that impacts the remaining of the schedule. Different choices may lead to very different makespans. The solutions space (made of the different choices) can be gigantic, preventing the brute force approach consisting in trying all candidate solutions. The objective of this assignment is ddesign a Python program to solve job scheduling prob-lems and to study whethe machine learning techniques can help us in this task.

1.2 Requirements

The objective of this assignment is to show your Pythonic skills. Here follows a number of requirements. 1. You must provide your program together with a small document explaining how it is orga-nized, what it is doing (which functionalities are implemented) and reporting experiments you have performed with it. You may also provide additional files such as those you use to test your program and to perform experiments.

Please write this!!

You must program in an object-oriented style, preferably splitting your program into modules.

2 Tasks

 

IMPORTANT: The following tasks are written to let you some freedom in the design of your program and the experiments performed with this program. The objective is to make you think about the problems at stake, the organization of your program, and to put in place rigorous experimental protocols. These protocols and the results you obtain out of the experiments and the conclusions you draw must be clearly described and argumented your report.

2.1 Loading Job Shop Scheduling Problems The first thing you need to solve job shop scheduling problems is indeed data structures to load such problems. It is also convenient to define a textual format for problems so that they can be loaded and printed out.

Task 1. Design a benchmark of job scheduling problems of different sizes. The objective ofthese problems is first to test the functionalities of your program and second the scalabiity of the optimization algorithms you shall implement. Hint: Look on internet for ready-made benchmarks. This may be useful, especially regarding large problems.

Task 2. Design a textual format for job shop scheduling problems. The simpler the better. Hint: Here again you can look on ready-made benchmarks.

Task 3. Create classes for machines, jobs, operations and problems. Define Get and Set methods to access their fields. Hint: Problems should be managed according to the factory patterns, i.e. it should be possible to create machines, jobs and operations via methods of the class Problem.

Task 4. Design a loader for problems, with methods to import a problem from a file.

Task 5. Design a printer for problems (and results), with methods to export problems into files.

Please write which sources you use!

2.2 Schedules

Technically, a schedule is an assignment of start dates for each operation of the problem. How-ever, the objective is to minimize the makespan. Consequently, operations are started as soon as possible. A schedule is thus essentially characterized by an ordered list of the operations of the problem. As an illustration, consider again the above example. Assume we consider the schedule: (01,i , 01,2, 01,3, 02,1, 02,2, 03,1, 03,2, 03,3)

The following holds. — The operation 014 is considered first. It starts thus at time t = 0, and is completed at time 0 + d1,1 = 4. The machine M3 is thus unavailable until this date. — The 01,2 is considered second. This operation requires the machine M2 (which is available) and can start at date 4 (because it has to wait the completion of operation 01,i). It is completed at time 4 + d1,2 = 6. M2 is thus unavailable until this date. — The 01,3 is considered third. This operation requires the machine Mi. (which is available) and can start at date 6 (because it has to wait the completion of operation 01,2). It is completed at time 6 + d1,1 = 7. M1 is thus unavailable until this date. — The 02,1 is considered fourth. This operation requires the machine M1 that is available at t = 7. 02,1 can thus cat date 7 (because it has not to wait the completion of another operation). It is completed at time 7 + d2,1 = 10. Ml is thus unavailable until this date. — And so on The above schedule is indeed highly sub-optimal. An optimal schedule (which corresponds to the one pictured in Figure 1) could be as follows. (01,1 , 02,1, 03,1, 01,2, 02,2, 03,2, 01,3, 03,3) Note that a schedule can be actually characterized by a list of job numbers, taking advan-tage that operations of a job must be executed in order. For instance, the above schedule is characterized by the following list.

(1, 1, 1, 2, 2, 3, 3, 3)

Similarly, the above optimal schedule can be characterized as follows.

 (1,2,3,1,2,3,1,3)

This remark will play a very important role in the sequel.

Task 6. Design a data structure to store schedules.

Task 7. Design a class Calculator with a method to calculate the total operation time of a schedule.

Task 8. Add a method to your calculator to generate the list all candidate schedules. Use this method to calculate the makespan of a problem.

Task 9. Show experimentally why this approach is limited to small problems.

2.3 Gradient Descendant

A complete exploration of the solution space is thus impossible in general. This is very common in optimization problems. To circumvent this difficulty, meta-heuristics are used. Meta-heuristics are methods that aims at giving good enough solutions within reasonable computation resources but without warranty to be close to the optimimal. Many such methods have been proposed, e.g. random walks, taboo search, simulated anealing, genetic algorithms, ant colonies... The simplest meta-heuristics is probably the so-called gradient descendant. It consists in starting from a random candidate solution, assessing its score, then in looking in the neighbor-hood for a better solution, and restarting from this solution. The process is reiterated until the current solution cannot be improved anymore. In the case of job shop scheduling problems, the neighborhood of a schedule a consists in all schedules that can obtained from a by permuting two adjacent elements (that can be permuted, given the precedence constraints). For instance, the neighborhood of the schedule (1,1,1,2, 2,3,3,3) consists of the schedules (1,1,2,1, 2,3,3, 3) and (1,1,1, 2,3, 2,3,3). Similarly, the neighborhood of the schedule (1, 2, 3, 1, 2, 3, 1, 3) consists of the schedules (2, 1, 3, 1, 2, 3, 1, 3), (1,3,2,1, 2,3,1,3), (1,2,1,3,2,3,1,3), (1,2,3,2,1,3,1,3), (1, 2,3,1,3,2,1,3), (1, 2,3,1,2,1,3,3), (1, 2,3,1, 2,3,3,1).

Task 10. Add a method to the class Calculator that implements the gradient descendant algorithm. Note that this method starts by picking up a schedule at random. The above implementation of the gradient descendant suffers from two drawbacks: - It may end up in a so-called local minimum, i.e. a schedule that it is better that all schedules of its neighborhood, but not globally optimum. A way to fix this problem consists in starting from different initial schedules. - Assume at some point of the descent, the current schedule is a and that the algorithm picks up a better schedule T in the neighborhood of a. Then, a is in the neighborhood of T) which means that its score (its total processing time) must be recalculated. An obvious waste of computation resources, that will become even more problematic in Section 2.4. As way to fix this problem consists in memorizing (caching) the schedules for which the calculation of the score has been already performed. Note that this requires to store schedules (and their scores) in a data structure in which insertion and retrieval is efficient.

Task 11. Improve your gradient descendant algorithm by implementing the two above ideas.

Task 12. Show by means of an experimental study the improvement you obtain.

2.4 Introducing Uncertainties So far, we assumed that the duration of operations is perfectly known. In reality, they are often subject to uncertainties, i.e. they typically obey some known distributions. Assume thus that durations of operations obey triangular distributions, i.e. they are char-acterized by a minimum value, a maximum value and a mode (a most probable value lying somewhere in between the minimum and the maximum value). Under this assumption, the total processing time of a schedule is itself subject to variations. To optimize the choice of a schedule, we are essentially interested in its average value.

Task 13. In your class Calculator, implement a stochastic simulation method to calculate the mean value of the total processing time of a schedule, under the above assumptions.

Task 14. Determine by means of an experimental study how many executions are required to get reasonably stable results.

Task 15. Show experimentally the computational cost of taking into account uncertainties into the gradient descendant algorithm.

Option 1

Low Cost Option
Download this past answer in few clicks

32.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE