of 6 /6
Route Planning Route Planning Branch & Bound Branch & Bound CIS548 CIS548 November 15, 2006 November 15, 2006

# Route Planning Branch & Bound CIS548 November 15, 2006

Embed Size (px)

### Text of Route Planning Branch & Bound CIS548 November 15, 2006

Route PlanningRoute PlanningBranch & BoundBranch & Bound

CIS548CIS548November 15, 2006November 15, 2006

2006 Kutztown University 2

Limo DriverLimo Driver Review of problemReview of problem

Driver has n pickup/dropoff pairsDriver has n pickup/dropoff pairs Limo leaves garage in morning; returns in eveningLimo leaves garage in morning; returns in evening Goal :: complete pick/drop tasks traveling shortest Goal :: complete pick/drop tasks traveling shortest

possible distancepossible distance Asymmetric TSPAsymmetric TSP

Once pickup is made driver must proceed to dropoff Once pickup is made driver must proceed to dropoff pointpoint

Trip to next pickup point always emanates from last Trip to next pickup point always emanates from last dropoff pointdropoff point

So trip from A to B is actually from dA to pBSo trip from A to B is actually from dA to pB Therefore distance(A Therefore distance(A →→ B) B) ≠≠ distance(B distance(B →→ A) A) Thus, we have asymmetric TSPThus, we have asymmetric TSP

One standard technique to obtain optimal solution – One standard technique to obtain optimal solution – Branch & boundBranch & bound

2006 Kutztown University 3

Branch & BoundBranch & Bound One approach – generate tree of all possible pathsOne approach – generate tree of all possible paths

Example – Example – GenPermsGenPerms OO(Time) = N!(Time) = N! OO(Space) = N(Space) = N Can we do better?Can we do better?

Generate tree; prune non-optimal branchesGenerate tree; prune non-optimal branches For each node generated . .For each node generated . .

Calculate an upper & lower bound for reaching goalCalculate an upper & lower bound for reaching goal If lower bound of node exceeds upper bound for some If lower bound of node exceeds upper bound for some

other node: other node: » Prune the nodePrune the node» BBranch below node is pruned as wellranch below node is pruned as well

If node contains goalIf node contains goal» If its value If its value ≤≤ lower bound of all other nodes lower bound of all other nodes DONE DONE» Otherwise, continueOtherwise, continue

2006 Kutztown University 4

B&B – SB&B – S33 implementation implementation Use same heuristic as beforeUse same heuristic as before

Sum of min distances to remaining pickup pointsSum of min distances to remaining pickup points Use f-value for lower boundUse f-value for lower bound Use sum of max distances as upper boundUse sum of max distances as upper bound

Order nodes by f-value (lower bound)Order nodes by f-value (lower bound) Keep global upper & lower boundsKeep global upper & lower bounds When a node is generated . .When a node is generated . .

If its lower bound is If its lower bound is ≥≥ global upper bound, discard it global upper bound, discard it If its lower (upper) bound < (>) global one, update If its lower (upper) bound < (>) global one, update

global value(s)global value(s) Insert new node into linked list of waiting nodesInsert new node into linked list of waiting nodes

If global upper bound is changed . .If global upper bound is changed . . Prune linked list of waiting nodesPrune linked list of waiting nodes Discard nodes with lower bound Discard nodes with lower bound ≥≥ global upper bound global upper bound

2006 Kutztown University 5

SS33 with B&B – Discussion with B&B – Discussion What have we gained?What have we gained? What are upper & lower bounds on time?What are upper & lower bounds on time?

With & without B&B?With & without B&B?

What are upper & lower bounds on space?What are upper & lower bounds on space? With & without B&B?With & without B&B?

What are What are OO(Time) and (Time) and OO(Space)?(Space)? With & without B&B?With & without B&B?

What are empirical results?What are empirical results? Key parameters – Key parameters –

Time :: number of nodes expanded & producedTime :: number of nodes expanded & produced Space :: maximum length of nodes-waiting listSpace :: maximum length of nodes-waiting list

2006 Kutztown University 6

SS33 with B&B – Exercises with B&B – Exercises Construct a Limo Driver instance where the Construct a Limo Driver instance where the

maximum length of the nodes-waiting list maximum length of the nodes-waiting list differs with & without B&B.differs with & without B&B.

Prove or disprove: the number of nodes Prove or disprove: the number of nodes expanded is the same with & without B&B.expanded is the same with & without B&B. To disprove :: Construct a Limo Driver instance To disprove :: Construct a Limo Driver instance

where the number of nodes expanded differs with where the number of nodes expanded differs with & without B&B.& without B&B.

To prove :: Prove that if a node is expanded To prove :: Prove that if a node is expanded without B&B it will also be expanded with B&B; without B&B it will also be expanded with B&B; and prove the converse.and prove the converse.

Documents
Documents
Documents
Documents
Engineering
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Engineering
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents