Questions tagged [simulation]

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.

5194 questions
6
votes
8 answers

How to build a mini-network of small programs feeding each other data?

I'm trying to simulate a real-time network where nodes are consumers and producers of different rates. How would I quickly implement a sample of this with Python? I was imagining that I'd write a simple program for each node, but I'm not sure how to…
victor
  • 6,688
  • 9
  • 44
  • 48
6
votes
3 answers

Fill matrix with loop

I am trying to create a matrix n by k with k mvn covariates using a loop. Quite simple but not working so far... Here is my code: n=1000 k=5 p=100 mu=0 sigma=1 x=matrix(data=NA, nrow=n, ncol=k) for (i in 1:k){ x [[i]]=…
Marie
6
votes
2 answers

Materials science for game programming

Does anybody know of a good resource for programming the behaviors of various materials interacting? Game programming physics resources usually cover collision detection, momentum, intertia, etc., but they seem to deal with a sort of idealized…
Buggieboy
  • 4,636
  • 4
  • 55
  • 79
6
votes
5 answers

Simulating sports matches in online game

In an online manager game (like Hattrick), I want to simulate matches between two teams. A team consists of 11 players. Every player has a strength value between 1 and 100. I take these strength values of the defensive players for each team and…
caw
  • 30,999
  • 61
  • 181
  • 291
6
votes
1 answer

time-based simulation with actors model

we have a single threaded application that simulates the interaction of a hundred of thousands of objects over time with the shared memory model. obviously, it suffers from its inability to scale over multi CPU hardware. after reading a little about…
akiva
  • 2,677
  • 3
  • 31
  • 40
6
votes
8 answers

How the dynamics of a sports simulation game works?

I would like to create a baseball simulation game. Are these sports management games based on luck? A management game entirely based on luck is not fair, but it cannot be too predictable either. How does the logic behind these games work?
Victor
  • 1,655
  • 9
  • 26
  • 38
6
votes
2 answers

Network interface simulation in Python?

I'm making a simulator for a digital radio using Python. The radio relays over RF one each of an RS-232 port and an Ethernet port, with a pair of radios making seamless pipes. Thus, the simulator will be used in pairs, with pipes between them…
BobC
  • 1,978
  • 3
  • 24
  • 26
6
votes
3 answers

Simulate a USB Device for Automation

I have to simulate a USB Device for automation and testing purposes (in Linux). Original driver/application for this device uses “libusb” to communicate with it. I don’t have much experience in Linux and Simulation, after some searching I have…
6
votes
3 answers

triggering an event with a certain probability with C#

I'm trying to simulate a realistic key press event. For that reason I'm using SendInput() method, but for greater result I need to specify the delay between keyDOWN and KeyUP events! These numbers below show the elapsed time in milliseconds between…
Alex
  • 4,607
  • 9
  • 61
  • 99
6
votes
4 answers

In R, how to generate a dataset consisting of the means of all column of a dataframe?

I can generate 20 observations of a uniform distribution with the runif function : runif(n=20) and 100 replicates of the same distribution as following. df <- replicate( 100, runif(n=20)) This creates df a matrix of dimensions [20,100] which I can…
user1357062
  • 83
  • 2
  • 5
5
votes
5 answers

Predator-prey simulation

I'm trying to implement a model of predator-prey. It is agent-based model. Every few milliseconds is a new move. On the field there are two types of creatures: predator and prey. The behavior of each of them is given by the following rules:…
5
votes
2 answers

Network traffic simulation test

I've got a PHP site up and running, and the db is mysql. before launching the site, I would like to test the traffic handling. Now am assuming that there are soe softwares that would simulate the traffic and log the processes running on my site. Any…
sys_debug
  • 3,883
  • 17
  • 67
  • 98
5
votes
4 answers

Modeling a linear system with Python

I would like to simulate/model a closed-loop, linear, time-invariant system (specifically a locked PLL approximation) with python. Each sub-block within the model has a known transfer function which is given in terms of complex frequency H(s) = K /…
benpro
  • 4,325
  • 4
  • 19
  • 17
5
votes
1 answer

Why does the moon spiral towards Earth in simulation?

I am trying to simulate a somewhat realistic program where Earth and the moon can interact gravitationally with each other. Now the problem is that the moon keeps on spiraling towards Earth and I don't understand why. This is my code: from math…
Hale
  • 163
  • 5
5
votes
1 answer

Bifurcation diagram of dynamical system

TL:DR How can one implement a bifurcation diagram of a seasonally forced epidemiological model such as SEIR (susceptible, exposed, infected, recovered) in Python? I already know how to implement the model itself and display a sampled time series…
Jared Frazier
  • 413
  • 1
  • 4
  • 10