Research Article

TPA: A Two-Phase Approach Using Simulated Annealing for the Optimization of Census Taker Routes in Mexico

Algorithm 3

Verify crossings.
(1)    verifyCrossings (
   /  verifyLineIntersection( ) returns true if the two lines intersect /
(2)    begin
(3)     
(4)     
(5)     
      / verify self crossings /
(6)     for  every edge    of block    do
(7)      
(8)     end
(9)     
      / verify crossings with block /
(10)  for  every edge    of block    do
(11)   
(12)  end
(13)  return (selfCrossings  or  otherCrossings)
(14) end