摘要 |
A computer-implemented simulation method comprises modelling a target system as a set of processes and activities that communicate with each other by way of messages and signals. Each message is modelled by a data structure containing sender and receiver queues, and pointers to associated composition and decomposition activities. Similarly, each activity is modelled by a data structure containing a caller queue, and a pointer to an activity process. The simulator uses scheduler queues (event and delta queues) to schedule changes to the state of the model. Each item in each scheduler queue has a type value which indicates whether it relates to a process, activity, message or signal, and items are processed in different ways according to their type. A process-type or activity-type item is processed by calling the process or activity to which the item relates. A message-type item is processed by calling both the sender and receiver processes of the message to which the item relates. A signal-type item is processed by updating the signal state and calling all processes that are sensitive to the signal. A message is scheduled only if at least one sender and receiver exist for the message.
|