article

Paul Toone avatar image
0 Likes"
Paul Toone posted

Event Types and Related Properties   

Events are the most common way to link to a process flow from a simulation model. The two process flow activities that can listen for events are the Event-Triggered Source and Wait for Event activities. (See Key Concepts about Event Listening Activities for more information.)

There are two basic types of events: standard events and value change events. In a process flow, the type of event you are listening for will affect which properties are available on the event-listening activities. For example, when a Wait for Event activity is set to listen to an item entering a processor, the Label Assignment property would become available because an item entering a processor is a standard event.

The following table explains the two different types of events and their related properties:

Type of Event Definition Examples Related Properties
Standard Normal events that are fired during the simulation.
  • An item enters a fixed resource in the simulation model
  • A token enters an activity in a process flow
  • An item finishes being processed in a processor
  • An item exits a fixed resource
Label Assignment
Value Change Events that happen when some value in the model (usually a statistical value) changes.
  • OnInputChange
  • OnOutputChange
  • OnContentChange
  • OnStaytimeChange
Change Rule

These properties are explained in the following sections.

Label Assignment

The Label Assignment table (which might also appear as the Label Matching/Assignment table) will become available on an event-listening activity when that activity is listening for a standard event. You can use this table to assign or match a label to a token for tracking purposes. The Event-Triggered Source will assign the label to the token it creates; the Wait for Event activity will assign the label to the the token that entered the activity and triggered the event-listening.

You can leave this table blank if you don't need to do any label operations.

Parameter Rows

The rows in the Label Assignment table will vary depending on the specific event that the activity is listening for. Each simulation event has a set of parameters (sets of information) that it tracks. For example, the following image shows the Label Assignment table for the OnEntry event on a fixed resource:

In this example, notice that the first row is the Entering Item. This row is a reference to the item that is entering the fixed resource. The second row is Input Port which is a reference to the port number from which the fixed resource received the flowitem.

Most of the time, the name of the row will be descriptive enough to give you a good idea of its reference point.

Label Name

When using an Event-Triggered Source activity, the cells under the Label Name column determine the name of the label that will be created on the created token for this reference point. To use the previous example, you could create a label called item or itemID to refer to the entering item.

When using a Wait for Event activity the Label Name column will behave differently based upon the selected Operation (as described below). You are not limited to a label on the entering token. Periods separating label names can be used to reference labels on objects that the token has a reference to. For example, if the entering token has a label called operator which references another token or a task executer object in the model you can enter operator.item to reference a label on the operator.

Operation

The Operation column is only available for the Wait for Event activity. If you click on any cell under the Operation column, it will open a menu. The option you choose will determine what operation will be performed on the given label. The menu has the following options:

  • none - The default value. Does nothing with the label.
  • match - This will match the label's existing value to the parameter that is being referenced. The token will only finish the activity when the event fires AND the event's parameter matches the value of the token's label. For example, you may be tracking an item through the system. The token's item label points to the flowitem in the model. You want to catch when that specific item enters a fixed resource (like a queue) in the model. To do that, you can subscribe to the OnEntry event of the fixed resource, and then for the Entering Item row of the table, enter item in the Label Name column, and match as the operation.
  • assign - This will assign the involved parameter value to the token's label value.
  • insert at front - This operation is like the assign, except that if the label already has a value, it will make the label value into an array and push the new value to the front of the array. You can use this option if perhaps you are looping and you want to accumulate values into an array on the label.

Will Override Return Value

Event-listening activities have the ability to override the return value of events they listen to. For example, you may want to perform some complex logic using Process Flow to define the Process Time of a Processor. To do this, first check the Will Override Return Value checkbox in the activity's properties. Next define the set of activities that determine the return value. Here you must make sure that none of these activities will cause any type of delay, such as a waiting operation or explicit Delay. Otherwise the return value will not be calculated properly. At the end of your block of activities place a Finish activity. The Finish activity allows you to define a return value for your overriden function and then destroys the token. In our example, the return value will become the Process Time of the Processor.

No Delays When Overriding Return Values
Using the Override Return Value functionality with activities that wait or create delays will cause the Finish activity to evalute the return value before the token arrives at the Finish and may result in unexpected return values.

Change Rule

The Change Rule properties will become available on an event-listening activity when that activity is listening for a value change event. You can use these properties to determine the conditions that will trigger the event. Usually this will be a statistical change of some sort. When these conditions are in place, the Event-Triggered Source activity will create a token and release it to the next downstream activity; the Wait for Event activity will release the token to the next downstream activity.

The following image shows the Change Rule properties:

The following sections describe the different Change Rule properties:

  • Change Rule You will use the Change Rule menu to determine the conditions that will trigger an event. The menu has the following options:
    • Change - The event will be fired whenever the value changes at all.
    • Increase - The event will be fired whenever the value increases.
    • Decrease - The event will be fired whenever the value decreases.
    • Arrive At Value - The event will be fired whenever the value changes to a specific user-defined value.
    • Increase To Exact Value - The event will be fired whenever the value increases to a specific user-defined value.
    • Decrease To Exact Value - The event will be fired whenever the value decreases to a specific user-defined value.
    • Increase To Or Through Value - The event will be fired whenever the value changes from being less than a user-defined value, to being greater than or equal to that value.
    • Decrease To Or Through Value - The event will be fired whenever the value changes from being greater than a user-defined value, to being less than or equal to that value.
    • First Increase - The event will be fired whenever the value changes from decreasing to increasing.
    • First Decrease - The event will be fired whenever the value changes from increasing to decreasing.
  • Value Defines the user-defined value associated with the Change Rule. This is only needed for change rules with required values, such as Arrive at Value.
  • Fire If Intial Value Meets Rule If checked, the event will fire immediately (finishing the activity) if when the token first arrives, the value already meets the defined rule. For example, if are listening to a Zone's OnContentChange event, and you've defined the Change Rule as Arrive At Value with a Value of 5, then when the token arrives, if the Zone's content is already at 5, the event will immediately fire and the token will pass through the activity. This field is only applicable if the Change Rule uses an involved value, and if the activity is a Wait for Event.

Additional Event Binding Requirements
In some cases, depending on the event you subscribe to, there may be additional fields required in order to properly bind to the event. For example, if you bind to a List's OnContentChange event, you will need to provide the Partition ID that you want to listen to. Just enter the Partition ID in its corresponding field.

flexsim users manualuser manuals
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Article

Contributors

paul.t contributed to this article

Navigation

FlexSim 2016.1