6.7 Summary

This chapter introduced the concepts involved in process view modeling. The process view perspective enables the modeler to imagine that they are the entity, experiencing different activities while using resources. The model development approach focuses on what happens to an entity and results in a process description. A process is a set of activities that change the state of the system. The execution of a process by an entity causes events and state changes. As such, the underlying mechanisms for implementing the process view are still predicated on understanding the event view. However, the process view allows for a more natural modeling of the flow of events.

The following new KSL constructs were discussed in this chapter:

Entity: An inner class of the ProcessModel class that facilitates the definition of processes for the process view.

ProcessModel: A sub-class of the ModelElement class that contains the architecture for defining and running coroutines that form the basis for the process view.

KSLProcess: The class that wraps the Kotlin coroutine functionality to enable the process view. Instances of this class are created by the process() function builder.

ResourceWithQ: This KSL construct provides a resource with a queue that can be seized and release by entities within a process.

EntityGenerator: This KSL class provides functionality to create entities according to a pattern represented by a time between creation and time between creations. Once the entity is created it will be automatically activated.

HoldQueue: This class will hold an entity in a queue until the entity is removed. It provides a hold() function that suspend the process until the entity is removed and resumed.

Signal: This class allows the entity to wait for a signal to occur before proceeding within a process.

BlockingQueue: This class will hold entities in a channel for receivers and senders of entities. Receivers may block waiting for an entity to appear in the channel and senders may block if space is not available in the channel.

activite(): This function is used to schedule the start of an entity’s process.

seize(): This suspending function allows an entity to request a resource and if not available suspend.

release(): This function causes an allocation of a resource to be returned.

delay(): This suspending function suspends the process until a time period has elapsed.

use(): This suspending function combines the seize, delay, release functions.

waitFor(): This suspending function allows a process to suspend until another process completes or to suspend until a signal occurs.

Based on the constructs discussed so far, very complex systems can be modeled using the KSL. In the next chapter, we explore additional advanced modeling constructs.