Questions tagged [simulation]
59 questions
100
votes
6 answers
What's the difference between simulation and emulation
I frequently see Simulation and Emulation in computer science. These two terms seem synonymous. Is there any difference between Simulation and Emulation?

user
- 2,170
- 8
- 25
- 36
41
votes
4 answers
What algorithm is used by elevators to find the shortest path to travel floor orders?
I'm trying to simulate an elevator, as always I started very simple by taking only a single order at a time, then added memory to the elevator in the form of queues so that floors are traveled in the order in which they were pressed, which obviously…

Raed Tabani
- 537
- 1
- 4
- 7
19
votes
5 answers
Algorithm to Find the Aggregate Mass of "Granola Bar"-Like Structures?
I'm a planetary science researcher and one project I'm working on is N-body simulations of Saturn's rings. The goal of this particular study is to watch as particles clump together under their own self-gravity and measure the aggregate mass of the…

Stuart Robbins
- 291
- 1
- 5
15
votes
3 answers
elevator algorithm and implementation
I wanted to know how (real) elevators work. But, so far, I could not find much material about the algorithms they use, nor software (if any) for simulation. Could anybody give me references for that?

Banana
- 479
- 1
- 4
- 12
9
votes
2 answers
How would I combine 'Command' and 'Composite' to simulate a time delay?
As a learning exercise (I am not in school - just an old guy trying to learn something new), I am trying to write a logic gate simulation that incorporates propagation delay. The user should also be able to group gates together to create…

Neil Mussett
- 203
- 2
- 6
8
votes
6 answers
Is there a way to speed up a big switch statement?
As a practice I'm working on a CPU simulator (runs at about 1.78MHz) and I'm using a switch statement to execute correct opcodes based on the value in the IR (instruction register) variable. This switch statement needs 256 cases. While it may not be…

NMITIMEN
- 129
- 1
- 2
8
votes
2 answers
Is there any better approach to shortest path finding within a (vehicular) traffic network?
Dear fellow programmers,
We're developing software which simulates vehicular traffic.
Part of the process called "assignment" is concerned with assigning vehicles to their routes and has to use some kind of shortest-path-finding…

Greg Kramida
- 282
- 2
- 12
6
votes
2 answers
Best approach to selecting programming languages and 3D graphics API for simulating physics experiments
I am starting a research project and need to nail down a programming language and 3D graphics API where I will be creating an environment in the field of molecular cell biology where I will be simulating a large range of experiments in silico. This…

wi1
- 256
- 1
- 7
5
votes
4 answers
Parameterize Agent Based Simulation (OOP-Question)
I'd like to hear my fellow programmer's thoughts on the issue of parametrizing agent based simulations:
Consider:
Simulation core, including geometry, collision tests, some rules
Different agents (modelled in OOP-fashion: has-a, is-a, abstract…

edgar.holleis
- 151
- 3
4
votes
1 answer
Massive Simulator Software Architecture
I am looking to perform a large overhaul on a complex simulation system that simulates several instances of several vehicle models in a classroom training environment. For example, 24 students may be running simulations on three different vehicles…

Gren Meera
- 69
- 5
4
votes
1 answer
Parking Simulation Software Design
I've been requested to develop a quite well known problem for a job interview. The Parking Simulation which an example can be found here.
I came up with some ideas for which design pattern should I use and so on, but I got confused when I searched…

Patrick Bard
- 337
- 1
- 3
- 10
4
votes
1 answer
How to define the motion path of one object on a surface of the other one?
I have an uncommon problem. There are 2 3D objects, which are represented by arrays of vertices and triangles (.stl files). Each of them contains a big enough amount of vertices: 1-10 mln ones. The surfaces of these models are rough, and can contain…

Eugene
- 169
- 4
3
votes
2 answers
Best practices for testing settings file with many parameters in simulation code
I'm conflicted as to what is the best way to approach this problem.
I am writing a simulation in Python, which is parametrized by ~ 50 parameters. I have a JSON file where these parameters are set, so that it is simple to modify them and perform…

jfaccioni
- 496
- 2
- 8
3
votes
3 answers
How to simulate living things in software
I was thinking about creating a simple game/simulation where cars drive around in a city as part of a pet project.
That made me think how I would simulate these individual cars in a simulated world. How would you cope with the following:
The…

bvanvelsen
- 139
- 2
3
votes
3 answers
How to create simulator for distributed algorithms written in simple language
I started development of simulator for simulation of distributed algorithms in language C. My work consist of creating simple language for algorithm description and simulator which takes the described algorithm and simulates it.
At first I decided…

M.Puk
- 133
- 4