Reflected Brownian motion
In probability theory, reflected Brownian motion (or regulated Brownian motion, both with the acronym RBM) is a Wiener process in a space with reflecting boundaries. In the physical literature, this process describes diffusion in a confined space and it is often called confined Brownian motion. For example it can describe the motion of hard spheres in water confined between two walls. RBMs have been shown to describe queueing models experiencing heavy traffic as first proposed by Kingman and proven by Iglehart and Whitt. Definition. A "d"–dimensional reflected Brownian motion "Z" is a stochastic process on formula_1 uniquely  defined by where "X"("t") is an unconstrained Brownian motion and with "Y"("t") a "d"–dimensional vector where The reflection matrix describes boundary behaviour. In the interior of formula_4 the process behaves like a Wiener process; on the boundary "roughly speaking, "Z" is pushed in direction "R" whenever the boundary surface formula_5 is hit, where "R" is the "j"th column of the matrix "R"." Stability conditions. Stability conditions are known for RBMs in 1, 2, and 3 dimensions. "The problem of recurrence classification for SRBMs in four and higher dimensions remains open." In the special case where "R" is an M-matrix  then necessary and sufficient conditions for stability are Marginal and stationary distribution. One dimension. The marginal distribution (transient distribution) of a one-dimensional Brownian motion starting at 0 restricted to positive values (a single reflecting barrier at 0) with drift "μ " and variance "σ" is for all "t" ≥ 0, (with Φ the cumulative distribution function of the normal distribution) which yields (for "μ" < 0) when taking t → ∞ an exponential distribution For fixed "t", the distribution of "Z(t)" coincides with the distribution of the running maximum "M(t)" of the Brownian motion, But be aware that the distributions  of the processes as a whole are very different. In particular, "M(t)" is increasing in "t", which is not the case for "Z(t)". The heat kernel for reflected Brownian motion at formula_9: formula_10 For the plane above formula_11 Multiple dimensions. The stationary distribution of a reflected Brownian motion in multiple dimensions is tractable analytically when there is a product form stationary distribution, which occurs when the process is stable and where "D" = diag("Σ"). In this case the probability density function is where "η" = 2"μ""γ"/"Σ" and "γ" = "R""μ". Closed-form expressions for situations where the product form condition  does not hold can be computed numerically as described below in the simulation section. Simulation. One dimension. In one dimension the simulated process is the absolute value of a Wiener process. The following MATLAB program creates a sample path. % rbm.m n = 10^4; h=10^(-3); t=h.*(0:n); mu=-1; X = zeros(1, n+1); M=X; B=X; B(1)=3; X(1)=3; for k=2:n+1 end subplot(2, 1, 1) plot(t, X, 'k-'); subplot(2, 1, 2) plot(t, X-B, 'k-'); The error involved in discrete simulations has been quantified. Multiple dimensions. QNET allows simulation of steady state RBMs. Other boundary  conditions. Feller described possible boundary condition for the process