Stimuli Model

The Stimuli Model contains stimulus and clock objects.

Stimuli

A stimulus is responsible to activate processes. The following different types are available:

It is possible to define a deviation of time for every type of stimulus. For this, a stimulus can have an object of type Deviation, which refers to the deviation in the common model. This reference uses the class Time as parameter for the generic values of the deviation. So the deviation is about time. The values (negative or positive) represents a shift of the activation to left or right on the time line. In this way it is possible to increase or decrease the activation time.

Mode label lists

It is possible to define lists of mode label values for a stimulus. An entry in this list is always a pair of a mode label and a mode literal.

The set-mode-labels-list indicates: Each time the stimulus is triggered all mode labels in this list are set to the corresponding value.

The enabling-mode-label-list and the disabling-mode-label-list can be used to enable or disable a stimulus by setting the mode label to a specific value (e.g. by a write access with a runnable).

Meaning:

disabling-list
true false
enabling-list true disabled enabled
false disabled disabled

Single

Single allows to specify an activation at a single relative point in time. The first activation occurs after the time units specified by activation.

Periodic

Periodic allows to specify periodic activations based on an offset and a recurrence. The first activation occurs after the time units specified by offset, and then every following activation occurs after the time units specified by recurrence. This means, in general, an activation of instance i is triggered at time t = offset + i * recurrence.

The following figure shows a Periodic stimulus example with a fix offset and recurrence time.

In addition, the same Periodic stimulus can be extended by a Gaussian deviation. The activation time varies then according the values of the distribution, as depicted in the following figure.

Besides the deviation, a Periodic stimulus can also have a clock.

Synthetic

Synthetic allows to specify a periodic activation of trigger times. It is defined by a list of timestamps triggerTimes of size m, a period recurrence, and an offset offset. Each timestamp in triggerTimes specifies a single activation at a relative point in time. The moment in time these timestamps are relative to is defined the following way: an activation of instance i is triggered at time t = offset + floor(i / m) * recurrence + triggerTimes[i modulo m].

The following figure shows a Synthetic stimulus example with two periodic activations after the time units T1 and T2.

Arrival Curves

An arrival curve is described as a list of time-borders in which a specified number of events are expected. The picture below shows an example for this. In the first picture there is a number of events on a timeline.

In the picture below every distance between two events is measured. The minimum and the maximum distance is added to the table as time-border for the occurrence of two events. This means that after one event there has to be at least a gap of one time-unit before the next event can occur. It also means that there will be always a second event within eight time units after the event before. Basically this would be enough to describe an Arrival Curve Stimulus. But it is possible to create a more precise stimulus by describing additional time borders for greater number of events. This is shown in the steps below.

The same as for two events in the picture above is done here for three events. Like already mentioned above, this is an additional restriction for occurrence of an event.

And for four events:

The picture below shows the table as arrival curve graph. The red line is the upper-time-border that shows the latest time where the event will occur. The green line shows the earliest possible time where the event can occur.

Clocks

A clock is a time base which describes the progress of time for one or more periodic stimuli in relation to global time. If two equal stimuli have a different time base, the time of task activation can be different. There are different kind of clock functions, the clock sinus function, the clock triangle function and the clock multiplier list. The clock multiplier list is a list of timestamp-multiplier value pairs. Is a specified timestamp arrived, the clock changes to the corresponding multiplier value.