This document outlines a Tkinter-based simulation framework for an Adaptive Zoning and Dynamic Prioritization (AZDP) elevator control system designed for high-rise, mixed-use buildings. The system integrates ENP system(view ) to optimize traffic flow, dynamically adjust elevator zones, and prioritize passenger requests using a weighted scoring system.
Elevator systems in modern high-rise buildings face challenges such as minimizing wait times, optimizing resource allocation, and handling varying traffic patterns. The AZDP system addresses these by:
- Dynamic zoning: Clustering requests to assign elevators to specific zones.
- Dynamic prioritization: Calculating priority scores for requests based on waiting time, distance, elevator capacity, direction, and VIP status.
The AZDP simulation models the following components:
- Building Model: Configurable number of floors (
NUM_FLOORS
) and mixed-use profiles. - Elevator Model: Set of elevators (
NUM_ELEVATORS
) with capacity (ELEVATOR_CAPACITY
). - Traffic Generator: Simulates passenger requests based on time-of-day profiles and floor usage.
- Dynamic Zoning Algorithm: K-Means clustering using
scikit-learn
to assign elevator zones. - Prioritization Engine: Calculates priority scores using weighted factors.
- Dispatching Logic: Assigns elevators using proximity, score, and zone association.
- Simulation Engine: Processes requests and moves elevators in discrete time steps.
- Tkinter GUI: Basic visualization of simulation progress.
Passenger requests are generated probabilistically using time-of-day (rush hour, lunch, etc.) and floor type (apartment vs. office).
Dynamic elevator zones are determined via K-Means clustering:
- Data Collection: Historical request data (origin/destination floors) is collected.
- Feature Extraction: Requests are represented as points in 2D space (origin and destination).
- Clustering: Cluster data into
NUM_ELEVATORS
zones using K-Means. - Zone Assignment: Elevators are assigned to centroids of clusters.
- Periodic Update: Zones update every
ZONING_UPDATE_INTERVAL
seconds.
Each request's priority score (
-
$w_t, w_d, w_c, w_{dir}, w_{vip}$ : Weights for waiting time, distance, capacity, direction, and VIP status. -
$t$ : Waiting time (seconds). -
$d$ : Distance to closest elevator (floors). -
$C$ : Capacity factor (1 if not full, 0.5 if full). -
$D$ : Direction factor (1.2 if elevator matches passenger direction, else 1). -
$V$ : VIP status (1 if true).
The distance formula is:
Requests are assigned elevators using priority scores, preferring same-zone elevators.
- Clone the repository:
git clone https://github.com/Ziqian-Huang0607/AZDP_Elevator_Algorithm cd AZDP_Elevator_Algorithm
Install dependencies:
pip install numpy scikit-learn matplotlib numba tkinter
Configure parameters in Simulated_Building_Algorithm.py (e.g., NUM_FLOORS, ENP_weights).
Run the simulation:
python Simulated_Building_Algorithm.py
- Real-World Considerations Robustness: Handle outages and failures. Hardware Integration: Implement on microcontrollers with low-level code. Certification: Comply with safety regulations. Security: Secure control interfaces. Copy