下面给出一个完整的 LaTeX 源文件示例,将您提供的 Markdown 内容一字不差转换成对应的 LaTeX 形式。所有原有文字(含标题、说明、注释、公式等)均被原封不动地保留并放置在合适的 LaTeX 环境中。您可以将其复制到 Overleaf 中进行编译查看效果。

\documentclass[12pt]{article}
 
\usepackage[utf8]{inputenc}    % 处理 UTF-8
\usepackage{amsmath,amssymb}   % 数学公式支持
\usepackage{graphicx}          % 插入图片
\usepackage[colorlinks=true, allcolors=blue]{hyperref} % 链接
\usepackage{geometry}          % 页边距
\usepackage{setspace}          % 行距
\usepackage{titlesec}          % 标题格式更灵活
 
% 页面设置
\geometry{
  a4paper,
  left=2.5cm,
  right=2.5cm,
  top=2.5cm,
  bottom=2.5cm
}
 
% 为了贴近 Markdown 层级,这里稍作标题设置
\titleformat{\section}{\large\bfseries}{\thesection.}{0.5em}{}
\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{0.5em}{}
\titleformat{\subsubsection}{\normalsize\bfseries}{\thesubsubsection.}{0.5em}{}
 
\begin{document}
 
% 您的内容从此开始
% ==============================
 
% 原始 Markdown 第一行: # ***[Over crowding + ]***
\section*{***[Over crowding + ]***}
How to control crowding in cafeterias \\
Turbulent Crowd Motion?? \\
To what extent does the 
 
[调整标题,去掉大标题]
 
[Abstract???]
 
% 原始 Markdown 里的 “### Abstract” -> \section
\section{Abstract}
 
\section{Introduction}
In my own experience, I often had to spend over fifteen minutes in line, only to wait for food. This personal frustration led me to question whether these delays were simply due to high demand or rooted in deeper systemic inefficiencies. Long queuing times and overcrowding in school cafeterias are known to be serious problems faced by students. This issue has been well-documented in previous studies that have emphasized the impact of poorly designed cafeterias on student satisfaction, waiting times, and the overall dining experience. Surveys conducted at our school have shown that many students are dissatisfied with the current cafeteria setup, citing overcrowding and long wait times as major annoyances. However, no one has fully explored why these issues persist after years of improvement or how specific factors - such as cafeteria layout, queuing systems, and crowding during peak hours - contribute to the problem. If we can identify the root causes of inefficient cafeteria operations, we can not only improve the dining experience but also optimize space usage and human resources. This study aims to investigate the root causes of cafeteria crowding by analyzing queuing dynamics, conducting simulations, and exploring potential improvements. By identifying and addressing these issues, I hope to reduce queue times, increase student satisfaction, and improve overall operational efficiency. Even now, many students joke that getting lunch is a “survival game,” which reflects how ingrained the issue has become in daily school life.
 
First, we break down the students' “dissatisfaction” into two main areas. Firstly, the long waiting time consumes their patience, which is totally unnecessary. Second, the crowded cafeteria makes it difficult for them to move around. In this paper, we will analyze these two problems separately and look for potential solutions. To understand the mechanisms behind these inefficiencies, it is essential to examine the existing theoretical frameworks and studies related to queuing behavior and cafeteria management. One of the most widely used approaches in this area is queueing theory, which provides mathematical tools to analyze waiting lines and service dynamics.
 
\section{Queueing Theory in Solving Campus Cafeteria Congestion}
Queueing theory, a subfield of operations research, focuses on analyzing and optimizing systems where entities wait in line for service. The foundational models—such as M/M/1, M/M/c, and M/D/1—have been widely adopted to understand arrival patterns, service rates, and queue dynamics under probabilistic assumptions (Kambli et al. 64). These models are defined by Kendall’s notation, where 'M' refers to Markovian (Poisson) arrival and/or service times, and the number indicates the quantity of parallel servers (Ajiboye and Saminu 304). Little’s Law, a fundamental result in queueing theory, relates average wait time to arrival rate and system capacity (Tang et al. 30). 
 
