Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

harshitha-809/smart-queue-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

🎒 ParkPal β€” Smart Amusement Park Planner

A real-time crowd-aware itinerary planner that helps visitors maximize their time at amusement parks by minimizing wait times.

ParkPal Preview HTML CSS JavaScript


πŸ“– Problem Statement

Amusement parks suffer from uneven crowd distribution β€” popular rides attract massive queues while other attractions stay empty. Visitors often waste 50–70% of their park time waiting in lines, missing rides entirely. ParkPal solves this by building an optimized, time-slotted itinerary based on live crowd data fed in by park operators.


✨ Features

Feature Description
πŸ—Ί Smart Itinerary Greedy scheduling algorithm routes visitors through low-crowd rides first
πŸ“Š Live Crowd Data Ride operators update occupancy in real-time via the Operator Panel
⏱ Wait Estimation Dynamic wait time model based on crowd score
πŸ“… Heatmap Hourly crowd forecast across the full park day
πŸ“€ Share Plan Native share sheet (or clipboard fallback)
β™Ώ Accessible ARIA roles, keyboard navigation, prefers-reduced-motion support
πŸ“Ά Offline-friendly Zero external API calls β€” loads on slow park Wi-Fi

πŸ— Architecture

parkpal/
β”œβ”€β”€ index.html # App shell & semantic markup
β”œβ”€β”€ css/
β”‚ β”œβ”€β”€ reset.css # Modern CSS reset
β”‚ β”œβ”€β”€ variables.css # Design tokens (colors, spacing, radius...)
β”‚ β”œβ”€β”€ layout.css # App shell, header, step nav, page structure
β”‚ β”œβ”€β”€ components.css # All UI components (cards, buttons, timeline...)
β”‚ └── animations.css # Keyframes & utility animation classes
β”œβ”€β”€ js/
β”‚ β”œβ”€β”€ utils.js # Pure functions (time conversion, crowd math)
β”‚ β”œβ”€β”€ planner.js # Core scheduling algorithm
β”‚ β”œβ”€β”€ ui.js # All DOM rendering β€” no business logic
β”‚ β”œβ”€β”€ admin.js # Operator panel (modal, slider, save)
β”‚ β”œβ”€β”€ background.js # Canvas particle background
β”‚ └── app.js # Root controller β€” state & event wiring
└── data/
 └── rides.js # Ride definitions + live crowd state

Design principles:

  • Separation of concerns β€” data, logic, rendering are fully decoupled
  • Module pattern β€” each file exposes a single IIFE namespace
  • Event delegation β€” single listener on the grid container vs one per card
  • No framework dependency β€” vanilla JS, ships as a single folder

🧠 Algorithm

planner.js implements a greedy scheduling approach:

  1. Filter the visitor's selected rides
  2. Sort by ascending crowd score (lowest wait β†’ do first)
  3. Slot rides sequentially with walk buffers (5 min) between each
  4. Skip any ride that would overrun the departure time
  5. Insert 15-minute rest breaks every 3 rides

Wait time model:

Crowd Score Formula
0 – 39 (Low) crowd ×ば぀ 0.35 min
40 – 69 (Moderate) 10 + (crowd βˆ’ 40) ×ば぀ 0.6 min
70 – 100 (High) 28 + (crowd βˆ’ 70) ×ば぀ 1.0 min

πŸš€ Getting Started

No build step required. Open index.html in any modern browser:

git clone https://github.com/harshitha-809/smart-queue-optimizer.git
cd parkpal
open index.html # macOS
# or
start index.html # Windows
# or serve with any static server:
npx serve .

πŸ”Œ Connecting a Real Backend

The data/rides.js file is the only integration point. To connect a live backend:

// Replace static data in data/rides.js with a fetch call:
async function loadRides() {
 const res = await fetch('https://your-api.com/rides/live');
 window.RIDES_DATA = await res.json();
}

Suggested stack: Firebase Realtime Database (operators update crowd %, visitors see changes instantly via WebSocket).


πŸ“± Live Demo

Open index.html directly in any browser β€” no build step, no install needed.

πŸ›£ Roadmap

  • QR code entry with pre-assigned visitor ID
  • Backend integration (Firebase / REST)
  • Park map with walking directions between rides
  • Push notifications: "Head to Thunder Coaster now β€” queue just dropped!"
  • Historical crowd analytics dashboard for park managers
  • Multi-language support

🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first.

  1. Fork the repo
  2. Create your branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'Add my feature'
  4. Push and open a PR

πŸ“„ License

MIT β€” see LICENSE for details.


Built as a solution to real crowd management problems in high-traffic entertainment venues.

About

Smart itinerary optimization system for amusement parks that minimizes wait time using crowd-aware scheduling.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /