|
|
|
This applet evaluates a search path in a certain simple polygon via the search ratio as well as a number of search algorithms and algorithms for computing the optimal search path.
For this first a polygon has to be drawn in the drawing area. As soon as the polygon is complete the visibility cuts will be shown as green lines. Then you can either draw a search path by hand or choose a search path generating algorithm. The start point is always the first point of the polygon, but it can be changed via rightclicking a different point and choosing "Path start" in the popup context menu.
As soon as a polygon and a search path have been drawn the search ratio is computed and drawn in.
Black lines mark the search path, blue lines the path to the polygon point with the highest search ratio
taking the route along the search path and red lines the shortest path to that point. The search ratio of each reflex
vertex is drawn next to it.
Additionally a second search path is calculated and drawn in pink. This improved search path cuts the visibility cuts in the same order and points
as the original search path, but it connects these points with the shortest paths respectively. All detours the original
search path might contain are eliminated by this.
The search ratio of the original search path is shown at "SR", the search ratio of the improved search path
is shown at "Imp. SR".
The automatic computing of the search ratio can be turned off by unchecking "auto compute", the search ratio is then only calculated by clicking the "Compute" button. The "Convert" button converts a generated path into an editable one.
A list with all implemented search algorithms/search path generators can be found here.
The search ratio is used to evaluate the quality of a certain search path in a certain polygon.
The search ratio of a single point p is set as the ratio of the route a long the search path to p and
the shortest path to p possible.

For multiple targets the search ratio for each target has to be computed, the highest of these search ratio denotes then
the search ratio of the entire search path. For a whole polygon all points would have to be evaluated. Fortunately it can
be proven that only the reflex vertices which make up the visibility cuts have to be evaluated:

Author: Jörg Wegener
Adapted from: Fleischer, R; Kamphans, T.; Klein,R.; Langetepe, E.; Trippen, G.: Competitive online approximation of the optimal search ratio, Siam J. Comput. (2008), 881–898.