Parking model for the parking lot in Zhixue station
Final project for class of simulation study at fall 2024

The cover image shows Zhixue Station and the surrounding parking facilities of Taiwan Railway Co., Ltd., captured from Google Maps on December 29, 2024.
Introduction
Zhixue Station is one of the railway stations in Hualien County, located near National Dong Hwa University (NDHU). The station often faces a shortage of parking spaces, especially during holidays and weekends. It serves not only local residents but also NDHU students. However, due to the lack of maintenance and awareness, this issue significantly impacts students from the nearby university and causes inconvenience to local residents of Zhixue Village.
When we heard that the Zhixue Station parking lot would undergo a renovation (NDHU, 2023), we became curious about how much the shortage of parking spaces could improve after the renovation.
To explore this, we conducted a survey of pedestrian traffic at the station entrances and exits and collected data on commuting patterns, transportation methods, and other details from residents, students, and office workers. Our goal is to compare the situation before and after the renovation of the parking lot through simulation experiments. Due to time constraints, this report will focus on our simulation of vehicle flow in the parking lot on weekdays (Monday to Thursday).
Motivation and Background
As NDHU students, we often struggle with the lack of parking space, especially during busy times. This problem affects our motivation to find the best way to solve it. It’s a common issue in areas where public transport stations are near schools or homes. The increasing use of private vehicles, combined with limited land, makes the problem worse.
At Zhixue Station, the lack of parking spaces impacts both NDHU students who rely on the station to commute and local residents. The planned renovation of the parking lot could help, but without careful study, we don’t know if it will truly solve the problem or just move it elsewhere. This study aims to provide clear insight into the current parking situation and what might happen after the renovation.
Objectives and Scope
The primary objective of this study is to evaluate the impact of the planned renovation of the Zhixue station parking lot on alleviating parking shortages. To achieve this, we aim to:
- Develop a comprehensive vehicle flow model for weekdays (Monday to Thursday) based on collected data.
- Simulate pre- and post-renovation parking scenarios to assess the effectiveness of the proposed changes.
- Identify key factors contributing to parking shortages, such as peak hours, commuting patterns, and user demographics.
- Provide actionable recommendations for further improvements to parking facilities and traffic management.
Methodology
First, we designed a questionnaire using Google Forms based on the data requirements anticipated for the proposed simulation. This questionnaire aimed to collect relevant information to effectively support the modeling process.
Next, following the guidelines from Teacher Chia-Li Wang’s course (Chia-Li Wang, 2024) and the textbook Simulation Modeling and Analysis (4th ed.) by A. M. Law and W. D. Kelton (2007), we deconstructed the simulation experiment into its core components: variables, events, counters, and flowcharts. This systematic breakdown allowed us to visualize and understand each step of the simulation process more intuitively.
Finally, we developed a complete simulation experiment that can run under different scenarios by adjusting the initial parameters.
Questionnaire and data collection
To collect data, we conducted a survey at Zhixue Station. Our survey included five questions: the purpose of transport, whether passengers entered or exited, the type of vehicle parked at the station, preferred mode of transport, and willingness to pay a parking fee. We gathered responses by asking passengers to fill out a Google Form via a QR code or by direct questioning.
Data were collected during two peak periods: from 6:00 am to 8:00 am and from 5:00 PM to 7:00 PM. These times were chosen because many residents and students commute to school or work by train in the morning and return home in the evening.
The survey was conducted from Wednesday to Thursday, excluding Monday, Friday and the weekend. These days were omitted because they do not represent typical peak periods and are less consistent in terms of passenger activity.
State Variables
- Time variables
In the simulation, we use two time variables, namely ‘$t$’ and ‘$clock$’. Here, ‘$t$’ refers to the current simulation time, while ‘$clock$’ represents the time of day (24-hour format).
- Number of passengers
Used to record the number of passengers, as well as the entry and exit counts of cars, motorcycles, bicycles, and pedestrians, stored in ‘$passenger\_list$’.
- Parking spaces
Here, we use ‘$remain\_car\_parking\_space$’ and ‘$remain\_motorcycle\_parking\_space$’ to record the remaining parking spaces for cars and motorcycles, respectively. Since this station does not have dedicated bicycle parking, passengers will park their bicycles in motorcycle spaces. Considering the size of the parking space, we set one motorcycle parking space to accommodate two bicycles.
- Vehicles parked
Used to record the parking status of vehicles in the parking lot, e.g. ‘$car\_parked$’, ‘$motorcycle\_parked$’, and ‘$bicycle\_parked$’.
Type of Events
- Update event
We use the update event to generate the number of passengers for an hour based on a normal distribution. Using the generated number of passengers, we then determine the entry and exit counts of various vehicles in the parking lot.
- Bicycle and vehicles park event
To better reflect reality, in addition to creating the ‘$vehicle\_parked\_event$’, we also designed the ‘$bicycle\_parked\_in\_motorcycle\_space\_event$’ specifically for bicycles. To simplify the simulation workload, we assume that a bicycle will prioritize parking in a motorcycle space that already contains other bicycles.
- Bicycle and vehicles leave event
Similar to the previous event, in addition to creating the ‘$vehicle\_left\_event$’, we also created the ‘$bicycle\_left\_motorcycle\_space\_event$’.
Flowcharts
To facilitate a better simulation, we have created the following flowchart.
To facilitate a better simulation, we have created the following flowchart.





