Questions tagged [event-simulation]

Simulation of a action or occurrence detected by the program that may be handled by the program. Typically events are handled synchronously with the program flow, that is, the program has one or more dedicated places where events are handled, frequently an event loop.

Simulation of a action or occurrence detected by the program that may be handled by the program. Typically events are handled synchronously with the program flow, that is, the program has one or more dedicated places where events are handled, frequently an event loop. Typical sources of events include the user (who presses a key on the keyboard, in other words, through a keystroke). Another source is a hardware device such as a timer. Any program can trigger its own custom set of events as well, e.g. to communicate the completion of a task. A computer program that changes its behavior in response to events is said to be event-driven, often with the goal of being interactive.

90 questions
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…
1
vote
1 answer

How do I synchronise a flight schedule with my AnyLogic simulation agents?

I am completely new to AnyLogic. I am creating an airport simulation. I want to link an excel file with the flight schedule (departure time, check-in desk, gate number) so that the agents follow this flight schedule synchronously, so how do I do…
Hana Omar
  • 21
  • 2
1
vote
0 answers

SimPy - infinite run time bug

I have observed some "odd" behaviour with SimPy event scheduling. When a nan value, is used as the delay in the env.timeout method, it sometimes, overwrites the until = XXX parameter inside the env.run method. I have outlined a minimal example, to…
Hector Haffenden
  • 1,360
  • 10
  • 25
1
vote
0 answers

Simulate Touch Event on iOS - jailbroken - iOS13+

Are there any tweaks that can simulate touch event on iPhone without injecting into processes? I am looking for a tweak that can be used to simulate event at system level.
qwsae1
  • 13
  • 6
1
vote
1 answer

How to plot distance travelled on graph by agent(s) in Anylogic in Discrete Event Simulation?

Dear Anylogic Experts, I am trying to calculate the cost based on distance travelled by the agents in GIS environment. Does anyone know how can I calculate this? The final graph function is supposed to look like this: Distance moved by Agent in km…
1
vote
1 answer

Simmer plot resource usage by attributes

Is is possible to plot resource usage by attribute in simmer? So for example in this simulation: library(simmer) library(simmer.plot) workerCount <- 2 actualData <- data.frame( time = c(1:10,1:5), priority = 1:3, service = rnorm(150, 50, 5))…
user2547973
  • 343
  • 2
  • 9
1
vote
1 answer

Why is my program not calculating Mean Response Time accurately for a Round Robin (Quantum = 4) Scheduling Simulation Program in C?

for my assignment, we were given a program that would simulate a FCFS scheduling algorithm in C, and we were to modify it twice to simulate SJF and RR (Quantum 4) and compare the mean response times for each. I have completed the SJF version, but am…
1
vote
1 answer

How do I solve Segmentation Fault (Core Dump) error in my CPU Scheduling Simulation program in C?

I am very new to C and am getting a Segmentation Error when trying to run the following code (which is a program that originally simulated an FCFS scheduling algorithm, but I had to modify to simulate SJF) and I am not sure how to solve it. It is…
1
vote
1 answer

R simmer package - how to deal with parts disassembly/reassembly?

I'd like to code a simulation where all Items (A, B, C, ...) arriving are first disassembled into 2 parts. Item.subpart1 undergoes OPERATION1 directly and Item.subpart2 is collected in a batch (size = 4) before being processed with OPERATION2.…
1
vote
2 answers

Event driven simulation using priority queue implemented with binary heap

I need to simulate the execution of a set of tasks that are given. This means that you need to keep track of which tasks are active at any given point in time, and remove them from the active list as they finish. I need to use priority queue for…
user10216080
1
vote
2 answers

Simmer R package: Modeling 2 Patients Arriving with Constant Inter-Arrival Time

I realize there are not a lot of questions here about using the Simmer package for discrete events simulation in R, but I have gone through all the vignettes and cannot find an answer to perform this seemingly simple task. I would like to model 2…
mbc
  • 13
  • 3
1
vote
0 answers

Discrete Event Simulation C++ (array backed heap for priority queue)

First, i understand that being spoon-fed answers will absolutely hurt me in the long run and that is not what i'm looking for. That being said, here is the main point of the assignment: "We are going to model a simple island-hopping attack on a…
jaden8123
  • 11
  • 1
  • 3
1
vote
1 answer

AnyLogic: Look ahead simulation

Is it possible to perform look ahead simulation in AnyLogic? Specifically: Simulate till time T. Using 2 values of a variable, simulate for both values till T+t in parallel. Evaluate the system state at T+t, choose the value of variable which leads…
1
vote
0 answers

Simulate Pressing Multiple Keys Simultaneously

Can you simulate the keystroke shift+ enter in javascript? Basically when a user presses enter on the keyboard while in a div where contenteditable=true I want it to be as if they held down shift and enter at the same time. something like the…
webDev
  • 109
  • 9
0
votes
0 answers

Discrepancy between simulated & analytical number of packets in OMNET++

Problem: I am working on a QueueModel in OMNeT++ that involves two input sources generating packets for a server. My aim is to simulate a queueing system and compare the number of packets generated by the simulation against analytical…