0% found this document useful (0 votes)
8 views

Presentation 2

The document presents a linear programming approach to schedule tasks among employees in a fair manner based on either total number of tasks assigned or total duration of tasks assigned to each employee. It defines decision variables and constraints to minimize deviations from the average goal for each employee. The solution provides a task/duration-based fair schedule that minimizes overall deviation from the average goal across all employees.

Uploaded by

absa62781
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Presentation 2

The document presents a linear programming approach to schedule tasks among employees in a fair manner based on either total number of tasks assigned or total duration of tasks assigned to each employee. It defines decision variables and constraints to minimize deviations from the average goal for each employee. The solution provides a task/duration-based fair schedule that minimizes overall deviation from the average goal across all employees.

Uploaded by

absa62781
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

CASE STUDY- I

TASK SCHEDULING

• Presented By : Muhammad Fahad


Sumaya Abdul Rahman
• Manal AlZaidan
• Abdus Samad

• Submitted to : Dr. Adel Elomri


Problem Statement

7 employees

25 tasks
Question 1

• Task Scheduling
• A manager of a company is aiming to scheduling a set of tasks over
his employees. Each task is characterized by a duration (in minutes) and
can be handled by any of the employees (skills independent). Any
task should be allocated to only one employee, it cannot be divided
among many employees.

• Question- Propose a Linear Program that helps providing a “task


number-based Fair” schedule. Task number-based fairness is measured in
the sense of total number of tasks allocated to each employee.
Goal Programming based approach for task number
based fair scheduling of Employees

Decision Variables:
• X ij : is a binary decision variable indicating whether task I is assigned to employee j.
• d1j : is a decision variable representing the overhead deviation for employee j.
• d2j : is a decision variable representing the under-head deviation for employee j.
Objective Function:
• Minimize the sum of overhead and under-head deviation in assigned tasks for each employee
from the goal.

Minimize
Our Approach and Solution
Constraints:
• Each task must be assigned to exactly one employee no task to be split among
employees.

• Each employee can handle a minimum of one task to avoids scenarios where some
employees might be left without any tasks, contributing to work distribution fairness.

• Define deviation variables for each employee's goal:

• Define non-negative deviation variables for overhead:

• Define non-negative deviation variables for under head:


OPL Code

//Parameters
int m 25 // Number of tasks
int n 7 // Number of employees
range M 1 m
range N 1 n
float goal 3.57 //Average number of Tasks (Number of Tasks/Number of Employees)
//Decision Variables
dvar boolean x // X=1 if task M has been assigned to employee N, otherwise X=0
dvar float d N // overhead Deviation variable (Upper side deviation in assigned tasks from the
goal)
dvar float S N //underhead Deviation variables (Lower side deviation in assigned tasks from the
goal)
OPL Code

//Objective Function

//Minimize the sum of Upper side and Lower side deviation in assigned tasks for each employee from the goal

minimize sum(j in N) (d[j]+S[j]);


//Constraints
subject to {
// Constraint that each task must be assigned to exactly one employee (cannot split among employees)
C1 : forall (i in M)

sum(j in N) x[j][i] == 1;
// Constraint that each employee will handle a minimum of one task (No one with zero task assignment)

C2 : forall (j in N)

sum(i in M) x[j][i] >= 1;


OPL Code

// Constraint on deviation variables for each employee's goal

C3 : forall (j in N)
sum(i in M) x[j][i]-d[j]+S[j]==goal;

// Constraint on Non-negative overhead deviation variable


C4 : forall (j in N)
d[j] >= 0;

// Constraint on Non-negative underhead deviation variable

C5 : forall (j in N)

S[j] >= 0;
}
OPL Results
Graphical Illustration

• - Given that there are 25 tasks and 7 employees, the linear programming solution
optimizes task allocation.
• - The solution assigns 4 tasks to 4 employees and 3 tasks to the remaining 3
employees, ensuring a fair distribution.
• -The result of this allocation sums up to the total of 25 tasks, maintaining task
completeness and fairness.
Total minimized deviation= 3.5
Employees with 3 tasks : D+=[0.5,0.5,0.5,0,0,0,0]
Employees with 4 tasks : D-=[0,0,0,0.5,0.5,0.5,0.5]
GRAPH ILLUSTRATION
0.5 0.5 0.5 0.5
goal=3.5

