• Keine Ergebnisse gefunden

Formal Specification

The formal specification of CHnMMs will be split into two parts: First, we specify the elements of the original HMMs (cf. Section 2.1) that are adequate for CHnMMs as well. Afterwards, the new addition that are specific to CHnMMs are specified. The parts of the HMM specification that apply to CHnMMs as well are:

• The internal behavior of the model causes the emission of symbols from the set{V1, . . . , VM}, which can be observed externally.

• CHnMMs have a discrete state space consisting of N states S1, . . . , SN. However, in contrast to HMMs, for CHnMMs the discrete state no longer fully specifies the current model state alone; the elapsed durations of all activities has to be included in a state description as well.

• The discrete state after the tth symbol emission is represented by the symbol qt∈ {S1, . . . SN}

• The probability of the model to be in each of theN states at timet= 0 is given by an initial probability vector Π∈RN with elementsπi=P(q0= Si). Since all elements are probabilities,∀i:πi≥0 and (P

iπi) = 1 have to hold.

• The state change behavior of the model is given by a matrix Awith size N ×N, whose entries aij describe the conditions under which the state change from discrete state Si to discrete state Sj occurs. However, for CHnMMs the matrix elements are no longer numbers, but have to contain more complex specifications of the activities whose completion changes the discrete state. The exact definition of this state transition matrix will be given in the following.

Furthermore, CHnMMs have additional properties beyond HMMs:

• Since CHnMMs model systems with activities of non-Markovian durations, they can no longer be specified by constant probabilities. Instead, the state change behavior of the model is directly specified by a set ofK activities T R = {T R1, . . . , T RK}, of which each activity T Ri 1 is specified by a tuple (dist, id, b(v), aging):

– distspecifies the continuous probability distribution that determines the duration of the activity until it is completed and causes a discrete state change.

– id ∈ N is a unique identifier of the state transition with the fixed value T Ri.id = i. The id is used to track activities that begin in one discrete state and continue in another. This is necessary since CHnMMs are of typeTkeepand thus the probabilitiy that an activity causes the next discrete state change depends on how long it has been active in previous discrete states.

– b(v) : {V1, . . . , Vk} 7→ R+0 is a function that determines the prob-ability with which the activity emits each symbol when causing a discrete state change. Since CHnMMs fall into the HnMM classEall, each activity is guaranteed to emit exactly one symbol upon causing a state change, formally requiring that

∀i∈ {1, . . . , K}:

M

X

j=1

T Ri.b(Vj)

= 1

1The more obvious choice of a symbol for activities would beAi, butAis already used for the state transition matrix in accordance with the HMM specification. T Riis used instead, since activities cause discrete statetransitions.

This definition mimics the definition of the symbol emission proba-bilities in HMMs (cf. Section 2.1).

– aging ∈ {true, f alse}. An activity may be interrupted by a state change, i.e. it may be active in one discrete state and inactive in the next one without having caused the state change and thus without having been completed. In those cases the value aging determines whether the activity continues when it is activated again (=true) or whether it restarts from the beginning (=f alse)

• The state transition matrixAspecifies the discrete state change behavior of the model. For HMMs it contained constant probabilities. Since in CHnMMs discrete state changes are caused by the completion of activities, here the matrixAcontains the activities fromT R. More concretely, every matrix entryaij of the state transition matrixAis either the one activity from {T R1, . . . , T RK}that causes the state change fromSi to Sj, or the special symbol∅when no such state change is possible.

One additional limitation on the matrixAis that activities cannot at the same time cause and not cause the next state change. To that end, each activity can be active at most once per discrete state and thus appear at most once in each row of A, formally requiring that

∀i, ∀j6=l:aij =T Rk⇒ail6=T Rk

Note that ASPNs (cf. Section 2.5) as a conceptual model for CHnMMs also enforce this limitation by requiring that at most one immediate transition is active at any given time and thus when an activity ends there is exactly one possible outcome.

All these symbols together define the behavior of a CHnMM. But since the states Siand symbolsVj are merely names that do not affect the model behavior, and since all elements of T R are also present in A, a CHnMM λ is already fully specified by the matrixAand the initial probability vector Π, i.e. λ= (A,Π).

3.3.1 Semantics

The semantics of a CHnMM specified that way are as follows: At any given time, the model is in one of the specified discrete states. Depending on that state, multiple activities may be ongoing at the same time. The durations of all activities are random (distributed according to known probability distributions) and depend on how long – if at all – the activities have already lasted in previous discrete states. The first activity to finish causes the next state change to another discrete state, and also the emission of an observable symbol. In this new state another set of activities is active. The activities from the old state may either continue in the new state, be interrupted to continue in a future discrete state (foragingactivities), or may be terminated and restart in a future state.

The activities that are active in the new state may either continue from the previous state or from the time when they were last interrupted by a state change (foragingactivities), or may restart.

3.3.2 Additional Notation

In addition to the specification of CHnMMs, the following notation will be used in this work in conjunction with CHnMMs:

• An observation o of a symbol emission is a tuple o = (v, e), where v ∈ {V1, . . . , VM}specifies the observed symbol andespecifies the time of the symbol emission.

• A trace O = o1o2. . . oT is a sequence of observations in chronological order, i.e. ∀i < j:oi.e < oj.e.

• For an activityT Ri with duration probability distributiondist, the func-tionspdf(dist),cdf(dist) andhrf(dist) define the probability density func-tion, cumulative distribution function and hazard rate function of the dis-tribution, respectively. For example, cdf(T Ri.dist)(5) returns the value ofT Ri’s cdf at positiont= 5.

• For a probability distribution dist, the boolean functionisExp(dist) re-turns whether the probability distribution is an exponential distribution and therefore Markovian.

This concludes the definition of CHnMMs and the introduction of additional notation that is used throughout the remaining work. For quick reference, all definitions given in this section are listed concisely in Appendix C. In the next sections we will show that these definitions are able to represent realistic sys-tems by showing how realistic problems informally specified as ASPNs can be converted to strictly formal CHnMMs.