Project Info
Inspiration
PLUR (Predictive Large-Scale User Routing) was inspired by a problem that hits close to home for our team. We are all based in Los Angeles, avid concert and festival attendees, and several of us work professionally in event services and event security. We've experienced crowd management from both sides of the barricade—as staff responsible for keeping people safe and as patrons navigating massive crowds. The tragedy at Astroworld was a major catalyst for this project. It highlighted how difficult it can be for organizers to predict dangerous crowd conditions before they occur and how devastating the consequences can be when crowd dynamics are misunderstood. We've personally witnessed overcrowding, bottlenecks, and crowd crush conditions at events, and we wanted to explore how technology could help prevent similar incidents in the future. That led us to ask a simple question: What if festival organizers could simulate, optimize, and stress-test an entire event before a single attendee arrived? Our goal became building a platform that empowers organizers to make data-driven decisions about venue layouts, artist scheduling, crowd flow, and safety planning long before gates open. 🚀 What It Does PLUR combines crowd simulation, venue planning, schedule optimization, and AI-assisted decision making into a single platform designed specifically for large-scale events. Using a detailed geospatial model of a festival venue, organizers can simulate how tens of thousands of attendees move throughout the grounds. The system models: 🎤 Stages and artist performances 🚪 Entrances and exits ⭐ VIP areas 🚧 Barriers and restricted zones 🍔 Vendors and food courts 🍺 Bars and beverage stations 🚻 Restrooms and water stations 🏟️ Physical obstacles and venue infrastructure Each attendee is represented as an autonomous agent that moves throughout the venue based on artist demand, venue constraints, and crowd behavior patterns. This allows organizers to identify dangerous congestion points, bottlenecks, and potential crowd crush scenarios before the event takes place. One-Click Optimization One of PLUR's most powerful features is the Optimize button. With a single click, the platform automatically generates improved artist schedules and stage assignments based on projected attendance demand and artist popularity. The goal is to distribute crowds more effectively throughout the venue and reduce overcrowding risk without sacrificing the attendee experience. Rather than manually experimenting with hundreds of possible schedules, organizers can instantly receive optimized recommendations backed by simulation and crowd-flow analysis. AI Planning Assistants PLUR includes AI-powered assistants that help transform simulation outputs into actionable planning decisions. These AI agents can: Explain schedule and stage changes made during optimization Summarize crowd flow improvements Identify high-risk congestion areas Recommend crowd-control strategies Generate venue security briefings Suggest optimal restroom, water station, and bar placements Provide executive-level planning summaries Instead of presenting planners with raw heatmaps and density graphs, PLUR translates complex crowd dynamics into understandable recommendations. Interactive Venue Editing Event planners can also directly modify the venue itself. Users can: Move barriers Create or widen pathways Adjust vendor locations Relocate bars and beverage stations Reposition restrooms and water stations Test alternative venue layouts Every change can immediately be re-simulated, allowing planners to evaluate the impact before making real-world decisions. 🏗️ How We Built It At the core of PLUR is an agent-based crowd simulation engine powered by detailed geospatial venue data represented in GeoJSON. We modeled real-world festival environments using: Walkable areas Stages and attractions Entrances and exits VIP sections Vendor locations Restrooms and water stations Physical obstacles Restricted areas and barriers Each attendee is simulated as an independent agent navigating the venue while responding to attractions, obstacles, and crowd conditions. Running thousands of agents simultaneously allows us to generate realistic crowd-density maps and identify dangerous bottlenecks. Distributed Optimization Infrastructure To power our optimization engine, we deployed a distributed computing environment on a remote server cluster consisting of multiple virtual machine hosts totaling 44 CPU cores. This infrastructure allowed us to rapidly evaluate large numbers of artist schedule and stage assignment combinations while modeling their effects on crowd movement throughout the venue. The optimization engine considers: Artist popularity Projected attendance demand Venue layout Stage capacities Crowd movement patterns Bottleneck risk By leveraging distributed computation, organizers can evaluate complex scheduling scenarios in seconds rather than hours. AI-Powered Decision Support After each optimization run, an AI agent reviews the proposed changes and generates a human-readable explanation detailing: What changed Why the changes were made Expected crowd-flow improvements Potential tradeoffs Additional recommendations We also built specialized AI briefing agents that analyze venue layouts and simulation results to identify security risks, operational concerns, and infrastructure improvements. By combining simulation, optimization, distributed computing, geospatial modeling, and AI analysis, we created a comprehensive planning tool for large-scale events. ⚠️ Challenges We Ran Into One of our biggest challenges was balancing realism with performance. Simulating tens of thousands of attendees while maintaining an interactive user experience required significant optimization and efficient data structures. Another challenge was accurately modeling human behavior. Real crowds don't move perfectly or predictably, and small changes in venue design can dramatically alter crowd flow. Capturing those dynamics in a meaningful way required extensive experimentation and testing. Designing the optimization engine was also difficult. Popular artists naturally attract large crowds, but placing too many high-demand acts near each other—or scheduling them at conflicting times—can create dangerous conditions. We also faced the challenge of making simulation results understandable. Event organizers don't necessarily want to spend their day interpreting density maps and technical metrics—they want actionable recommendations. This challenge ultimately led to the creation of our AI-powered planning assistants. Finally, integrating venue editing, optimization, simulation, distributed infrastructure, and AI recommendations into a cohesive workflow within the limited timeframe of a hackathon was a significant challenge. 🏆 Accomplishments That We're Proud Of We're incredibly proud that we were able to build a complete end-to-end event planning platform during the hackathon. Some of our biggest accomplishments include: Building a large-scale agent-based crowd simulation system Creating a one-click optimization engine for artist scheduling and stage assignments Deploying distributed computation across a remote cluster with 44 CPU cores Developing AI agents that explain optimization decisions and generate security briefings Implementing venue editing capabilities for testing infrastructure changes Creating a system capable of identifying crowd crush risks before an event occurs Combining simulation, optimization, AI, and venue planning into a single workflow Most importantly, we're proud that PLUR addresses a real-world problem that directly impacts public safety. 📚 What We Learned This project taught us a tremendous amount about: Crowd dynamics Agent-based simulation Optimization algorithms Distributed computing Geospatial modeling AI-assisted decision making We learned how interconnected event planning really is. Artist scheduling, venue design, infrastructure placement, security operations, and attendee behavior all influence one another. A seemingly minor change—such as moving a restroom, widening a pathway, or adjusting a set time—can dramatically alter crowd flow throughout an entire venue. Perhaps most importantly, we learned that technology has the potential to make large events significantly safer when used proactively rather than reactively. 🔮 What's Next for PLUR? Our vision for PLUR extends far beyond this hackathon. In the short term, we plan to continue improving the accuracy of our simulation models, optimization algorithms, and AI planning assistants. We also want to incorporate additional real-world datasets and support increasingly complex event environments. Long term, our goal is to offer PLUR as a planning and safety platform for major event organizers and festival operators. We believe the platform could provide significant value to organizations such as Insomniac, Live Nation, and other large-scale event producers by helping them: Proactively identify safety risks Optimize event operations Improve attendee experiences Reduce crowd-related incidents Ultimately, we want PLUR to become a standard planning tool for large events—helping organizers create safer, smarter, and more enjoyable experiences for everyone.
PLUR — Predictive Large-scale User Routing
Crowd-crush prediction and mitigation tool for multi-stage music festivals. PLUR simulates how an audience moves through a venue, identifies where and when dangerous density conditions form, and gives event ops teams interactive controls — barriers, amenity repositioning, and schedule changes — to reduce risk before the event begins.
Built for the Ddoski's Lab + Anthropic + Most Technical hackathon tracks. Test venue: HARD Summer 2025, Hollywood Park, Inglewood CA (5 stages, ~80,000 attendees/day).
Disclaimer: PLUR is a planning and decision-support prototype. It is not a validated or certified life-safety system. All recommendations must be reviewed by qualified event-safety professionals.
What it does
Simulate — Run a two-tier crowd simulation across the full event day. The macroscopic layer computes per-stage populations over time; the microscopic social-force engine simulates individual agent movement and identifies crush-risk zones.
Visualize — Watch the crowd move in real time on a satellite-backed 3D map. Toggle heatmap, agent, and hotspot layers. Scrub the timeline or play back at variable speed.
Mitigate — Place and reposition physical barriers on the map by drawing them in the UI. Move restrooms, water stations, and bars to better distribute crowd load. Lock headliners and let the optimizer rearrange everything else.
Optimize — Submit your setlist to a distributed schedule optimizer running across 44 CPU cores on 7 virtual machines (6 workers + 1 coordinator). It performs parallel local search across thousands of candidate schedules, scoring each against the crowd-crush risk model, and returns the arrangement that minimizes peak density while respecting locked headliner slots.
Brief — Generate a Claude-powered plain-text safety briefing covering risk windows, stage-by-stage danger levels, actionable ops recommendations, and specific suggestions for repositioning amenities based on current hotspot locations.
How the simulation works
PLUR uses a two-tier engine:
- Macroscopic layer — analytic model covering the full event day. Computes per-stage population over time using artist draw scores (from Last.fm) and crowd migration between stages. Identifies risk windows where density is likely to spike.
- Microscopic layer — Helbing–Molnár social-force simulation run on a chosen time window (~5,000 subsampled agents, each representing ~16 real people). Uses numba JIT compilation and spatial hashing for real-time performance.
Risk is defined as density ρ (people/m²) and pressure P = ρ × var(local_velocity). Cells at ρ ≥ 6 or with a pressure spike are flagged red.
Schedule optimizer — distributed cluster
The schedule optimizer runs on a dedicated compute cluster:
- 7 virtual machines — 1 coordinator + 6 workers
- 44 CPU cores total across all nodes
- joblib + parallel local search — the coordinator distributes candidate schedule perturbations across workers, each of which scores the candidate against the macroscopic risk model
- Headliner slots can be locked in the Set Times interface; the optimizer only moves unlocked artists
- Returns the proposed schedule, risk score before/after, a list of changes, and a Claude-generated plain-text rationale explaining each move
Architecture
Browser (localhost)
React + deck.gl + MapLibre GL (Esri satellite tiles — no token required)
↕ HTTP
Backend (FastAPI, Python 3.12)
├── VenueLoader GeoJSON → occupancy grid, UTM projection (EPSG:32611)
├── DemandService Last.fm + Ticketmaster → artist draw + affinity matrix (cached)
├── MacroModel Share-of-audience timeline, risk window detection
├── MicroSim numba social-force engine with spatial hashing
├── RiskAnalyzer Density/pressure → zones, hotspots
├── ScheduleOptimizer Distributed local search — 44 cores / 7 VMs (6 workers + 1 coord)
├── MitigationPlanner Barrier/staff heuristics + sim validation
├── PLURAgent Claude-powered schedule rationale and safety briefing
└── ProjectStore Redis-backed project persistence
Setup
Prerequisites
- Python 3.12
- Node.js 18+
- Redis (running on
localhost:6379) - Last.fm API key (free at last.fm/api)
- Anthropic API key (for the Claude safety briefing endpoint)
Backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export LASTFM_API_KEY=your_key_here
export ANTHROPIC_API_KEY=your_key_here
export REDIS_URL=redis://localhost:6379 # default if omitted
cd backend
uvicorn main:app --reload --port 8000
Interactive API docs: http://localhost:8000/docs
Frontend
cd frontend
npm install
npm run dev
Opens at http://localhost:5173. API calls proxy to http://localhost:8000.
API Endpoints
Health
| Method | Path | Description |
|---|---|---|
GET | / | Health check, returns version |
Venues
| Method | Path | Description |
|---|---|---|
GET | /venues/{venue_id} | Full venue GeoJSON, grid metadata, stages, gates, facilities |
Projects
| Method | Path | Description |
|---|---|---|
GET | /projects | List all saved projects |
POST | /projects | Create a new project |
GET | /projects/{id} | Get project by ID |
PUT | /projects/{id} | Update setlist, artists, or metadata |
DELETE | /projects/{id} | Delete a project |
GET | /projects/{id}/sim | Retrieve last saved simulation result |
Simulation
| Method | Path | Description |
|---|---|---|
POST | /simulate_festival | Run full macro + micro sim; returns agent frames, hotspots |
POST /simulate_festival body:
{
"venue_id": "hard_summer_2025",
"project_id": "abc123",
"setlist": [{ "artist": "string", "stage": "string", "start": "HH:MM", "end": "HH:MM" }],
"sliders": { "max_capacity": 80000, "tickets_sold": 60000, "n_agents": 5000 },
"barriers": [[[lon, lat], ...]],
"density_red": 6.0
}
Optimization
| Method | Path | Description |
|---|---|---|
POST | /optimize_schedule | Distributed local-search optimizer; returns proposed schedule, risk delta, and Claude rationale |
POST | /safety_briefing | Claude-generated safety briefing with amenity placement advice |
POST | /demand/scores | Artist draw scores from Last.fm cache |
POST /optimize_schedule body:
{
"venue_id": "hard_summer_2025",
"setlist": [...],
"headliners": ["Artist A", "Artist B"],
"sliders": { "max_capacity": 80000, "tickets_sold": 60000 }
}
POST /optimize_schedule response:
{
"proposed_schedule": [...],
"risk_before": 0.82,
"risk_after": 0.54,
"changes": [{ "artist": "...", "from_stage": "...", "to_stage": "...", ... }],
"rationale": "Plain-text Claude rationale..."
}
POST /safety_briefing body:
{
"venue_id": "hard_summer_2025",
"setlist": [...],
"sliders": { "max_capacity": 80000, "tickets_sold": 60000 },
"peak_density": 4.7,
"hotspots": [...],
"amenities": [{ "id": "...", "name": "...", "facility_type": "restroom|water|bar", "lat": 0.0, "lon": 0.0 }]
}
Interactive controls
Barriers
Draw crowd-control barriers directly on the map. Click Place Barrier then click anywhere on the venue. Select a barrier to drag, resize, or rotate it. Barriers are included as obstacles in the next simulation run.
Amenities
Restrooms, water stations, and bars are displayed as interactive dots on the map. Click to select, drag to reposition. Their positions are forwarded to the Claude safety briefing, which will suggest specific moves to reduce wait times and distribute crowd load away from hotspots.
Set Times
Drag-and-drop artists between stage slots. Double-click a slot to lock it (headliner protection). Use Auto-fill to distribute unassigned artists automatically or upload a .txt roster. Submit to the optimizer when ready.
Venue data
Venue files live under backend/data/venues/<venue_id>/:
venue.geojson # FeatureCollection: walkable area, obstacles, stages, gates, facilities (WGS84)
meta.json # name, origin_lonlat, utm_epsg, grid_cell_m, capacity
The bundled venue is hard_summer_2025 (Hollywood Park, Inglewood CA). All simulation math uses UTM Zone 11N (EPSG:32611) in meters; the frontend receives WGS84 lon/lat.
Risk thresholds
| Density | Level |
|---|---|
| < 3 p/m² | Green — comfortable |
| 3–4 p/m² | Yellow — busy |
| 4–6 p/m² | Orange — caution |
| ≥ 6 p/m² or pressure spike | Red — crush risk |
Orange and red thresholds are adjustable per-project via the control panel sliders.
Data sources
- Last.fm API (primary) —
artist.getInfo,geo.getTopArtists,artist.getSimilar,artist.getTopTags. Free, key only. - Ticketmaster Discovery API (secondary) — venue capacities as live-demand proxy. Free tier, 5k req/day.
All API responses are cached to backend/data/cache/*.json. The demo never calls live APIs.
Tech stack
| Layer | Libraries |
|---|---|
| Frontend | React 19, Vite, deck.gl 9, MapLibre GL 5, react-map-gl |
| Backend | Python 3.12, FastAPI, uvicorn, numba, numpy, scipy |
| GIS | shapely, pyproj (UTM projection) |
| Parallelism | joblib — 44 cores across 7 VMs for schedule optimization |
| Storage | Redis (asyncio, project persistence) |
| AI | Anthropic Claude (schedule rationale and safety briefing) |
Analysis
View
Metric
- 12
- 6
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- RedisIn code
8 of 8 appear in the indexed code.
AI coding agents
- Claude CodeConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
315 KB
Source files
46
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
evanesmiller/PLUR
59 files · 672 KB · @ 4fdc447
Structure
Interface
7 files · 12%Screens, components and styles rendered to the user.
API & routing
1 file · 2%Request entry points: routes, handlers and controllers.
Application logic
28 files · 47%Domain rules, services and shared utilities.
+5 more
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- JavaScript44%
- Python34%
- Markdown22%
- CSS1%
- HTML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
requirements.txt
pypi · 16- anthropic
- dask[distributed]
- fastapi
- joblib
- llvmlite
- numba
- numpy
- pandas
- pyproj
- python-dotenv
- redis
- requests
- scipy
- shapely
- uvicorn[standard]
- websockets
frontend/package.json
npm · 15- deck.gl
- maplibre-gl
- react
- react-dom
- react-map-gl
- react-router-dom
- +9 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.