In the context of campus cafeterias, queueing theory has been extensively employed to address issues of student congestion during lunch hours, which are particularly pronounced due to synchronized class schedules (Zuo 183). The application of models such as M/M/n/m has shown practical potential in optimizing the number of open windows and reducing average waiting time by reallocating resources during peak demand (Chen and Wang 42). Simulation studies demonstrate that queue optimization can reduce waiting times by nearly 45\% (Ye 76). Another study using a multi-stage queue model reduced average customer dwell time from over 500 minutes to under 15 minutes by redesigning queue architecture and service logic (Ajiboye and Saminu 309). 
 
Despite these successes, classical queueing models exhibit limitations when applied to real-world cafeteria environments. Most models assume steady-state behavior, homogenous service stations, and exponentially distributed arrival and service times, which rarely match the fluctuating and clustered nature of student behavior (Lu et al. 202). Furthermore, traditional models fail to account for human behavioral dynamics, such as balking, reneging, or jockeying—where students leave or switch queues due to perceived delays (Chen and Wang 44). Extensions to these models have attempted to incorporate dynamic arrival rates and customer patience thresholds (Li and Saminu 893). Moreover, complex queue networks involving multiple food stations and checkout counters require simulation or agent-based modeling, as closed-form analytical solutions are infeasible (Kambli et al. 65; Deng et al. 62).
 
Therefore, while queueing theory provides a strong theoretical framework for diagnosing and improving campus cafeteria service systems, its practical application necessitates integration with behavioral insights, discrete-event simulation, and data-driven modeling tools to adapt to modern high school or university environments. Future research should also focus on combining real-time data collection technologies with adaptive queue control algorithms to ensure continuous optimization and student satisfaction.
 
[Explain: Why to choose the design / methodology?]
 
[multiple aspects]
 
[+150]
 
GAP 对于特定时间,而不是持续时间
 
\noindent\textbf{\Large !\[[WechatIMG39.jpg\]]}
 
\section{Data Collection}
 
\subsection{Observation}
The data for this study came from field observations in our school's cafeteria, and data were collected from December 2 to December 5, 2024, and December 9 to December 12, 2024 (8 days in total). Data collection under each schedule lasted for four days due to the school's schedule of one cycle every two days. The data primarily covered the third and fourth periods which are lunch periods, and the peak hours. Specifically, it includes the number of students entering/leaving the cafeteria during each period, the service time of each window, and the number of windows.
 
Data collection was performed through the cafeteria's monitoring system during the daytime hours, which recorded the timestamp of each student's entry into the cafeteria. The specific time period for data collection was from 11:50 to 13:35 each day. During this time period, the number of students entering the cafeteria was recorded by manual count, and the service time of each service window was recorded by simple observations. The mean value of the window service time is the average value obtained by several manual timings.
 
\subsection{Data preprocessing}
During the data cleaning process, all the collected data met the preset criteria, so no data was eliminated. During the data preprocessing stage, timestamps were converted to relative times with respect to peak hours and grouped for counting at 2-minute intervals during peak hours. For off-peak hours, group counts were performed at 5-minute intervals.
 
\subsection{Data characterization}
The results of the data analysis showed that the arrival time of students to the cafeteria showed obvious peak characteristics, especially between 11:50 and 12:10, when an average of about 40 people entered the cafeteria per minute, while the number of arrivals decreased significantly at other times. The distribution of service times at the service window roughly conforms to an exponential distribution and has an average service time of 45 seconds. Detailed statistics have been presented in Figure X. [This figure illustrate that there is a gap between ... ]
 
\noindent\textbf{\Large !\[[123.png\]]} \\
[Figure X ... Description] \\
[Explain]
 
We can also graph the net population in the cafeteria.
 
\noindent\textbf{\Large !\[[1234.png\]]} \\
[Figure X ... Description] \\
Similarly, there are particularly large numbers of students at the start of the P3 and P4, and then the numbers drop off over time.
 
\section*{Data Processing}
Once the data collection was complete we next used the data to calculate the student arrival rate, which is a variable that changes over time during every lunch time.
 
