Questions tagged [simulation]

A vast area which includes generating results from computer models.

Filter by
Sorted by
Tagged with
0
votes
0answers
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 ...
3
votes
0answers
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 ...
3
votes
0answers
77 views

N-Body Simulation in a Seamlessly Repeating World

For running an N-Body simulation it is required to calculate the force between every pair of massive bodies. The force applied on body $a$ from body $b$ is calculated as follows: $$F_{ab} = -G\frac{...
0
votes
0answers
84 views

Optimization problem for finding long trajectories in the 3n+1 problem

Hill Climbing and simulated annealing is an optimization technique that can be used to find the shortest route in the travelling salesman problem. I.e. it can minimize the length of a route through ...
2
votes
1answer
45 views

`Best' length of Buffon's needle

Suppose we conduct Buffon's needle experiment, randomly dropping a needle of length $L\in(0,1]$ between horizontal lines which are a distance of $1$ apart. It is well known that the probability that ...
2
votes
1answer
24 views

Regressor-passivity robot control. Help with simulation (Simulink/Matlab).

I'm trying to simulate a 2DOF planar pendulum with a regresor-passivity control, the thing is I've been having some issues with my simulation, I'm using Simulink, but in theory I know my control law ...
0
votes
1answer
20 views

Determining Acceleration to Intercept Accelerating Object

I'm trying to determine direction in which a missile should accelerate to hit a target in a 3D space simulation. The position and velocity of the missile, as well as the position, velocity, and ...
1
vote
1answer
44 views

Monte Carlo method as a reference

I'm familiar with how the Monte Carlo method works but I fail to understand why in many scientific papers, the Monte Carlo method is regarded as the reference value. In other words, in the absence of ...
0
votes
1answer
14 views

Average of the numbers given by a linear congruential generator

Show that the average of numbers given by a full cicle of a linear congruential generator with full lenght period is $\frac{1}{2}-\frac{1}{2m}$, whith $m$ as the module of the generator. I began by ...
1
vote
0answers
12 views

How can I obtain a rotation axis and angular velocity around that axis from angular velocities around the world coordinate axes?

Say I am given the angular velocity of a rigid 3D object in the form $(\omega_x, \omega_y, \omega_z)^T$, where $\omega_x$ describes the angular velocity around the x-axis, $\omega_y$ around the y-axis ...
0
votes
0answers
6 views

Simulating changes in conductances of synapses

I would appreciate your time to look through the problem that I am about to mention here: I have performed an experiment on a memristor by feeding in rectangular voltage-time waves as pre-spikes and ...
1
vote
1answer
69 views

How to simulate intervals data from a Negative Binomial point process.

In section 5.4.3 of the book on "Introduction to probability models", Ross explains the "Negative Binomial point process". This is obtained by mixing the $\lambda$ parameter of the ...
0
votes
1answer
32 views

Big $\mathscr{O}$ notation - division operation

Consider that the following constant $h$ (time-step size) and $p$ as the order of convergence of some numerical method. On a source I read $$\dfrac{\mathscr{O}(h^{p+1})}{\mathscr{O}\left(\frac{h}{2}^{...
0
votes
1answer
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 ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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. ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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$ ...
1
vote
0answers
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 ...
1
vote
2answers
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$. ...
2
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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. ...
1
vote
0answers
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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)$. ...
0
votes
0answers
12 views

compute cumulative average

I have below table which i compute the average in the end of the month. ...
1
vote
1answer
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$). ...
1
vote
0answers
39 views

Analytic Solution and Simulation of “Modified” Ornstein–Uhlenbeck process

Hello Mathematicians, I've been attempting to solve a modified SDE (Langevin equation) in which the stochastic term (Wiener Process) is raised to a power: $$(1): \frac {dX_t}{dt} = -\frac {(X_t - \...
1
vote
1answer
28 views

Steps to do a Monte Carlo simulation

I'm trying to do a Monte Carlo simulation but I'm lost in the process. The big question I want to answer is what's the probability I have to do a certain amount of work. In my solution I've already ...
0
votes
0answers
11 views

Why doesn't this Wiener process converge to the correct beta function?

I've attempted to simulate the following Wiener process in Python (code attached at end of post): $$dX = n(m-X)dt+\sqrt{\epsilon X(1-X)}dW$$ which I believe should converge to a beta process $p(X|\...
0
votes
0answers
28 views

Simulation of Hard Core Model

i already learned about Hard core Model and i know the steps Using markov chain monte carlo (MCMC) to realise it.But i don't know how to make/do a Simulation of Hard code Model in practice. Can ...
0
votes
0answers
16 views

Monte Carlo estimate for PI

Two well-known ways of estimating $\pi$ with Monte Carlo are dart throwing and Buffon's needle. Is there a MC experiment to estimate $\sqrt{\pi}$ at the usual rate of convergence?
0
votes
1answer
19 views

Doubt computing multiple integrals by Monte Carlo method

The question is: Using Monte Carlo method, compute $\int_{0}^{1} \int_{-1}^{1} (x+y) dx dy.$ My resolution until now: Let $g = x+y$. $\Theta = E[g(U_{1}, ..., U_{n})]; U{1}, ..., U_{n}$ random ...
0
votes
0answers
9 views

Simulate discrete variable using continuous distribution

I have a discrete variable $L$ and I've tried to find the best distribution (Negative binomial, genometric and Poisson) but it did not work... The best fitting was using lognormal distribution. May I ...
2
votes
1answer
46 views

Numerical simulation of water layer over terrain

I'm looking for a grid-based numerical method that allows simulating water over a grid-based terrain, presumably something like shallow water equations. I have a square grid of terrain elevation ...
0
votes
1answer
67 views

Simulation problem - inverse transform method not succeding

Suppose π‘ˆ1 and π‘ˆ2 are i.i.d. π‘ˆπ‘›π‘–π‘“π‘œπ‘Ÿπ‘š(0,1). What's the distribution of βˆ’ (1/3) ln(π‘ˆ1) βˆ’ (1/3) ln(1 βˆ’ π‘ˆ2)? I tried to solve this problem using inverse transform method but it did not lead me ...
1
vote
0answers
46 views

Stochastic process simulation, periodogram implementation, MATLAB, frequecy range

I have to implement from scratch on MATLAB the periodogram of a very simple stochastic process: $$X(t)=A_1\cos(2\pi f_1t+\phi_1)+A_2\cos(2\pi f_2t+\phi_2)$$ where $f_1=5$, $f_2=10$, $A_1,A_2\sim ...
1
vote
1answer
34 views

Sampling with exponential tilting from a Weibull distribution

Given the Weibull distribution: $$F(x)=1-e^{-\theta x^\beta}$$ Is there a way to sample from the tilted distribution? First we find probability density: $$f(x)=\beta x^{\beta-1}\theta e^{-\theta x^\...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
32 views

How long on average will it take to get every option in a set of 73 at 4 random options per day

My question seems simple but I can't figure out how to get to a mathematical answer. It has something to do with the binomial coefficient as it is 73 choose 4 but I'm not sure how to represent ...
1
vote
1answer
15 views

SPH : Kernel Gradient Correction

I'm struggling to understand the kernel gradient correction to restore consistency of the SPH methods on free surface or boundary. Where does the definition of M come from? \begin{equation} \...

1
2 3 4 5
…
11