Variance Reduction: Control variate
For $i = 1, 2, \cdots, 24$, the number of passenger at station at the $i$ th hour, $P_i$, which has a distribution with mean $\mu_i$ and variance $\sigma^2_i$. And for $i = 1, 2, \cdots, 24$, given the following constant parameters:
- $\mu_i$ and $\sigma^2_i$.
- The proportion of passengers who go into station at the $i$ th hour, $a_i$.
- The proportion of bike, car and motorcycle usage in passengers who go into station or go out off station at the $i$ th hour, denoted $b_{in_i}$, $b_{out_i}$, $c_{in_i}$, $c_{out_i}$, $m_{in_i}$, $m_{out_i}$.
We define number of bike, car and motorcycle in the parking lot at the $i$ th hour are: \begin{align*} & B_i = B_{i-1} + P_i \times a_i \times b_{in_i} - P_i \times (1 - a_i) \times b_{out_i} \\ & C_i = C_{i-1} + P_i \times a_i \times c_{in_i} - P_i \times (1 - a_i) \times c_{out_i} \\ & M_i = M_{i-1} + P_i \times a_i \times m_{in_i} - P_i \times (1 - a_i) \times m_{out_i} \\ \end{align*}
Note that the number of bike, car and motorcycle in the parking lot at the $1$ th hour is \begin{align*} B_1 = B_{24}(\text{last day}) + P_1 \times a_1 \times b_{in_1} - P_1 \times (1 - a_1) \times b_{out_1}. \end{align*}
If we simulate $N$ days, and for $i = 1, 2, \cdots, 24$, the sample mean of number of bike, car and motorcycle in the parking lot at the $i$th hour are \begin{align*} & \overline{B_i} = \frac{1}{N} \sum_{n = 1}^{N} B_{i_n}, \\ \end{align*} similarly to $\overline{M_i}$ and $\overline{C_i}$.
And we apply the control variates for $\overline{B_i}$, $\overline{C_i}$ and $\overline{M_i}$, respectively. Then we adopt the following estimators to estimate the number of bike, car and motorcycle in the parking lot at the $i$ th hour: \begin{align*} & \overline{B_i} + \overline{c_{i_1}^*}(\overline{P_i} - \mu_i) \\ & \overline{C_i} + \overline{c_{i_2}^*}(\overline{P_i} - \mu_i) \\ & \overline{M_i} + \overline{c_{i_3}^*}(\overline{P_i} - \mu_i) \end{align*} , where \begin{align*} \overline{c_{i_1}^{*}} = -\frac{\overline{Cov}(B_i, P_i)}{Var(P_i)} = -\frac{\overline{Cov}(B_i, P_i)}{\sigma_i^2} \end{align*} and \begin{align*} \overline{Cov}(B_i, P_i) = \frac{1}{N} \sum_{n = 1}^{N} (B_{i_n} - \overline{B_i})(P_{i_n} - \mu_i) \end{align*} , similarly to $\overline{c_{i_2}^*}$ and $\overline{c_{i_3}^*}$.
Simulation and Experimental Results
Experimental Environment
Hardware Environment
- Processor (CPU): Intel Core(TM) i7-13700
- Memory (RAM): 32GB DDR4
- Graphics Card (GPU): None
- Operating System: Windows 11 Pro (Version 24H2, OS Build 26100.2605)
Software Environment
- Programming Language: Python 3.12.8
- Development Tool: Visual Studio Code (v1.96.2)
- Relevant Libraries:
- numpy (v2.2.1)
- pandas (v2.2.3)
- tqdm (v4.67.1)
- matplotlib (v3.10.0)
- imageio (v2.36.1)
The three simulations
We work with three simulation which are unlimited parking space, current and expanded parking space.
Unlimited parking space
In this scenario, we assumed no restrictions on parking capacity, allowing the system to determine the number of people entering and exiting the station. The goal was to calculate the resulting number of bicycles, motorcycles, and vehicles parked at the station during both normal and peak hours.
Pre-Renovation Parking Lot
Based on our survey of Zhixue Station, we calculated the existing number of designated parking spaces. This scenario aimed to determine the exact capacity of the current parking infrastructure and its ability to meet demand.

Satellite image of Zhixue station. Post-Renovation Parking Lot
This scenario explored the potential benefits of increasing the parking capacity at the station. The expansion was intended to alleviate the pressure caused by the lack of parking spaces and improve overall accessibility.

