Solution to Exercise 2: Assigning Tasks
Explore how to apply genetic algorithms for assigning tasks to workers by optimizing the distribution to reduce total completion time. Learn mutation and crossover operations for evolving solutions, and understand how to validate and score assignments using Python and NumPy.
We'll cover the following...
The remaining exercises are challenging to solve with PSO. When we think of solutions to these problems, it’s hard to define a velocity for them. Using a genetic algorithm is more natural—and that’s why we’ll do just that.
Exercise 2
In this problem, we have tasks and employees. The matrix tells us how much time each employee needs to do each task. What would a solution for this problem look like?
In this case, a solution is an assignment of each task to some worker. There could be workers with no tasks assigned and workers with multiple tasks assigned. Mathematically, we can think of a solution as a matrix with size where ...