idorobots / mall-sim Goto Github PK
View Code? Open in Web Editor NEWA simulation of movement of people at a shopping mall using Social Distances. An AGH-UST project.
A simulation of movement of people at a shopping mall using Social Distances. An AGH-UST project.
Concrete implementation of atractors - places of increased likelihood of grabbing actors attention.
Optionally we could look into various misc algorithms and actor behaviour models. Sky is the limit.
Concrete implementation of the goal system.
One of actors single-step behaviours. It should be defined in terms of actor goals and path finding.
We need to refine the actor model to add some traits of self-organization and crowding in tight places such as exits.
"Rubber-necking" and crowd atracting might be a fine idea aswell.
We need a pretty GUI with all kinds of eye-candy and nice parameter selectors.
The main window consist of two panels: one with a draggable grid and another with parameters' summary.
Można wyświetlać "jedno piętro sklepu nad drugim", tzn. np. scroll kółkiem myszy powodowałby przejście na inny poziom.
A simple visualization of a shopping mall loaded by the resource manager.
We need a well-defined internal and external actor type representation.
Actors should be defined as a set of attributes determining their goals and single-step behaviour. Each actor type should be loaded at runtime.
A set of predefined standard actor's parameters is defined in appropriate property files.
They are used as a base for the creation of real actors (parameters' values are modified in a random fashion to reflect the diversity of the real world).
Typical shopping speed:
Actors should prefer certian decisions taking Social Distances into account (i.e. waiting a bit instead of rushing through a crowded alley).
Actors should stand in a line in certian places.
We need a path-finding strategy for actors.
According to their goals actors will generate dynamically changing paths. This issue needs to identify and document various needed algoritms to achieve this.
A quick way to find all the actors in a rectangle, the nearest actors to a given point and such. Details depend on shopping mall and actor models.
Actors should find optimal paths to their goals and follow them with no respect to collisions etc.
We need a well-defined internal and external mall representation.
We can identify the following "features" of a mall:
"Waiting areas" (eg. benches) can be modelled as a goal with a small radius, relatively high attraction and long waiting time.
Examples of shops in a mall:
Parameters of shops relevant to the simulation:
Pole zawiera mapowanie atraktor->wartość przyciągania (dla danej płytki), obliczane w chwili ładowania mapy.
A map of a mall is stored in a simple graphics format (eg. BMP), where each pixel represents a cell in a CA grid. It may be useful to use each of three color components separately to encode different aspects of a cell (np. R = typ obiektu, G i B = parametry obiektu danego typu)
Attractos' parameters are stored in property files and are linked with locations based on IDs.
We need to refine the Mall representation and actor model to include queueing. This issue will identify and document the way to achieve this.
Kolejkowanie można rozwiązać poprzez traktowanie jej jak atraktora z odpowiednim gradientem (który z jednej strony będzie utrzymywał ludzi w kolumnie, z drugiej będzie niwelował siłę odpychania osoby stojącej przed danym agentem).
Atractors should modify actors paths by grabbing their attention and pulling them closer for a set duration of time.
Atractor parameters:
Atraktory nie są rozdzielone na różne klasy, tzn. że np. preferencje klienta nie mają wpływu na podatność na działanie atraktorów.
W dowolnym miejscu w promieniu atraktora może dojść do "wyzwolenia" jego działania, z tym że prawdopodobieństwo rośnie wraz ze zbliżaniem się do centrum (gdzie osiąga 100%). W takim przypadku trasa agenta zostaje zmodyfikowana: zostaje dodany nowy cel pośredni - atraktor.
Niektóre atraktory mogą operować na parametrach agenta (Visitor pattern).
We require a well-defined model of actor movement & behaviour - the cornerstone of this simulation.
The model should describe both macro (i.e. path planning) and micro (i.e. single-step decision making) actor behaviour, as well as the abstract representation of the movement (continous vs discrete, actor vs cellular automata).
Jak zauważył dr Wąs, ciągły model ruchu słabo się skaluje, stąd CA na poziomie operacyjnym wydają się dobrym rozwiązaniem.
Implementacja podstawowego mechanizmu poruszania się może opierać się na dwóch modelach:
Idea mikrosymulacji CA-Ped (2 kierunki):
Pieszy identyfikuje ilość wolnego miejsca przed sobą i wybiera "pas ruchu" umożliwiający poruszanie się z największą prędkością. W przypadku ryzyka kolizji zmienia pas ruchu, najchętniej ustawiając się za inną osobą idącą w tym samym kierunku, przeciska się obok idącej z naprzeciwka osoby bądź czeka na działanie podjęte przez drugą stronę.
Aby uniknać efektu ciągłego zachodzenia drogi osobom idącym z naprzeciwka (gdy dwa cele znajdują się po dwóch różnych stronach alejki) można ustalić pewną wartość progową różnicy między azymutem kierunku ruchu, a azymutem kierunku celu - dopiero gdy zostanie przekroczona, pieszy zaczyna zbaczać z trasy "na wprost" (tj. zaczyna zmieniać "pasy ruchu").
Na poziomie taktycznym galeria reprezentowana jest jako graf nieskierowany o ważonych krawędziach. Węzły odpowiadają skrzyżowaniom ciągów komunikacyjnych, a krawędzie łączą ze sobą te węzły, które są wzajemne osiągalne (tj. bez natrafiania na przeszkody, zakładając poruszanie się po linii idąc od jednego do drugiego). Waga krawędzi odpowiada odległości pomiędzy węzłami.
Pieszy wybiera drogę do celu poprzez szereg punktów pośrednich, starając się przy tym minimalizować konieczną do przebycia odległość.
Obecność atraktorów może wpłynąć na chwilową zmianę celu.
Usually a group consists of 2-3 persons (rarely 4):
How to avoid collision:
"Field of View" eg. rectangular area used by actors to perceive the reality (ie. to choose path, avoid colisions etc.)
The renderer should be able to rotate, zoom in and out of and drag arround the shopping mall view.
Concrete implementation of various actor types (depends on the actor model and design).
A concrete implementation of the GUI.
A simple visualization of the atractors and such (includes atractor stub without the logic).
Actor path rendering and optionally traffic visualization. The more eye-candy the better.
The actor implementation should be adjusted to bare some traits of self-organization.
A simple visualization of the actors.
An implementation of the actor model. Basic stuff such as position and "sleep-walking" for now.
[1] Wszystkie aspekty społeczno-ekonomiczno-psychologiczne wpływające na zachowanie agenta (tj. można powiedzieć - zbiór stałych opisujących preferencje agenta).
[2] Istotne dla algorytmu Ped-4.
[3] Dla algorytmu Social Force. Może to być np. mapowanie zbioru punktów-offsetów (wzgl. aktualnej pozycji i z uwzględnieniem obrotu agenta) na wartość siły.
We need a simple actor goal system - a list of places to visit.
We need a well-defined model of social interaction between actors - their distance preference in various situations and places (i.e. short distance will be accepted while in a queue, but not in other situations).
Walls tend to repel people (with a strength similar to those of other people). This may help us simulate an observed equal distribution of walkers across a street.
We may let user define a force formula (or choose from a given set of built-in functions).
Well-defined mall file format and loading.
Actors should crowd in certian places (such as tight exits, and highly atractive places).
An actor file format and loading that will include various actor types as defined in the actor model.
Internal Mall implementation with all basic operations.
Główna klasa reprezentująca galerię handlową.
Parametry:
Klasa reprezentująca fizyczną strukturę galerii, tj. siatkę pól.
Parametry:
Operacje:
Klasa reprezentująca jedno pole siatki.
Parametry:
Operacje:
[brak]
Klasa reprezentująca sieć węzłów służących do "routingu".
Parametry:
Operacje:
Klasa opisująca atraktor.
Parametry:
Operacje:
[brak]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.