Simulation is the imitation of some real thing, state of affairs, or process. The act of simulating something generally entails representing certain key characteristics or behaviours of a selected physical or abstract system.
Questions tagged [simulation]
5194 questions
10
votes
3 answers
Deep class inheritance hierarchy -- bad idea?
hoping a grandmaster can shed some light. Very high overview is that I am no beginner to coding, but still new to OOP. This set of message classes is at the heart of a large simulation application we're writing, and I don't want to do it…

Spatula City
- 101
- 1
- 1
- 4
9
votes
1 answer
Depth first search - 2D Game map
I have created a 2D maze, and I want to find the quickest path between the red->blue colored nodes. I'm an unsure how I would go about implementing a depth-first search. I know that an adjacency matrix or list could be used to represent the…

Robert
- 2,222
- 2
- 21
- 36
9
votes
3 answers
How to simulate keyboard input in ALL applications?
I'm writing an app (in C#) which as a part of it must simulate and send some key strokes to another application. I'm using http://inputsimulator.codeplex.com/ project for simulating keys, and it works in many applications, but in some it doesn't -…

Fenix Voltres
- 3,448
- 1
- 29
- 36
9
votes
2 answers
How to cheaply simulate water on iOS?
First off, I'm not thinking about that.
I was wondering how to make a simple simulation of a waterfall onto some dunes on the iPhone.
It turns out several people tackled the issue of moving water, and GameDev has approached the idea several times.…

Kheldar
- 5,361
- 3
- 34
- 63
9
votes
3 answers
Simulate "Newton's law of universal gravitation" using Box2D
I want to simulate Newton's law of universal gravitation using Box2D.
I went through the manual but couldn't find a way to do this.
Basically what I want to do is place several objects in space (zero gravity) and simulate the movement.
Any tips?

Ashika Umanga Umagiliya
- 8,988
- 28
- 102
- 185
9
votes
4 answers
What (else) is wrong with using time as a seed for random number generation?
I understand that time is an insecure seed for random number generation because it effectively reduces the size of the seed space.
But say I don't care about security. For example, say I'm doing a Monte Carlo simulation for a card game. I DO…

pepsi
- 6,785
- 6
- 42
- 74
9
votes
1 answer
Earth orbit simulation has incorrect speed
I'm very new to programming and I've gotten a school assignment for which I have to create a simulation of the earths orbit around the sun in p5.js . We were offered a simplified way to compute the gravitational pull but I wanted to use the actual…

Gijsfwb
- 91
- 3
9
votes
6 answers
How would one programmatically simulate lower processor frequencies?
I'm interested in running a program at a specific frequency (like 25MHz) on my 2GHz+ processor. The only method I can think of for doing something like this is using a microsecond precision sleep function, but I am unsure of how to calculate how…

ytrp
- 271
- 2
- 8
9
votes
4 answers
Simple simulations for Physics in Python?
I would like to know similar, concrete simulations, as the simulation about watering a field here.
What is your favorite library/internet page for such simulations in Python?
I know little Simpy, Numpy and Pygame. I would like to get examples about…

Léo Léopold Hertz 준영
- 134,464
- 179
- 445
- 697
9
votes
2 answers
Is faking a WPF mouseover possible?
I have a data template with a textbox and a button with some styles on it. I would like to have the button show the mouse over state when focus is on the textbox beside it. Is this possible?
I figure it would involve something like this. I can get…

Jippers
- 2,635
- 5
- 37
- 58
9
votes
1 answer
Simulate mixture data with different mix dependecies structure between each two variables?
I would like to simulate a mixture data, say 3 dimensional data. I would like to have 2 different components between each two variables.
That is, simulate mixture data (V1 and V2) where the dependencies between them is two different normal…
user7905871
9
votes
2 answers
How does Simulink simulation engine work?
I would like to understand how Simulink simulation engine works. Does it use a discrete event simulation mecanism (then how continous time is handled ?) ? Does it rely on a static cycle-based code generation ? Or ?

JCLL
- 5,379
- 5
- 44
- 64
9
votes
1 answer
Nearest Neighbors in CUDA Particles
Edit 2: Please take a look at this crosspost for TLDR.
Edit: Given that the particles are segmented into grid cells (say 16^3 grid), is it a better idea to let run one work-group for each grid cell and as many work-items in one work-group as there…

sarasvati
- 792
- 12
- 30
9
votes
1 answer
How to vectorize a random walk simulation in MATLAB
I am rewriting a Monte Carlo simulation model in MATLAB with an emphasis on readability. The model involves many particles, represented as (x,y,z), following a random walk over a small set of states with certain termination probabilities. The…

turtlesoupy
- 325
- 4
- 7
9
votes
2 answers
Is it possible to build a heatmap from point data at 60 times per second?
I'm working on a simulation for clouds (actual clouds) where the clouds are simulated by 3D points, then projected into a 2D heatmap, about 640x480 units big. The number of points is about 50k, which is as small as I can go without the simulation…

Anne Quinn
- 12,609
- 8
- 54
- 101