\begin{center}
\begin{tabular}{|l|p{9cm}|l|}
\hline
\textbf{Symbol} & \textbf{Description} & \textbf{Unit} \\
\hline
$E_t$        & Total number of individuals entering the location during interval t  & Count    \\
$L_t$        & Total number of individuals leaving the location during interval t   & Count    \\
$p(t)$       & Probability that an entering individual seeks service                & Fraction \\
$r$          & Probability that a service seeker stays after service                & Fraction \\
$S_t$        & Number of individuals arriving for service during interval t         & Count    \\
$\lambda(t)$ & Average arrival rate of customers during interval t                  & People/s \\
\hline
\end{tabular}
\end{center}
 
\subsection*{Total Population}
We get the average Entries and Exits ($E_t$ and $L_t$) by simply adding them together and divided by the number of days. Notice that our school's cafeteria has 2 entrances (marked as A and B here). \\
So for each time interval `t`:
\[
{\text{Enter}_{\text{Total}}} = \frac{\text{Enter A}_{\text{Day}1} + \text{Enter A}_{\text{Day}2} + \dots +\text{Enter A}_{\text{Day}8}}{8} + \frac{\text{Enter B}_{\text{Day}1} + \text{Enter B}_{\text{Day}2} + \dots +\text{Enter B}_{\text{Day}8}}{8}
\]
It is the same way to calculate ${Total_{Leave}}$.
 
\subsection*{Number of Service Seekers Arriving During Interval `t` ($S_t$)}
Then we consider the following factors. We know that not all of the students who enter the cafeteria will have any food, and that some may only stay for a short time before leaving (e.g., using the cafeteria as a hallway just to walk through it). In addition to this, since our school has an outdoor dining area. It has the same capacity as an indoor cafeteria. Some people order their lunch and go straightly to the outdoor dining area, while others stay indoors to eat their lunch. We will mainly focus on those students who stay indoors.
 
We have a fraction $p_{service}$ of entrants seek service, where $p_{service}(t) = 1 - p_{pass}(t)$. Some service seekers leave immediately ($q_{leave}$), and some stay after service ($r_{stay}$) where $r_{stay} = 1 - q_{leave}$. However, $q_{leave}$ does not vary roughly with the time in a day, but it has been observed that it increases significantly during the cold season, when people are reluctant to have lunch outdoors where it is colder. So in winter it usually gets more crowded indoors.
 
\noindent\texttt{(下面是原文中的 mermaid 语法示例,保留文字内容,不进行渲染)}
 