0.5 0.5 0.5


Task Scheduling

Question
A manager of a company is aiming to scheduling a set
of tasks over his employees. Each task is characterized by
a duration (in minutes) and can be handled by any of the

2
employees (skills independent). Any task should be
allocated to only one employee, it cannot be divided
among many employees.

Question: Propose a Linear Program that helps providing


a “duration-based Fair” schedule. Duration-based fairness
is measured in the sense of total work duration (in
minutes) allocated to each employee.
Our Approach and Solution
Sets:
• M is the set of tasks, M = {1,2,….,m}
• N is the set of employees, N = {1,2,….,n}
• Decision Variable:
• Xij : is a binary decision variable indicating whether task I is assigned to employee j.
• d1j : is a continuous decision variable representing the overhead deviation for employee j.
• d2j : is a continuous decision variable representing the under head deviation for employee j.
Data:
• dr[M] is an array representing the duration of tasks M.
• Goal is the average duration of tasks assigned to each employee.
• Objective Function:
• Minimize the total deviation from the goal for all employees:

Minimize
Our Approach and Solution
Constraints:
• Each task must be assigned to exactly one employee:

• Each employee must handle a minimum of one task:

• Define deviation variables for each employee's goal:

• Define non-negative deviation variables for over-head:

• Define non-negative deviation variables for under head:


Graph Illustration
• -There are a total of 25 tasks. These tasks are assigned among 7 employees.

• - Each task has a specific duration, and the durations for the 25 tasks are as follows:
• duration[25] = [17,62,91,21,31,97,57,55,40,52,60,52,73,46,63,46,28,72,10,36,28,74,100,65,11]

• - The average duration chosen of all tasks is 184.

• - According to our Linear Programming (LP) solution:


• - 6 employees have been assigned 183 tasks each and 1 employee has been assigned 183 tasks
• - This results in a deviation of 1 .
OPL Code

/int n = 7;// Total number of employees

int m = 25;// Total number of tasks


range M = 1..m; // Set of tasks
range N = 1..n; // Set of employees

dvar boolean x[N][M]; // X=1 if task M has been assigned to emloyee N, otherwise X=0
dvar float d1[N]; // overhead Deviation variable (Upper side deviation in assigned tasks from the goal)

dvar float d2[N]; //underhead Deviation variables (Lower side deviation in assigned tasks from the goal)

float dr[M] = [17 62,91,21,31,97,57,55,40,52,60,52,73,46,63,46,28,72,10,36,28,74,100,65,11]; // Duration of tasks

float goal=184; //Average Duration of Tasks assigned to each employee (Total duration of all Tasks/Number of Employees)
OPL Code

//Objective Function
//Minimize the sum of Upper side and Lower side deviation in assigned tasks for each employee from the goal
minimize sum(j in N) (d1[j]+d2[j]);
//Constraints
subject to {
// Constraint that each task must be assigned to exactly one employee (cannot split among employees)
C1 : forall (i in M)

sum(j in N) x[j][i] == 1;
// Constraint that each employee will handle a minimum of one task (No one with zero task assignment)
C2 : forall (j in N)

sum(i in M) x[j][i] >= 1;


OPL Code

// Constraint on deviation variables for each employee's goal

C3 : forall (j in N)
sum(i in M) (dr[i] * x[j][i])- d1[j]+d2[j]==goal;
// Constraint on Non-negative overhead deviation variable
C4 : forall (j in N)

d1[j] >= 0;

// Constraint on Non-negative underhead deviation variable

C5 : forall (j in N)

d2[j] >= 0;
}
Duration based Fair Scheduling of Employees
Employees Tasks assigned Duration assigned Deviation

Employee 1 1, 3, 9, 20 [ 17 + 91 + 40 + 36] = 184 0

Employee 2 11, 12, 18 [ 60 + 52 + 72] = 184 0

Employee 3 13, 23, 25 [73 + 100 + 11] = 184 0

Employee 4 4, 8,10, 16,19 [21 + 55 + 52 + 46 + 10] = 184 0

Employee 5 14,15, 22 [46 + 63 + 74] = 183 1

Employee 6 5, 6, 17, 21 [31 + 97 + 28 + 28] =184 0

Employee 7 2, 7, 24 [62 + 57 + 65] =184 0

You might also like