# Questions tagged [simulation]

A vast area which includes generating results from computer models.

544 questions
Filter by
Sorted by
Tagged with
25 views

### Textbook for Graduate Level Simulation

I am using this simulation textbook for reference as graduate level course. https://www.amazon.com/dp/B00AFV0BN0?ref_=k4w_embed_details_rh&tag=bing08-20&linkCode=kpp However, the Ross's book ...
23 views

### Game physics of tearing apart

For a game I'm programming I'm looking for a kind of realistic mechanic for simulating the tearing apart of objects. Let me explain: I have a given point $p$ in a 2-dimensional space (possible later ...
77 views

20 views

### Numerical simulation for a bounded process. Is slight deviation a “normal” fact?

Suppose I have to numerically simulate a process $\{y_t\}$ such that $y_t\geq0$ $\forall t\in\mathbb{N}$, with $t$ denoting time-step. Let's suppose I use MonteCarlo with $\mathscr{N}$ simulation ...
30 views

### Can closed forms for the outputs in this production simulation be found?

(I am not sure whether this question should better be asked on Game Development SE but I think of this more as a mathematical problem than one specific to game development.) For a game I am ...
31 views

### How do I make a rotating point on an elliptical path?

Using Desmos graphing calculator, I am trying to create an accurate 2D model of our solar system. Currently, I have created all of the planets using completely circular orbits, which can then be ...
75 views

### Sampling $X$ having $F_X(x) = \prod_{i=1}^nF_{X_i}(x)$

How can I use relation $F_X(x) = \prod_{i=1}^n F_{X_i}(x)$ to sample $X$ knowing it is easy to generate random variable form any distribution $F_{X_i} , i = 1 , \ldots , n$? Suppose $X_i$'s are ...
21 views

### how to handle the Neumann boundary condition at the corner points for a 2d rectangular domain, if using finite difference method?

Now wanna numerically simulate an elliptic partial differential equation over a two-dimensional rectangular domain, where there are nonconstant coefficients in the second order partial derivatives. ...
26 views

### Using MC to approximate an integral

The following is from Asmussen and Glynn: Suggest some variance reduction methods for evaluating this integral: $\int _{0}^{\infty} (x + 0.02x^{2})\text{exp}\{0.1\sqrt{1+\text{cos}x} - x\}dx$ I ...
27 views

### How can I resolve the divergence of my projected gradient descent (ascent) with backtracking line search?

I constructed a projected gradient descent (ascent) algorithm with backtracking line search based on the book "Convex optimization," written by Stephen Boyd and Lieven Vandenberghe. The ...
22 views

### Simulations and floating point error?

Dear math stack exchange, I'm curious about what would floating point error would look as i've been hoping to conduct some simulations of gravitational phenomenon. Is it highly random or somewhat ...
48 views

### Simulating random movememt

I'm trying to simulate random movement in an particle caused by temperature, by adding a random vector of length $1$ every simulation step. The problem is that as I decrease the step time, the average ...
23 views

### Finding probability density - a result of an algoritm

I am supposed to find probability density of the random variable $Y$, which is an output of the following algorithm: Gen $X \sim U(0,1)$ Gen $U \sim U(0,1)$ If $X<U$ then $Y:=X$ else $Y:=1-X$ ...
26 views

### How to make computers understand length, breadth and height given a 3d object?

Suppose, I am building an A.I Robot and i want that robot to bring to me that cuboidal shape object whose length is say 10 cm(in 1st case out of (40cm, 19cm, 10cm)), each time it brings the desired ...
22 views

### Estimation of the Kolmogorov test power [Rstudio].

Let $x$ be a 20-element sample from the T-Student distribution with 4 degree of freedom. I want to do a simulation to estimate the power of the Kolmogorov test for $H_0=F\sim N(0,1)$ if $\alpha=0.01$. ...
38 views

### Velocity when direction of acceleration is rotating

For a computer game simulation, I want to compute velocity for a body whose acceleration magnitude is constant but whose acceleration direction may be rotating with a constant angular velocity. I ...
38 views

### Simulate stars and bars problem

Suppose that I have $n$ balls to be divided among $k$ buckets so that each bucket has a non-negative number of balls. This is a classic stars and bars problem: the number of ways to do this division ...
33 views

### Can we calculate a vector field from the pressure field with Navier Stokes?

I've been looking for weeks and can't seem to wrap my head around CFD or the computation of fluid and its movement in 2D with Navier Stokes. Without an initial velocity field, and given ONLY a ...
14 views

### How can I tell if a simualtion of a spherical wave equation implements damping?

In this link you can see the following simulation of a spherical wave: The MATLAB code is provided here. ...
48 views

### Modelling the coming and going of people in a mess, with social distancing, to get probability of a person finding a desirable seat.

There is a room which has fixed spaces for people to sit and eat food (say benches). Each such space has a desirability rating depending upon a) Its location relative to the door and b) the number of ...
43 views

### Texas hold'em pecularity with different number of players

While simulating Texas hold'em poker hands, to find the probability that certain two cards would give the best hand after river, I found a pattern that I can't explain. I made $100,000$ simulations ...
33 views

### Calculate $\epsilon$ for a simulation.

The exercise says that there's a course that takes 3 years and the retention tax is affected by an uncertainty that is called $\epsilon_{i}$, and $\epsilon_{i}\sim N\left(0, \frac{0.15^2}{i}\right)$. ...
12 views

### compute cumulative average

I have below table which i compute the average in the end of the month. ...
44 views

### Hexagonal grid elementary simulation of percolation (Cardy's formula) using adjacency matrix. Looking for improvements

We consider here the probability to percolate (i.e. find a path) in a triangular shape made of hexagons as given in Fig. 1. Fig. 1 : Departure line in red (hexagons $1, 2, 4, 7, 11, 16, 22$). ...
39 views

18 views

### Simulation conditional expectation estimator

I have a question about the conditional expectation method used in simulation. Let's say X is a Geometric(0.2) r.v and Y a Binomial(10,0.5) r.v. Assuming X and Y are independent I need to compute ...
12 views

### Test Poisson Point Process for distribution

I'm currently trying to set up a simulation of a poisson point process (PPP). Having created a PPP $\Phi = \{x_1,\ldots ,x_n\}$ with $n$ data points (where $n$ is a random variable with poisson ...
37 views

### Simulating outcomes with impossible outcomes from conditional probabilities

Simplified context Consider $n$ coins {$C_i$} with for each of them the probability $P_i$ of landing on head ($H$). Let $X_i\hookrightarrow B(P_i)$ be the random variable representing the outcome of ...