Python programming vehicle parking management
Python programming vehicle parking management
Submitted by
RAJAGURU S (310624105087)
PUHALVANAN RS (310624105085)
SANTHOSH S (310624105102)
MANIKANDAN P (310624105064)
YEAR / SEMESTER: I / II
March 2025
1
1
EASWARI ENGINEERING COLLEGE
(An Autonomous Institution)
Bharathi Salai, Ramapuram, Chennai-89
DEPARTMENT OF ROBOTICS AND AUTOMATION
CERTIFICATE
2
2
Contents
Abstract 3
1
Implementation 6
4
Output 10
6
Conclusion 16
8
References 16
9
3
Abstract
his project aims to develop a comprehensive Vehicle
T
Management System (VMS) using Python, designed to
streamline the management of vehicles within organizations,
rental services, or fleet operations. The system enables
efficient data management by maintaining records of vehicle
details, owner information, service history, and availability
status. Users canregisternewvehicles,updateexistingdata,
andretrieveinformationthroughauser-friendlyinterface.The
project leverages Python's libraries fordatabaseintegration,
ensuring secure and scalable data storage. Additionally, it
includes features for real-time notifications for vehicle
maintenance, optimized search functionalities, and
customizable reports to improve decision-making. The
proposed VMS aims to reduce administrative overhead,
improve operational efficiency, and enhance the overalluser
experience.
3
4
Problem Definition
5
ALGORITHM
[Font Size; Times new roman 14, line
space1.5] [Max 2 pages]
Step 1: start
Step 2: Initialization
Step 3: Vehicle Entry Process
Step 4:Parking Slot Allocation
Step 5: Vehicle Exit Processing
Step 6: Monitoring & Optimization
Step 7: Security Measures
Step 8: stop
6
6
Software Requirements
o run this project, the following software and tools are
T
required:
• P ython: Version 3.x (The code uses Python's
built-in-functions).
• d atetime: – Used to manage parking timestamps,
calculate the duration, and determine total cost.
• O perating System: The program can run on any
platform that supports Python, including Windows,
macOS, and Linux.
5
7
Implementation
he implementation of the vehicle parking management
T
involves the following key steps:
● Define the vehicle Class:
○ Stores details like vehicle ID, brand, model, year,
vehicle type, and automatically logs parking time.
○ Calculates billing based on predefined rates
Implement theParkingManagementSystem Class:
○ A llows creation and management of multiple
parking lots.
○ Facilitates interaction through a menu-driven
interface.
● Automate Billing Logic:
○ Computes parking duration dynamically using
timestamps.
● Add Data Export Functionality:
○ Exports parking data to CSV for record-keeping.
● Enhance User Interface:
○ Implements an interactive CLI (Command Line
Interface).
6
8
Source Code
from datetime import datetime
class Vehicle:
def __init__(self, vehicle_id, brand, model, year, vehicle_type):
self.vehicle_id = vehicle_id
self.brand = brand
self.model = model
self.year = year
self.vehicle_type = vehicle_type
self.parking_datetime = datetime.now()
def get_rate(self):
rates = {"bike": 20, "car": 40, "6-wheeler": 60} # Rates based on vehicle
type
return rates.get(self.vehicle_type, 0) # Default to 0 if type is invalid
def calculate_cost(self):
current_datetime = datetime.now()
duration = (current_datetime - self.parking_datetime).total_seconds() /
3600
return self.get_rate() * duration, duration
def __str__(self):
return (
f"ID: {self.vehicle_id}, Brand: {self.brand}, Model: {self.model}, Year:
{self.year}, "
f"Type: {self.vehicle_type}, Parking DateTime:
{self.parking_datetime}"
)
class VehicleManagementSystem:
def __init__(self, total_space=1000):
7
9
s elf.vehicles = []
self.total_space = total_space
self.remaining_space = total_space
def view_vehicles(self):
if not self.vehicles:
print("No vehicles available!")
return
for vehicle in self.vehicles:
print(vehicle)
def view_remaining_space(self):
print(f"Remaining parking spaces: {self.remaining_space}")
def main():
system = VehicleManagementSystem()
8
10
while True:
print("\nVehicle Management System")
print("1. Add Vehicle")
print("2. View Vehicles")
print("3. Remove Vehicle (Calculate Bill)")
print("4. View Remaining Space")
print("5. Exit")
choice = input("Enter your choice: ")
9
11
Output
1.Adding a Vehicle:
When a vehicle is added, it automatically logs the
~
current date and time and updates the remaining parking
spaces.
~Example Output:
Vehicle added successfully!
2.Viewing Vehicles:
Lists all the parked vehicles with their details such as
~
ID, brand, model, year, type, and parking date and time.
~Example Output:
I D: V001, Brand: Honda, Model: Activa, Year:
2020, Type: bike, Parking DateTime: 2025-04-10 11:45:23
12
rates (, , and ).
~Example Output:
Billing for Vehicle ID: V001
Total Duration: 3.50 hours
Total Cost: 70.00 Rs
Vehicle removed successfully!
5.Exit Message:
~Ends the program with a friendly exit message.
~Example Output:
Exiting the system. Goodbye!
11
13
OUTPUT IMAGE:
1.ADDING IMAGE
2.VIEW VEHICLE
12
14
3.VIEW REMAINING SPACE
4.REMOVE VEHICLE
13
15
5.EXIT
14
16
Future Enhancement
• Mobile App Integration:
evelopamobileappforuserstoreserveparkingspots,
D
view availability, and pay bills remotely.
• Parking Slot Assignment:
ynamically allocate specific slots to vehicles and
D
provide real-time tracking of slot occupancy.
• EV Charging Stations:
I ntegrate electric vehicle (EV) charging options with
real-time charging status and pricing.
• Loyalty Programs:
I mplementasystemforfrequentuserstoearnpointsand
redeem discounts.
• Advanced Revenue Analytics:
rovide detailed dashboardswithrevenuepatterns,peak
P
usage hours, and customer insights.
15
17
Conclusion
he Vehicle Management System effectively addresses the
T
challenges faced in modern parking management by
automating processes, enhancing efficiency, and improving
user experience. By integrating dynamic billing, real-time
space tracking, and streamlined vehicle management, the
system minimizes manual intervention and errors.
Key achievements include:
1 .Automated Operations: Accurate billing based on parking
duration and vehicle type.
2 .OptimizedSpaceUtilization:Effectiveallocationofparking
spaces to different vehicle categories.
3 .Enhanced Data Management: Reliable tracking of parked
vehicles and exportable records for analysis
4 .Scalability: Supportformultipleparkinglotsandadvanced
features like analytics and penalties.
References
Python Documentation (Turtle Graphics):https://docs.python.org/3/library/turtle.html
https://www.python.org/
16
18