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
1
vote
0 answers
Simulating multiple keypress upon press of a button in Javascript
how can I simulate (trigger) multiple keypress upon press of a button using javascript (javascript and html), while having the window being the event target.
I basically wish to create a button, when it's clicked, it will simulate (trigger) ctrl+w
I…

skyblue_bluesky
- 11
- 1
1
vote
2 answers
R: Select vector (numeric) from data frame, sample n=10 subsets of size i=5 and i= 10 within vector and calculate mean for each of these samples
I have the following problem:
Have a data frame, i.e. containing two vectors "Name" and "Values", one as text and one with numeric values, with 20 rows and 2 columns
I want to extract "Values" and sample randomly (with equal weight) 10x a subset of…

eternity1
- 651
- 2
- 15
- 31
1
vote
2 answers
Grouping and Identifying the Maximum During a Simulation in R
I am trying to do some simulations in R and I am stuck on the loop that I need to be doing. I am able to get what I need in one iteration but trying to code the loop is throwing me off. This is what i am doing for one iteration.
Subjects <-…

Joe Trafficante
- 23
- 2
1
vote
1 answer
Simulating variables based on other variables in R
I wish to simulate a set of categorical variables which correlates with a simulated numerical variable. More specifically, I have variable the age which is defined like: age <- rnorm(n=1000, mean=35, sd =9) and I wish to simulate another variables…

Quantizer
- 275
- 3
- 13
1
vote
1 answer
How do I generate a partial view of a mesh as a point cloud in Python?
I have a dataset of meshes, which I want to use to generate partial view data as point clouds. In other words, simulating the way an RGB-D sensor would work.
My solution is very naive, so feel free to disregard it and suggest another method.
It…

Andrei Miculiță
- 321
- 1
- 11
1
vote
1 answer
Anylogic Error Source Arrival Table in DB based Variable (Not Unique Database Value!)
I have combo box in experiment screen with options : Lala, Poo, and Twinky. They will be input in variable as initial value. Lala, Poo, and Twinky. Also their database for arrival table :
I am trying to make source based on variable as below :
but…

Pandu Purwadi
- 21
- 6
1
vote
1 answer
Bouncing an object off a wall
I am trying to make a simulation of bouncing object with set borders and angles. I used the JS library P5.js.
My problem is, when the object touches the wall, it does bounce, but it also moves it to wrong position (mainly more to the bottom…

MatoX_svk
- 11
- 2
1
vote
1 answer
SystemC simulation misses the first iteration
I'm having difficulties with initiating the simulation.
Whenever I start a for loop, I always miss the first iteration of the loop.
Here is my code:
#include
#include
using namespace std;
SC_MODULE(cpu){
sc_in_clk clk {…

L. B.
- 13
- 2
1
vote
0 answers
mp4 video of a simulation is being skewed horizontally
I recently began programming a simulation for one of my high school classes. I have never worked in c++ before so I really should've done some practice programming first. Bear in mind this means my program is quite disorganized due to a rocky…

Malachy Crossan
- 17
- 1
1
vote
1 answer
Source Block: How can I set a custom rate of agent generation?
I want to generate agents from Source blocks on a custom schedule
For example: 2000 agents in 1st hour, 4000 agents in 2nd hour, 2000 in the third hour
How can I create such a Source block?
I am trying with
"Arrival Schedule" and "Rate Schedule" but…

Ankit PrabhatKumar
- 53
- 5
1
vote
0 answers
How to make a Netlogo evacuation model work?
Netlogo Simulation does not workI'm trying to make a simulation in NetLogo, where an evacuation takes place. At the moment, all the turtles walk to the doors, but I have no idea how to continue from here on, because it just is not consistent. Can…

Bram Hesselink
- 11
- 2
1
vote
1 answer
AnyLogic: How to show Time-average number of components in the queue of the operation in Graph?
I calculate the number of components in the queue. As you can see in the image below,
What I want to do is show the number of components in the queue with time.
How can I calculate the time-average number of components in the whole system?
Kindly…

Aqeel Tariq
- 315
- 1
- 8
1
vote
1 answer
quantile function in R in a resampling form for Bootstrap
I am currently reading Efron's book "An introduction to the Bootstrap" and I am focusing in the ABC confidence intervals section on chapter 14.Trying to implement this method I found that there exists a function in R from bootstrap package that…

Homer Jay Simpson
- 1,043
- 6
- 19
1
vote
0 answers
Trying to simulate a jump process in discrete time
I was trying to simulate a jump process in python, defined as follows:
Actually, in order to simulate the process, I evaluate its value at each time t, building an "history" of the values the process has taken. This is done accordingly to the…

King Powa
- 441
- 3
- 9
1
vote
0 answers
Update simulation results into a live-dash-graph
I've done a simulation and while the code is running I want to show a live-updating-graph.
In this case I want to show the cost in every week.
X= date, y= cost.
The last part of simulation code is something like:
def simulation(path, df, orders,…

K-Chris
- 11
- 1