This is for a simulation model:
Most questions I've come about deal with how to code an generator with exponential arrival times.
But I'm currently stuck on how to program a generator where the arrival rate can change within a discrete event simulation.
In particular I'm stuck with the following case: my generator has an input port which accepts an arrival rate (double). If this rate change arrives exactly when an entity is generated, I can simply create the entity, update the rate parameter for the distribution and sample a new arrival time.
But what should I do when the generator at time t1 receives a new rate input event and is already scheduled to create an entity in the future t2 -
Should I a) Abort the creation at t2 and schedule a new creation time using the new rate parameter or b) Just update the rate parameter, let the generator create the entity at t2, and then sample a new arrival time