Post-renovation plan of Zhixue station.
Scenario 1: Unlimited Parking Spaces
Under the scenario of unlimited parking spaces, our simulation reveals that when maintaining a 1:1.6 ratio of passengers entering and exiting, the number of parked cars, motorcycles, and bicycles gradually increases over time. This indicates that under general weekday conditions, our model show that daily demand slightly exceeds that of the previous day.
Scenario 2: Pre-Renovation Parking Lot
In this scenario, we set the parking spaces as follows to simulate the changes in vehicle numbers under weekday conditions before the parking lot renovation.
We observe two main trends in this scenario. First, for the daily data, we see diminishing trends in cars, motorcycles, and bicycles from 7:00 to 17:00, eventually stabilizing. Additionally, the number of car enter and exits fluctuates dynamically, following a certain distribution.
Secondly, the capacity of the pre-renovation parking lot can accommodate approximately 600 or more motorcycles and bicycles, and around 50 cars.
Scenario 3: Post-Renovation Parking Lot
In this scenario, we set the parking spaces to simulate the changes in vehicle numbers under weekday conditions after the parking lot renovation.
The post-renovation parking lot has increased its capacity to accommodate more vehicles. As a result, the parking lot can now accommodate approximately 1000-1200 motorcycles and bicycles, and around 60-70 cars.
Conclusions and Discussions
In this project, we survey the station to obtain the flow of vehicles and passenger enter and exits into the stations. To understand well, we conducted a survey by using Google Form questionnaire, the question consists of enter and exits of station, mode of vehicle to station and willingness of paying parking fee. In the simulation study, we set out three scenario namely, unlimited parking space, pre-renovation parking lot and post-renovation parking lot. we focusing on vehicle park in station whereas, others variables are served as to check the bug of code.Our study shown that post-renovation has increase its capability to meet the demand of parking, and long-term parked is the key contribution to lack of parking space.


Future Works
In the future, we will continue to optimize this model by incorporating data for weekends, holidays, and other factors to refine the simulation.
The scope of this study is currently limited to weekday scenarios due to time and data constraints. Future extensions will include:
- Weekend and holiday data to capture a broader range of commuting behaviors.
- Integration of additional factors such as weather conditions and special events.
- Collaboration with local authorities to refine the model and implement practical solutions.
- Developing the impact of parking fees on parking demand.
See Also
- Our GitHub project at https://github.com/Josh-test-lab/parking-lot-simulation.

Our GitHub project. - Original Report Download.
References
- 李婉寧. (2015). 路外停車場服務評鑑指標設計之研究:以台北市公有委外平面停車場為例. 臺灣博碩論文知識加值系統. https://hdl.handle.net/11296/zzqjxr
- 法務部. (2022). 利用空地申請設置臨時路外停車場辦法. 全國法規資料庫. https://law.moj.gov.tw/LawClass/LawAll.aspx?pcode=K0040034
- 張存薇. (2018). 台東火車站汽機車停車收費 10月上路. 自由時報. https://news.ltn.com.tw/news/life/breakingnews/2555469
- 國立東華大學. (2023). 花蓮縣議會徐雪玉副議長協調臺鐵局增設志學站前停車場,解決東華學子及居民停車問題. 東華新聞. https://www.ndhu.edu.tw/p/406-1000-213698,r4956.php?Lang=zh-tw
- 國營臺灣鐵路股份有限公司. (2023). 停車場收費標準一覽表. https://www.railway.gov.tw/tra-tip-web/tip/file/bc00c5d2-2184-4dbd-bbc4-530a9a3fb83a
- 國營臺灣鐵路股份有限公司. (2024). 臺鐵每日各站點進出站人數. 政府資料開放平臺. https://data.gov.tw/dataset/8792
- 國營臺灣鐵路股份有限公司. (2024). 臺鐵每日各站點進出站人數. 交通部政府資料開放專區. https://www.motc.gov.tw/201506260001/app/govdata_list/view?module=&id=1615&uid=201705110158
- 國營臺灣鐵路股份有限公司. (2024). 臺鐵全線剩餘票. 政府資料開放平臺. https://data.gov.tw/dataset/37933
- Law, A. M., & Kelton, W. D. (2007). Simulation modeling and analysis (4th ed.). McGraw-Hill.
- Wang, C.-L. (2024). AM 609 Simulation Study. Lecture Note. National Dong Hwa University. https://sys.ndhu.edu.tw/RD/TeacherTreasury/tlist.aspx?tcher=19
- Larson, R. C., & Odoni, A. R. (1981). Urban operation research. Massachusetts Institute of Technology. https://web.mit.edu/urban_or_book/www/book/index.html







![[Thoughts] 2024 Joint Conference of University Administrators for Teacher Education](https://raw.githubusercontent.com/Josh-test-lab/website-assets-repository/refs/heads/main/posts/2024%20Joint%20Conference%20of%20University%20Administrators%20for%20Teacher%20Education/cover%20image.webp)



