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.

61 questions
5
votes
1 answer

How to improve Brownian motion monte carlo simulation speed?

I want to make my code run faster for more iterations and runs. Right now my code is too slow, but I don't know what to change to speed it up. I began by coding a kinetic Monte Carlo simulation, then editing it to become a Brownian motion…
4
votes
3 answers

Use routing logic when dispatching resources with simmer package (or an alternative)

Is there a way to use a (customized) routing engine together with the simmer package for discrete-event simulation? (or an alternative package) Context: I'm running dicrete-event simulations (DES) with R. Till now all my simulations are built…
symbolrush
  • 5,643
  • 27
  • 47
3
votes
4 answers

ruby - calculating time in supermarket queue

So suppose there is a queue for the self-checkout tills at the supermarket. I'm trying to write a function to calculate the total time required for all the customers to check out! Input: customers: an array of positive integers representing the…
Sam P
  • 107
  • 5
2
votes
1 answer

Can I use simpy to do agent-based simulation?

I know that simpy is a process-based discrete-event simulation framework. I have several agents that might do different things at the same time. Can I still use simpy to simulate my agents? For example, a car arrives to a parking lot. Then the…
2
votes
2 answers

Discrete Event Modelling - Simpy - how to model complex dependencies?

I am new to Simpy and I am having troubles figuring out how to model a process scheduler that has complex dependencies. High-level summary of my problem: I have a warehouse that receives boxes containing items through an entrance. The boxes are put…
Radu
  • 968
  • 1
  • 10
  • 20
2
votes
1 answer

Simmer in R: Modelling changes in server capacity based on queue length and duration

I am attempting to model a system as follows: Arrivals generate according to a predefined schedule and have known processing times supplied by a dataframe. There is a single server with a capacity equal to min_daemons at the beginning of the…
Jack Rossi
  • 21
  • 1
2
votes
1 answer

Simmer Get_attribute | there is no arrival running error

first of all, this simmer_vignette and this linkadvanced_simmer_usage seem to indicate that the error stems from the fact that "get_name, get_attribute and get_prioritization are meant to be used inside a trajectory; otherwise, there will be no…
fußballball
  • 169
  • 12
2
votes
2 answers

Which books are used today to learn discrete-event simulation?

I just got enrolled in a program that starts me in researches about new Networks Protocols, and my first assignment is to learn about Discrete-Event Simulation. It was recommended 2 books: Simulating Computer Systems: Techniques and Tools by Myron…
Loic1472
  • 33
  • 3
2
votes
1 answer

Adding hosts periodically in OMNeT++

I have a network setup of 100 hosts, which have to enter the network one by one, until all have joined for a 24 hours simulation time (one option is to have one joining every 864 seconds). I am interested in counting the multicast messages…
2
votes
0 answers

Touch events losing the `touches` property when fired in Chrome extension context

I'm trying to simulate touch events from a Chrome extension. I'm using developer tools' in device mode in order to simulate a touch enabled browser. When I run the code that simulates the touch event in the context of the document (selecting
Motti
  • 99,411
  • 44
  • 178
  • 249
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,128
  • 6
  • 22
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
  • 11
  • 5
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

Discrete event simulation (DES) with R simmer package

I am trying to learn DES with R for solving maintenance optimization problem. However, I am getting very confused if it is actually a good tool for this. As an initial trial, I have posted here a very simple problem where a component is functioning…
Rel_Ai
  • 337
  • 1
  • 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
2 3 4 5