Interleave Aggregation Sequences Compute a sequence for each region input output input input output input Interleave according to order of smallest areas (as merge sort) input output output output input 9-3
Interleave Aggregation Sequences Compute a sequence for each region input output input input output input Interleave according to order of smallest areas (as merge sort) input output output output input 9-4
Subdivision Subdivision P t , i : patches subdividing a region P 3,1 P 2,1 P 3,2 P 2,2 P start = P 1,1 P goal = P 4,1 P 3,3 P 2,3 P 3,4 P 2,4 P 3,5 10-1
Subdivision Subdivision P t , i : patches subdividing a region Size n : #polygons on start map P 3,1 P 2,1 P 3,2 P 2,2 P start = P 1,1 P goal = P 4,1 P 3,3 P 2,3 n = 4 P 3,4 P 2,4 P 3,5 10-2
Subdivision Subdivision P t , i : patches subdividing a region Size n : #polygons on start map #subdivions is exponential in n . P 3,1 P 2,1 P 3,2 P 2,2 P start = P 1,1 P goal = P 4,1 P 3,3 P 2,3 n = 4 P 3,4 P 2,4 P 3,5 10-3
Formalizing a Pathfinding Problem start goal 11-1
Formalizing a Pathfinding Problem • Each subdivision is represented as a node start goal 11-2
Formalizing a Pathfinding Problem • Each subdivision is represented as a node • Find a shortest path w.r.t. cost functions start goal 11-3
Cost Function • Type change: f type ( P s , i , P s +1, j ) We wish to aggregate patches with similar types u lake, pond v swamp ly sport facility ly village, town, city ly P s , i P s +1, j 12-1
Cost Function • Type change: f type ( P s , i , P s +1, j ) We wish to aggregate patches with similar types u lake, pond v swamp ly sport facility ly village, town, city ly P s , i P s +1, j 12-2
Cost Function • Type change: f type ( P s , i , P s +1, j ) We wish to aggregate patches with similar types u lake, pond v swamp ly sport facility ly village, town, city ly P s , i P s +1, j 6.2 • Interior length: f length ( P s , k ) 2.9 2.8 Less length, easier to perceive 3.9 3.7 ℓ int ( P s , k ) = 19.5 12-3
Cost Function • Type change: f type ( P s , i , P s +1, j ) We wish to aggregate patches with similar types u lake, pond v swamp ly sport facility ly village, town, city ly P s , i P s +1, j 6.2 • Interior length: f length ( P s , k ) 2.9 2.8 Less length, easier to perceive 3.9 3.7 ℓ int ( P s , k ) = 19.5 12-4
Cost Function • Path Π = ( P 1, i 1 , P 2, i 2 , . . . , P t , i t ) 13-1
Cost Function • Path Π = ( P 1, i 1 , P 2, i 2 , . . . , P t , i t ) t − 1 � g type ( Π ) = f type ( P s , i s , P s +1, i s +1 ) s =1 t − 1 � g length ( Π ) = f length ( P s , i s ) s =2 13-2
Cost Function • Path Π = ( P 1, i 1 , P 2, i 2 , . . . , P t , i t ) t − 1 � g type ( Π ) = f type ( P s , i s , P s +1, i s +1 ) s =1 t − 1 � g length ( Π ) = f length ( P s , i s ) s =2 • Combination of the two costs: g ( Π ) = (1 − λ ) g type ( Π ) + λ g length ( Π ) 13-3
Cost Function • Path Π = ( P 1, i 1 , P 2, i 2 , . . . , P t , i t ) t − 1 � g type ( Π ) = f type ( P s , i s , P s +1, i s +1 ) s =1 t − 1 � g length ( Π ) = f length ( P s , i s ) s =2 • Combination of the two costs: g ( Π ) = (1 − λ ) g type ( Π ) + λ g length ( Π ) λ = 0.5 13-4
⋆ Algorithm A • A best-first search algorithm. Find a path from s to t s t 14-1
⋆ Algorithm A • A best-first search algorithm. Find a path from s to t • Cost function: F ( u ) = g ( u ) + h ( u ) – g ( u ): exact cost of s - u path – h ( u ): estimated cost of shortest u - t path u g ( u ) s h ( u ) t 14-2
⋆ Algorithm A • A best-first search algorithm. Find a path from s to t • Cost function: F ( u ) = g ( u ) + h ( u ) – g ( u ): exact cost of s - u path – h ( u ): estimated cost of shortest u - t path u g ( u ) s h ( u ) t • Guarantees a shortest path if h ( u ) is smaller than real cost 14-3
⋆ Algorithm A • A best-first search algorithm. Find a path from s to t • Cost function: F ( u ) = g ( u ) + h ( u ) – g ( u ): exact cost of s - u path – h ( u ): estimated cost of shortest u - t path u g ( u ) s h ( u ) t • Guarantees a shortest path if h ( u ) is smaller than real cost • Helps ignore some paths 14-4
Estimating Cost • h type ( P t , i ) = � n − 1 s = t f type ( P s , i s , P s +1, i s +1 ) We assume: Each patch immediately gets the target type. P 2, i 2 P 3, i 3 P 4, i 4 P 5, i 5 u g ( u ) s h ( u ) t 15-1
Estimating Cost • h type ( P t , i ) = � n − 1 s = t f type ( P s , i s , P s +1, i s +1 ) We assume: Each patch immediately gets the target type. P 2, i 2 P 3, i 3 P 4, i 4 P 5, i 5 • h length ( P t , i ) u g ( u ) s h ( u ) t 15-2
Overestimation • Try finding a path by exploring at most M = 200,000 nodes. If fail, try again but increasing estimated costs. start goal 16-1
Overestimation • Try finding a path by exploring at most M = 200,000 nodes. If fail, try again but increasing estimated costs. • A path seems more expensive, thus may be ignored start goal 16-2
Overestimation • Try finding a path by exploring at most M = 200,000 nodes. If fail, try again but increasing estimated costs. • A path seems more expensive, thus may be ignored • Not optimal anymore once increasing estimated costs start goal 16-3
Integer Linear Programming Form of an integer linear program (ILP) C T x minimize subject to Ex ≤ H , 0 x ≥ 0 0, x ∈ Z I , and 17-1
Integer Linear Programming Form of an integer linear program (ILP) C T x minimize subject to Ex ≤ H , 0 x ≥ 0 0, x ∈ Z I , and Given variables x , minimize a cost subject to some constraints. 17-2
Integer Linear Programming Form of an integer linear program (ILP) C T x minimize subject to Ex ≤ H , 0 x ≥ 0 0, x ∈ Z I , and Given variables x , minimize a cost subject to some constraints. 17-3
Using Integer Linear Programming • Model complete graph by setting variables and constraints start goal 18-1
Using Integer Linear Programming • Model complete graph by setting variables and constraints • Solve ILP with minimizing total cost start goal 18-2
Using Integer Linear Programming • Model complete graph by setting variables and constraints • Solve ILP with minimizing total cost • Define path according to values of variables, known from solution start goal 18-3
Example Variable and Constraints • Variable: x t , p , r ∈ { 0, 1 } ∀ t ∈ T , ∀ p , r ∈ P x t , p , r = 1 ⇔ p is assigned to r at time t . t = 1 t = 2 t = 3 p p p r r r q q q 19-1
Example Variable and Constraints • Variable: x t , p , r ∈ { 0, 1 } ∀ t ∈ T , ∀ p , r ∈ P x t , p , r = 1 ⇔ p is assigned to r at time t . t = 1 t = 2 t = 3 p p p r r r q q q x 1, p , r = 0 x 1, r , r = 1 x 1, q , r = 0 19-2
Example Variable and Constraints • Variable: x t , p , r ∈ { 0, 1 } ∀ t ∈ T , ∀ p , r ∈ P x t , p , r = 1 ⇔ p is assigned to r at time t . t = 1 t = 2 t = 3 p p p r r r q q q x 2, p , r = 1 x 1, p , r = 0 x 1, r , r = 1 x 2, r , r = 1 x 1, q , r = 0 x 2, q , r = 0 19-3
Example Variable and Constraints • Variable: x t , p , r ∈ { 0, 1 } ∀ t ∈ T , ∀ p , r ∈ P x t , p , r = 1 ⇔ p is assigned to r at time t . t = 1 t = 2 t = 3 p p p r r r q q q x 2, p , r = 1 x 3, p , r = 1 x 1, p , r = 0 x 1, r , r = 1 x 2, r , r = 1 x 3, r , r = 1 x 1, q , r = 0 x 2, q , r = 0 x 3, q , r = 1 19-4
Example Variable and Constraints • Variable: x t , p , r ∈ { 0, 1 } ∀ t ∈ T , ∀ p , r ∈ P x t , p , r = 1 ⇔ p is assigned to r at time t . • Constraints: p is assigned to only one polygon: � r ∈ P x t , p , r = 1 t = 1 t = 2 t = 3 p p p r r r q q q x 2, p , r = 1 x 3, p , r = 1 x 1, p , r = 0 x 1, r , r = 1 x 2, r , r = 1 x 3, r , r = 1 x 1, q , r = 0 x 2, q , r = 0 x 3, q , r = 1 19-5
Example Variable and Constraints • Variable: x t , p , r ∈ { 0, 1 } ∀ t ∈ T , ∀ p , r ∈ P x t , p , r = 1 ⇔ p is assigned to r at time t . • Constraints: p is assigned to only one polygon: � r ∈ P x t , p , r = 1 Enforce aggregation: � r ∈ P x t , r , r = n − t + 1 t = 1 t = 2 t = 3 p p p r r r q q q x 2, p , r = 1 x 3, p , r = 1 x 1, p , r = 0 x 1, r , r = 1 x 2, r , r = 1 x 3, r , r = 1 x 1, q , r = 0 x 2, q , r = 0 x 3, q , r = 1 19-6
Example Variable and Constraints • Variable: x t , p , r ∈ { 0, 1 } ∀ t ∈ T , ∀ p , r ∈ P x t , p , r = 1 ⇔ p is assigned to r at time t . • Constraints: p is assigned to only one polygon: � r ∈ P x t , p , r = 1 Enforce aggregation: � r ∈ P x t , r , r = n − t + 1 • In total, t = 1 t = 2 t = 3 5 sets of variables p p p 17 sets of constraints r r r q q q x 2, p , r = 1 x 3, p , r = 1 x 1, p , r = 0 x 1, r , r = 1 x 2, r , r = 1 x 3, r , r = 1 x 1, q , r = 0 x 2, q , r = 0 x 3, q , r = 1 19-7
Case Study • Environment: C#, CPLEX 20-1
Case Study • Environment: C#, CPLEX • Data 5,448 patches 734 patches (regions) scale 1 : 50 k scale 1 : 250 k 20-2
⋆ and ILP Comparison of A percentage of regions that were found optimal solutions percent (%) 100 A ⋆ 75 ILP 600 s 50 ILP 160 s 25 0 1–5 6–10 11–15 16–20 21–25 26–36 n : number of polygons 21
⋆ An Optimal Sequence by A 300 m start ( n = 17) goal 22-1
⋆ An Optimal Sequence by A 300 m start ( n = 17) goal 22-2
⋆ An Optimal Sequence by A 300 m start ( n = 17) goal 22-3
Recommend
More recommend