Lesson Resource Scheduling Problem - Artificial Intelligence - ثالث ثانوي

Lesson 2 Resource Scheduling Problem

Scheduling Problems

Table 5.1: Real-world applications need scheduling solutions

Lesson 2 Resource Scheduling Problem

Single-Machine Weighted Tardiness (SMWT) Problem

Lesson 2 Resource Scheduling Problem

Job Shop Scheduling (JSS) Problem

Using Python and Optimization to Solve the SMWT Problem

Lesson 2 Resource Scheduling Problem

The random.randint(x,y) function is used to generate a random integer between x and y. A different

Lesson 2 Resource Scheduling Problem

The compute_schedule_tardiness() function will be used to evaluate schedules and will serve

Itertools.Permutations() Function

Brute-Force Solver

Lesson 2 Resource Scheduling Problem

The solver returns the best schedule, its tardiness, and the

Lesson 2 Resource Scheduling Problem

Greedy Heuristic Solver

Lesson 2 Resource Scheduling Problem

The following function implements an alternative heuristic that also takes into account the weights

Local Search

Lesson 2 Resource Scheduling Problem

Local_search_solver() Function

Lesson 2 Resource Scheduling Problem

The following function implements a random swap by simply selecting two random jobs in the given schedule that should exchange places.

Lesson 2 Resource Scheduling Problem

The following code uses both swap strategies with the local search solver to solve the sample problem generated in the beginning of this lesson.

Comparing Solvers

Lesson 2 Resource Scheduling Problem

Compare() Function

Lesson 2 Resource Scheduling Problem

Describe two different strategies (swapping, inversion, shifting etc.) for the local search approach of solving the SMWT problem.

How many possible schedules (solutions) are there for an instance of the SMWT problem with 9 jobs?

Lesson 2 Resource Scheduling Problem

You want to create a brute-force solver for the SMWT problem. Complete the following code so that the function utilizes brute force to find the optimal scheduling permutation.

Lesson 2 Resource Scheduling Problem

You want to create a local search solver for the SMWT problem. Complete the following code so that the function utilizes local search to find the optimal scheduling permutation.

Lesson 2 Resource Scheduling Problem

Describe how local search works.

Write your observations about the results of the the greedy solvers compared to the local search solvers, in the 30 job problem. Why do you think in the 30 job problem the brute-force solver