Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPSC 433 Artificial Intelligence Or-Tree Modeling Example CPSC 433 T01 & T02 Andrew Kuipers.

Similar presentations


Presentation on theme: "CPSC 433 Artificial Intelligence Or-Tree Modeling Example CPSC 433 T01 & T02 Andrew Kuipers."— Presentation transcript:

1 CPSC 433 Artificial Intelligence Or-Tree Modeling Example CPSC 433 T01 & T02 Andrew Kuipers

2 CPSC 433 Artificial Intelligence Problem Description Let T be a set of tasks, and W a set of workers Let e:T  W  [0,1] be a function mapping tasks and workers onto efficiency ratings For a given sequence of tasks S =  t 1, …, t n , assign tasks to workers such that : –the overall time to complete the sequence is minimized, and –no worker is assigned to a task for which he has an efficiency rating of 0

3 CPSC 433 Artificial Intelligence Or-Tree Model Defining a Problem Instance pr =  S =  t 1, …, t n , A =  (w i,  t’ 1i, …, t’ mi  ) | w i  W, t’ ij  T   S : the sequence of tasks to complete (not yet assigned) A : an assignment of workers to sequences of tasks W: the set of workers T : the set of tasks

4 CPSC 433 Artificial Intelligence Or-Tree Model Evaluating Solutions f(pr) = max( {  i=1..mj ( e(t ij, w j ) -1 ) | (w j,  t 1j, …, t mj   A } ) For each worker, calculate the time to complete its assigned tasks Time taken by worker is 1 / efficiency for a particular task Workers work in parallel The total time is the max of the times taken by each worker

5 CPSC 433 Artificial Intelligence Or-Tree Model When is a branch Solvable / Unsolvable? Erw ,wt ((pr, ?), (pr, no))   (w i,  t 1i, …, t mi  )  A,  j  {1…m i } | e(t ji, w i ) = 0 ie: if a worker is assigned a task for which it has 0 efficiency Erw ,wt ((pr, ?), (pr, yes))   Erw ,wt ((pr, ?), (pr, no)) and |S| = 0 * where pr =  S, A  ie: is not unsolvable, and no tasks left to assign

6 CPSC 433 Artificial Intelligence Or-Tree Model Branching Definition Altern(pr 0, pr 1, …, pr n )  pr 0 =  s 0 : S, A  pr i =  S, Assign(A, w i, s 0 )   w i  W Assign the first task in S to each worker on a different branch Assign(A, w, s) = A’ s.t : if (w,  t 1, …, t n  )  A then (w,  t 1, …, t n, s  )  A’ else (w,  s  )  A’

7 CPSC 433 Artificial Intelligence Or-Tree Model pr =  S =  t 1, …, t n , A =  (w i,  t’ 1i, …, t’ mi  ) | w i  W, t’ ij  T   f(pr) = max( {  i=1..mj ( e(t ij, w j ) -1 ) | (w j,  t 1j, …, t mj   A } ) Erw ,wt ((pr, ?), (pr, no))   (w i,  t 1i, …, t mi  )  A,  j  {1…m i } | e(t ji, w i ) = 0 Erw ,wt ((pr, ?), (pr, yes))   Erw ,wt ((pr, ?), (pr, no)) and |S| = 0 * where pr =  S, A  Altern(pr 0, pr 1, …, pr n )  pr 0 =  s 0 : S, A  pr i =  S, Assign(A, w i, s 0 )   w i  W Assign(A, w, s) = A’ s.t : if (w,  t 1, …, t n  )  A then (w,  t 1, …, t n, s  )  A’ else (w,  s  )  A’

8 CPSC 433 Artificial Intelligence Example Problems W = { A, B, C } T = { p, q, r } e : S =  p, p, q, r, p, q  W = { A, B, C } T = { p, q, r } e: S =  q, r, q, p, r, q, p  ABC p10.20 q0.510.2 r00.51 ABC p0.200 q0.500.2 r0.10.20.5


Download ppt "CPSC 433 Artificial Intelligence Or-Tree Modeling Example CPSC 433 T01 & T02 Andrew Kuipers."

Similar presentations


Ads by Google