Function cmb_event_queue_initialize
Defined in File cmb_event.h
Function Documentation
-
void cmb_event_queue_initialize(double start_time)
Initialize the event queue itself. Must be called before any events can be scheduled or executed. Expects to find an empty event queue.
Call at the beginning of your simulation trial to start from a fresh state. Make sure to call
cmb_event_queue_terminateat the end of your trial to free up space.Note that there is no
cmb_event_queue_create,_reset, or_destroy. There ìs only one (thread local) event queue per thread, no need to create another. Hence, no need for the usual self-pointer as the first argument to this function either, it acts on the one and only event queue in this thread.Calling
cmb_event_queue_initializeagain on the next trial in the same worker thread without callingcmb_event_queue_terminateat the end of the previous trial will fire an assert about the event queue not beingNULLincmb_event_queue_initialize.- Parameters:
start_time – The starting value for the simulation clock, usually 0.