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
0
votes
0 answers

Solved: Car.py in Salabim causes infinite loop on python 3.8

I'm following the manual of salabim 23.2.0. My Python version is 3.8.2. When I'm running the first example. i.e., Car.py: # Car.py import salabim as sim class Car(sim.Component): def process(self): while True: …
Yu Chen
  • 1
  • 1
0
votes
1 answer

How to simulate a starting queue before opening times in a Simulation process with Simpy?

I am studying SimPy and I came across this interesting tutorial that allows to simulate a queue in a bank. I wanted to know if it is possible and how to create an initial queue. Let's assume that the bank opens at 09:00 but we have already 20…
0
votes
0 answers

CGEventPost only working when application is debugged

In my application i want to emulate key strokes. Therefore i am using the CGEventPost API. CGEventRef keyEvent = CGEventCreateKeyboardEvent(NULL, keyCode, down); (*) CGEventPost(kCGHIDEventTap, keyEvent); CFRelease(keyEvent); I build my project…
StillWaters77
  • 15
  • 1
  • 4
0
votes
0 answers

Resetting R simmer environment for Monte Carlo replications

I would like to run Monte Carlo replications of my simmer simulation and was wondering if there is a way to do this without calling simmer::simmer() within the replication loop while still ensuring that new simmer::timeout() values are randomly…
Aorus
  • 128
  • 6
0
votes
2 answers

Creating resources for ResourcePool with specific parameters throughout simulation Anylogic

I am modelling an inventory management system in Anylogic by means of Discrete Event Simulation. Throughout the model, new resources are added according to a dataset in excel. I modelled this with a source block. In the source block, several…
Marcelle
  • 11
  • 1
0
votes
1 answer

Creative ways to simulate a change on an input field

I am building a chrome extension which needs to be able to change the value of a text field in what I believe is a ReactJS webpage (I'm writing the content script which executes in the page), but the traditional ways that would do so won't work…
umop
  • 2,122
  • 2
  • 18
  • 22
0
votes
1 answer

Simpy: Items in a Store disappear while modelling a CarFleet with a SimpyStore and conditional events

I am modelling the usage of a car fleet. (sourcecode attached below) The car fleet is represented by a SimpyStore with elements {0}...{9} Cars can be "requested" by daily occurring "trips", if successful cars are being rented by a trip and then…
MacUserXL
  • 35
  • 5
0
votes
1 answer

How can I run different experiments for the same network from the same .ini file?

I am simulating a datacenter topology in omnet++. I have a network called Test with different parameters. So, I need to run two experiments for this network. [Net] network = Test *.fwdAlgorithm = "sp" [Net] network = Test *.fwdAlgorithm = "ksp" So…
0
votes
3 answers

Generating Agents of Same Type with Different Colors by Uniform Distribution - AnyLogic

Hello there, I am trying to add a source that generates agents with different colors that are randomly populated based on a non-uniform distribution. For example, I'd like to see this source generates 50% of the agents having orange or 10% of them…
0
votes
0 answers

AnyLogic - How can I prioritize a pool of employees with Quality Matrix?

I have a pool of 10 employees. These employees are to operate two machines. 7 of these employees can operate machine A better than the remaining 3, who can operate machine B better. Example: Worker XYZ works on machine A, on which he is better. On…
name123
  • 65
  • 8
0
votes
1 answer

Creating a dataset from queue size in service block

I am a newbie to anylogic simulations. In my project, I want to take out queue size at every time step from a service block and create a dataset. Similarly, I also want to take out the mean queue size from the same after every replication and create…
0
votes
1 answer

Why isn't my Simpy resource keeping a queue?

I've been working for around a week to learn SimPy for a discrete simulation I have to run. I've done my best, but I'm just not experienced enough to figure it out quickly. I am dying. Please help. The system in question goes like this: order…
0
votes
1 answer

In Simpy simulation, how can I escape from infinite loop

I have an endless loop problem in Simpy simulation. My scenario is: After finishing triage, a patient wait until getting empty bed. However, if there is no empty bed, the patient should wait until an empty bed is available. When a patient uses a bed…
0
votes
1 answer

Specifying simulation end time in terms of number of events in omnet++

In omnetpp.ini, to end a simulation we specify: sim-time-limit = 10s (say) How to specify this in terms of number of events. Does OMNeT++ have a related parameter in built?
Pasha M.
  • 340
  • 1
  • 12
0
votes
1 answer

How to end a process in Simpy simulation

I am a newbie to SimPy and am trying to get the following done. Simulate processes, where each has a different time delay. Once the first process is done, i am interrupting other processes, which i catch. But once in the catch block all these…