\begin{verbatim}
```mermaid
graph TD
A[Student] --> B{Enter}
B -->|Pass| C[End]
B -->|Seeking Service| D{Target group}
D -->|Leave| E[End]
D -->|Stay| F[End]

\end{verbatim}

在这里我们假设最简单的“理想人”流转路径,由于我们学校的食堂联通操场和教学楼,所以部分学生会通过食堂而不就餐。所以我们假设有两种情况。

  1. 进门后,不买饭的部分 (占比 ) 立即离开(几乎忽略在场时间);

  2. 进门后,去买饭的部分 (占比 ),在食堂会停留一段时间再离开;

    • 这段时间包含了服务时间 ,以及(可能)在堂食区停留时间 的一部分。若有比例 会堂食,则总“滞留”时间写为

如果我们只看外部数据(某时刻的进入速率 与离开速率 ),最直观的简化假设是——买饭的那部分人,约在 秒之后才出现在离开队伍里;而不买饭的那部分人几乎瞬时进、瞬时出。由此可以写出一个“带延迟的简化守恒”关系式:

Lt  ≈  (1−p(t))×Et⏟当下进门马上离开  +  p(t−τ1)×Et−τ1⏟先前时刻吃完饭的那批人, 现在离开  +  r×St−τ2⏟先前时刻买饭的那批人, 现在离开L_t ;\approx; \underbrace{\bigl(1 - p(t)\bigr)\times E_t}{\text{当下进门马上离开}} ;+; \underbrace{p(t-\tau_1)\times E{t-\tau_1}}{\text{先前时刻吃完饭的那批人, 现在离开}} ;+; \underbrace{r \times S{t - \tau_2}}_{\text{先前时刻买饭的那批人, 现在离开}}

在很多实际情况下,为了让公式更“可操作”,还会做进一步近似,譬如认为 变化不那么快,于是我们可以把 。这样就得到:

L(t)  ≈  (1−p(t)) Et  +  p(t) Et−τ1  +  r St−τ2L(t) ;\approx; \bigl(1 - p(t)\bigr),E_t ;+; p(t),E_{t - \tau_1} ;+; r , S_{t - \tau_2}

把这条式子整理一下:

Lt=Et  −  p(t) Et  +  p(t) Et−τ1+r St−τ2=Et  +  r St−τ2  +  p(t) [Et−τ1  −  Et]\begin{aligned} L_t &= E_t ;-; p(t),E_t ;+; p(t),E_{t - \tau_1} + r , S_{t - \tau_2}\ &= E_t ;+; r , S_{t - \tau_2} ;+; p(t),\Bigl[E_{t - \tau_1};-;E_t\Bigr] \ \end{aligned}

因此,可以粗略地解出

p(t)  ≈   Lt  −  Et  −  r St−τ2  Et−τ1  −  Et \boxed{ p(t) ;\approx; \dfrac{,L_t ;-; E_t ;-; r , S_{t - \tau_2} ,}{,E_{t - \tau_1} ;-; E_t,} }

其中:

  • 为“买饭+吃饭”导致的平均停留时长(当然,这只是非常粗略的“一刀切”时间延迟);

  • 都是食堂出入口处可直接测量的人流率(人/秒);

  • 的取值应在 之间,但由于上述近似并不严谨,若碰到 太小、符号反转,或者 等情况,可能出现奇异值或反常值,要小心解释或平滑处理。

p(t)=StEtp(t) = \frac{S_t}{E_t} StEt≈ Lt  −  Et  −  r St−τ2  Et−τ1  −  Et \frac{S_t}{E_t} \approx \dfrac{,L_t ;-; E_t ;-; r , S_{t - \tau_2} ,}{,E_{t - \tau_1} ;-; E_t,} τ1≈20+Wq(t−τ1)  ,  τ2≈Wq(t−τ2)\tau_1 \approx 20 + W_q(t - \tau_1) ;,; \tau_2 \approx W_q(t - \tau_2) rstay=NindoorNoutdoor≈?r_{stay} = \frac{N_{indoor}}{N_{outdoor}} \approx ? λt=Sttperiod\lambda_t = \frac{S_t}{t_{\text{period}}}

\noindent\textbf{\Large ![snapshot−1744707680893@2x.png[snapshot-1744707680893@2x.png]}

X(t)∼N(μ(t),σ2(t))X(t) \sim \mathcal{N}(\mu(t), \sigma

平滑样条函数拟合(Smoothing Spline Fitting)

为构建一个时间连续变化的平均到达间隔时间函数 以及其标准差函数 ,本文采用了(Smoothing Spline Fitting)方法。该方法基于一组离散时间点 与对应的观测值 ,通过在最小化数据残差的同时控制函数弯曲程度,从而拟合出一个光滑连续的函数

其数学表达为以下优化问题:

min⁡f∈C2{∑i=1n(yi−f(ti))2+λ∫ab(f′′(t))2 dt}\begin{equation} \min_{f \in C^2} \left{ \sum_{i=1}^n \left( y_i - f(t_i) \right)^2 + \lambda \int_{a}^{b} \left( f”(t) \right)^2 , dt \right} \end{equation}

其中:

  • 表示第 个时间段中计算得到的目标值(如 ,其中 是该时间段的持续时间, 是进入人数);

  • 是待拟合的连续函数,可表示

  • 是平滑因子(smoothing factor),控制拟合精度与平滑程度之间的权衡;

  • 是函数 的二阶导数,其积分项用于惩罚函数的弯曲程度;

  • 区间 为数据的时间范围;

  • 时,拟合函数严格通过所有点(即插值);当 时,拟合函数趋于线性。

本研究中,我们使用 \texttt{UnivariateSpline} 函数对 进行拟合。该函数基于三次样条(cubic spline)构建,并自动进行节点选择与最优拟合。其核心函数接口如下:

scipy.interpolate.UnivariateSpline(x,y,s=λ)\text{scipy.interpolate.UnivariateSpline}(x, y, s=\lambda)

其中 参数即对应上述公式中的 ,用于控制平滑程度。

最终得到的函数 可在任意时间点 上进行评估,生成连续的时间-间隔函数 及标准差函数 ,用于描述 G(t)/M/c 模型中顾客的动态到达分布:

Tt∼N(μ(t),σ(t)2),∀t∈[a,b]T_t \sim \mathcal{N}(\mu(t), \sigma(t)^2), \quad \forall t \in [a,b] μ(t)≈∑i=0nciBi(t)\mu(t) \approx \sum_{i=0}^{n} c_i B_i(t)

[+Why take this approach]justify me reasoning

\section*{Service Time Data} Service Time (s)

\noindent\textbf{\Large ![snapshot−1744736997962@2x.png[snapshot-1744736997962@2x.png]}

\begin{center} \begin{tabular}{l|l} Variable & Value \ \hline Sample size & 100 \ mean & 32.378 \ std & 20.478926 \ min & 14.26 \ 25% & 19.9725 \ 50% & 25.45 \ 75% & 39.2275 \ max & 132.98 \ & 0.030885 \ D & 0.3510 \ Pval & 0.1045 \ \end{tabular} \end{center}

Kolmogorov-Smirnov 检验

我们对 100 个观测服务时间进行了指数分布拟合。通过最大似然估计,服务率为 (即平均每 32.378 秒服务一人)。K-S检验显示 p 值为 0.1045,大于,表明无法拒绝服务时间服从指数分布的原假设,因此我们可以合理建模为 G/M/c 排队模型。

dP/dt=E(t)≥μ(t)  服务不完dP/dt = E(t) \geq \mu(t) ; \text{服务不完} dP/dt=E(t)<μ(t)  服务的完dP/dt = E(t) < \mu(t) ; \text{服务的完}

\section*{Model Establishment} Based on assumptions about the data and usual observations, we assume that the arrival distribution satisfies a certain distribution (e.g., skewed distribution). Most students usually enter the cafeteria right after classes end, and the arrival rate of people decreases steadly over time. We assume that the \textbf{service time} of each server follows an \textbf{exponential distribution}, i.e., the service process is memoryless.

\noindent\textbf{So the model should be used. (Note: the actual model selection needs to be based on actual data)}

In the \textbf{} model, the \textbf{arrival process} follows a \textbf{General distribution}, the \textbf{service time} follows a \textbf{Poisson process}, and there are parallel service windows.

\subsection*{Basic Parameters} \begin{center} \begin{tabular}{l|p{7cm}|l} \hline Symbol & Explanation & Unit \ \hline & Average arrival rate of customers & people/s \ & Average service rate of a single service window & services/s \ & Number of service windows & Number \ & system utilization rate & / \ & Coefficient of variation & / \ & Mean Waiting Time & s \ & Average number of people in the queue & Number \ & Probability that the system is empty & / \ \hline \end{tabular} \end{center}

Which:

ρ(t)=λ(t)cμ\rho(t) = \frac{\lambda(t)}{c\mu}

where is necessary for system stability.

: coefficient of variation (ratio of standard deviation to mean) of the arrival time distribution:

Ca(t)=σa(t)1/λ(t)C_a(t) = \frac{\sigma_a(t)}{1/\lambda(t)}

Standard deviation of arrival times , We have a Set of data , We can estimate by:

σa=1n−1∑i=1n(Tai−Taˉ)2\sigma_a= \sqrt{\frac{1}{n-1} \sum_{i=1}^n \left(T_{ai} - \bar{T_a}\right)^2} Taˉ=1n∑i=1nTai\bar{T_a}= \frac{1}{n} \sum_{i=1}^n T_{ai}

Mean Waiting Time , Using a generalized form of the Pollaczek-Khinchin (P-K) formula, you can compute the average wait time in the queue :

Wq=Ca2+12⋅Wq,M/M/cW_q = \frac{C_a^2 + 1}{2} \cdot W_{q, M/M/c}

where is the average waiting time of the model, Eq:

Wq,M/M/c=Lq,M/M/cλW_{q, M/M/c} = \frac{L_{q, M/M/c}}{\lambda}

Average number of people in the queue

And (the average number of people in the queue) is based on the Erlang-C formula:

Lq,M/M/c=P0⋅(λ/μ)cc!⋅cρ(1−ρ)2(∑k=0c−1(λ/μ)kk!)+(λ/μ)cc!⋅11−ρL_{q, M/M/c} = \frac{P_0 \cdot \frac{(\lambda / \mu)^c}{c!} \cdot \frac{c \rho}{(1 - \rho)^2}}{\left( \sum_{k=0}^{c-1} \frac{(\lambda / \mu)^k}{k! } \right) + \frac{(\lambda / \mu)^c}{c!} \cdot \frac{1}{1 - \rho}}

Revised is defined by:

Lq≈Ca2+12⋅Lq,M/M/cL_q \approx \frac{C_a^2 + 1}{2} \cdot L_{q, M/M/c}

Probability that the system is empty

: the probability that the system is empty, which can be calculated by the following formula:

P0=(∑k=0c−1(λ/μ)kk!+(λ/μ)cc!⋅11−ρ)−1P_0 = \left( \sum_{k=0}^{c-1} \frac{(\lambda / \mu)^k}{k!} + \frac{(\lambda / \mu)^c}{c!} \cdot \frac{1}{1 - \rho} \right)

Average system wait time

The average wait time in the system includes the wait time in the queue and the service time:

W=Wq+1μW = W_q + \frac{1}{\mu}

Average number of people in the system

The average number of people in the system includes the number of people in the queue and the number of people being served:

L=Lq+λμL = L_q + \frac{\lambda}{\mu}

The result is graphed below:

\noindent\textbf{\Large ![432@2x.png[432@2x.png]}\ \noindent\textbf{\Large ![snapshot−1744713853574@2x.png[snapshot-1744713853574@2x.png]}

\section*{3. Model Using} \noindent\textbf{FootNote} \ Use (Coefficient of Variation of Arrival Time) to correct the formula of , that is, we can get the result of .

\subsection*{Outputs}

  • We enter the observed data into the code segment and conclude that \ The average arrival time is… \ The average number of people in the queue is…

\noindent\textbf{Extra}

  • \textbf{Enhanced parameter estimation methods}: Currently, parameter estimation is mainly based on best fit, but a more rigorous calculation of confidence intervals should be incorporated.

    • Calculate confidence intervals for parameter estimates using the \textbf{Bootstrapping} method.

    • Check the stability of the estimates by estimating them separately for different time periods and

λcμ<1λ<cμλ<3×0.030885λ<0.09\begin{align} \frac{\lambda}{c\mu} &< 1 \ \lambda &< c\mu \ \lambda &< 3 \times 0.030885 \ \lambda &< 0.09 \end{align} λ<coμoλ<4×0.04λ<0.16\begin{align} \lambda &< c_o\mu_o \ \lambda &< 4 \times 0.04 \ \lambda &< 0.16 \end{align}

冬天放宽人流到0.14,夏天0.12

\noindent\textbf{\Large ![snapshot−1744715796548@2x.png[snapshot-1744715796548@2x.png]}

为缓解当前【描述问题,例如“学生在食堂高峰时段排队等待时间过长”】的问题,我们基于前述 G(t)/M/c 模型分析结果,提出如下优化策略。首先,在0-250秒期间,系统负载率 显著上升,超过了1,表明服务能力已经过饱和,在这些瞬间服务速率已经无法完成服务。针对这一现象,我们建议通过【增加1个窗口来提升服务能力,减少排队长度。同时,通过训练服务员,提升平均装餐时间至25s这种非结构性手段减少高峰压力。为评估措施效果,我们利用模型进行了策略仿真,结果显示:优化后平均排队等待时间由原本接近饱和处的120s降至50s左右,系统负载维持在0.8以下,排队人数显著减少。综上所述,本方案在不显著增加人力成本的前提下,有效提升了整体服务效率,具备良好的现实可行性和推广价值。但在某些情况下队列依旧会过饱和。使用限流方式控制到达率,以保证进一步控制系统稳定。

由于基于时间变化的排队论模型过于实验性,有很多问题。例如预测等待时间和系统中人数是基于一个瞬间的。而现实中过去到达的人会在未来接受服务,实际值应比预估值高出许多,并且分布也可能有较大出入。因此我们引入了动态仿真。

\section*{动态} \noindent\textbf{\Large ![Pastedimage20250415232238.png[Pasted image 20250415232238.png]}

第200秒模拟的热力图

\noindent\textbf{\Large ![myplot1.png[myplot 1.png]}

The heatmap generated via kernel density estimation (KDE) represents the relative concentration of individuals across the spatial layout of the cafeteria. A KDE value at a given point does not correspond to the exact number of individuals but rather to the estimated density of people in the surrounding area, normalized per unit area.

In our analysis, certain regions exhibited KDE values exceeding 4. This indicates an extremely high local density of individuals, implying that people were densely clustered within a very small spatial extent. Such values are often observed in locations where queuing behavior or spatial bottlenecks occur—for example, near service counters, entrances, or popular food stalls.

The magnitude of the KDE values is influenced by the bandwidth parameter used in the estimation process. A lower bandwidth results in higher sensitivity to local clustering, potentially causing peak values to exceed 4 in tightly packed regions. While these values do not directly represent headcounts, they are valuable indicators of human traffic congestion and help to identify critical zones that may require intervention to alleviate crowding or improve service efficiency.

Therefore, areas with KDE > 4 should be interpreted as zones of significant crowding. These regions merit further attention in the context of spatial redesign or queue management strategies.

\section*{解决方案} 限流0.12,冬天限流0.14。派遣一名老师或学生会成员,通过每2分钟放行7-8人的方式。时间集中在前10分钟。

\section*{讨论(Discussion)} 本研究通过构建 排队模型并结合实际观测数据,对学校食堂在午餐高峰期间的人流动态进行了系统分析。然而,在模型设计与数据处理过程中,仍存在一定的误差来源与局限性,有必要在此加以探讨。

首先,模型误差来源主要包括对到达过程的近似建模、服务时间分布的简化处理以及人为观察记录中的偏差。尽管服务时间通过K-S检验基本符合指数分布,但在高峰时段可能存在多任务服务、学生选择犹豫等行为,导致服务过程非严格服从泊松过程。同时,学生到达的间隔时间虽使用平滑样条进行拟合,但仍可能未能捕捉某些突发性波动。

其次,本模型的局限性在于它假设顾客行为是理性的和静态的,忽略了现实中存在的“交叉行为”如换队(jockeying)、离队(reneging)、插队、选择性排队等。此外, 模型为瞬时模型,未能考虑顾客在系统中累积效应的“滞后性”,这在实际预测中可能导致低估排队长度或高峰时间延迟。

再者,其他可能解释变量也未在本研究中纳入考虑。例如,天气因素(冬季更倾向于堂食)、特殊活动(如考试、运动会)对人流分布的影响,以及个体对窗口偏好的影响(如特定窗口饭菜更受欢迎),都可能对系统负载产生非显著但持续的影响。

与已有研究的异同方面,本文所采用的以时间为变量的动态排队建模方法,在国内高校中尚属少见。多数文献采用 M/M/c 等稳态模型进行优化,而本研究引入了 的动态思想,结合时间分段的服务速率分析及行为假设,使模型更贴近实际。同时,我们使用了平滑样条函数对时间-服务率函数进行了非参数估计,增强了模型的灵活性和预测精度。

最后,未来优化方向包括引入实时动态调度系统(如通过摄像头识别人流密度,实时调整窗口数量或引导学生分流)、基于仿真强化学习的最优排队控制策略、或与“扫码点餐”、“分时取餐”等技术方案结合,进一步降低系统等待时间并提升学生满意度。此外,还可以考虑使用Agent-Based模型引入学生自主选择行为,以更精确模拟现实场景。

\section*{结论(Conclusion)} 本研究通过实地观测、数据建模与动态仿真,系统分析了校园食堂在高峰时段人流拥挤的原因,并采用 模型对排队系统进行了理论建模和模拟预测。研究结果表明,在特定时间段系统负载率 显著上升,造成排队长度迅速增长,主要原因为窗口数量不足与服务时间未优化。

通过策略模拟,我们发现:在高峰时段适度增加服务窗口数量、缩短平均服务时间,并辅以限流措施(如人工分批放行),可以显著降低平均等待时间,并将系统维持在稳定区间。

本研究不仅在理论上将排队论与现实操作系统结合,亦为校园场景提供了一种可落地的优化路径,具备现实指导意义。

未来研究可进一步引入个体行为模拟、实时调度机制及基于 AI 的人流预测模型,以提升仿真精度与调度智能化水平。

\section*{Works Cited} Ajiboye, Adegoke S., and Kayode A. Saminu. “A Multi-Stage Queue Approach to Solving Customer Congestion Problem in a Restaurant.” \textit{Open Journal of Statistics}, vol. 8, no. 2, 2018, pp. 302–316.

Chen, Jinyang, and Hongbo Wang. “Optimization of University Cafeteria Using a Hybrid Queueing Model.” \textit{Journal of Huangshi Institute of Technology}, vol. 27, no. 3, 2011, pp. 41–44.

Deng, Shounian, et al. “Queueing System Simulation Based on MATLAB for Multi-Server Models.” \textit{Journal of Anqing Teachers College (Natural Science Edition)}, vol. 17, no. 3, 2011, pp. 61–63.

Kambli, Ashish, et al. “Improving Campus Dining Operations Using Capacity and Queue Management: A Simulation-Based Case Study.” \textit{Journal of Hospitality and Tourism Management}, vol. 43, 2020, pp. 62–70.

Li, Yuguang. “Simulation of Queueing Problems Based on MATLAB.” \textit{Journal of Wuhan University of Technology (Information & Management Edition)}, vol. 32, no. 6, 2010, pp. 892–896.

Lu, Yiqiang, et al. “Stochastic Simulation of Parallel Queue Systems.” \textit{Mathematics in Practice and Theory}, vol. 51, no. 4, 2021, pp. 200–206.

Tang, Tie-Qiao, et al. “Statistical Analysis and Modeling of Pedestrian Flow in University Canteen during Peak Period.” \textit{Physica A: Statistical Mechanics and Its Applications}, vol. 521, 2019, pp. 29–40.

Ye, Z. “Application of M/M/C Queueing Model in Hairdressing Service.” \textit{Journal of Chongqing Normal University}, vol. 26, no. 2, 2009, pp. 75–78.

Zuo, Boyi. “Analysis and Optimization of Noodle Queue Efficiency in College Canteens.” \textit{Value Engineering}, vol. 39, no. 32, 2020, pp. 183–184.

Li, Longyue, et al. “Performance Analysis and Optimal Allocation of Layered Defense M/M/N Queueing Systems.” \textit{Mathematical Problems in Engineering}, 2016, pp. 1–21.

% ============================== \end{document}


> **用法说明**:  
> 1. 将上述代码粘贴到 Overleaf 或任意 LaTeX 编辑器中保存为 `.tex` 文件。  
> 2. 所有 Markdown 中的标题、正文、图片引用 `![...](...)`、公式和文字说明均以注释、LaTeX 命令或原文形式保留。  
> 3. 如果有对应图片文件(如 `WechatIMG39.jpg` 等),请将其上传至与 `.tex` 文件同一目录,并将 `!\[[...]]` 转换成 `\includegraphics` 命令或直接保留文字占位符,以便后续在实际排版时插入。  
> 4. 编译后即可得到与原 Markdown 相同的内容排版思路,但呈现为 LaTeX 排版效果。

如上所示,即可完成对您提供的这份 Markdown 内容的 **一字不差** LaTeX 转换。由于不存在 Python 代码需求,此处不附带任何 Python 依赖库的安装方式。