POV-Ray : Newsgroups : povray.programming : Help minimizing pre-processing graphic for A* pathfinding : Help minimizing pre-processing graphic for A* pathfinding Server Time
3 May 2024 15:43:52 EDT (-0400)
  Help minimizing pre-processing graphic for A* pathfinding  
From: Bald Eagle
Date: 20 Apr 2024 17:30:00
Message: <web.66243367a935d2a61f9dae3025979125@news.povray.org>
Hi folks,

Been busy and so, many things have stalled.

We've just had the concrete floors resurfaced - it looks like they've been
ground down to fresh, clean concrete, and are likely to be sealed in the near
future.

I had talked with the VP a while back about painting various lines on the floor,
and I figured we could paint arrows in the direction of the nearest emergency
exit.

So I ran A* on a simple map of the warehouse, and it does OK.
It does take longer than I'd like to scan the image and generate the arrays of
walkable vs non-walkable pixels, and then again to solve the "maze".

The real issue I'd like to solve is that A* didn't care that the shortest path
involved exiting the building and then coming back in.  That likely violates
policy, and plus the doors are exit-only (panic bar on the inside only).

At present, I'm just using image pixel color to define where empty space or a
door is, and everything else is solid object.  (the SDL currently draws over
anything it determines as solid - regardless of the color on the map -  with a
bright green, as a means evaluating the quality of the image colors & evaluation
logic)
Also, as you can see, the color logic is cumbersome and finicky - dark red
pallets get evaluated as "doors" (walkable space) and very dark grey doesn't
register as solid (because my logic sucks that bad)

#if (((PixelColor.red + PixelColor.green + PixelColor.blue)/3 < 0.9) &
(PixelColor.red < 0.85 & (PixelColor.green + PixelColor.blue)/2 > 0.05))

#declare walkability [X][Y] = unwalkable;

I'd like:
1. A clear manner of coding a door as being one-way.  Keep in mind that the door
in the graphic may be many pixels wide/deep, and there's no color
differentiation between inside and outside.

2. I'd like a general solution, but also one that minimizes the amount of
additional work to be done before running the pathfinding from the start point
to the destination (designated meeting place)

3. Any ideas on how to minimize the search time, even though they might cost
more initial work are welcome.  The idea is to run simulations when there may be
obstacles blocking the typical posted primary fire exit path.

I've been thinking of color coding, specifying a door <x, y> coupled with a
directional vector (I currently have 22 doors), using Crossing Numbers, Voronoi,
etc.

Also of interest is finding fire extinguishers, first aid kits, and AED
defibrillators.

With regard to fire extinguishers, I asked the question: what if I need one, but
someone has already taken it?  What direction do I go to get the next closest
one?  Or the third?

I'd welcome any ideas, or even questions that help me avoid future unseen
pitfalls.

- BW


Post a reply to this message


Attachments:
Download 'a-star floorplan exits.png' (403 KB)

Preview of image 'a-star floorplan exits.png'
a-star floorplan exits.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.