    Next: 2.5.4 An example of Up: 2.5 More Examples Previous: 2.5.2 An example of   Contents

## 2.5.3 An example of orthogonal components

Orthogonal components are states with [CS] property (short for Concurrent State). According to the definition of orthogonal components, if a state is an orthogonal component, all its siblings (other states of the same parent) must also be orthogonal components. Orthogonal components must also be default children of their parent, so they must have [DS] property.

An example of orthogonal components (orthogonal1.des) is included below:

```STATECHART:
A [DS]
B
B1 [CS] [DS]
B11 [DS]
B12
B121 [CS] [DS]
B122 [CS] [DS]
B2 [CS] [DS]
B3 [CS] [DS]

TRANSITION:
S: A
N: B
E: e

TRANSITION:
S: B.B1.B11
N: B.B1.B12
E: f
```

The result of the simulation of this model in text model is:

```['A'] > e
['B.B1.B11', 'B.B2', 'B.B3'] > f
['B.B2', 'B.B3', 'B.B1.B12.B121', 'B.B1.B12.B122'] > exit
```

In this example, B1, B2 and B3 are siblings because they are all children of state B. They are orthogonal components with [CS] property and [DS] property. When the model goes to state B because of event e, it is concurrently in the three states: B.B1.B11 (the default substate of B.B1), B.B2 and B.B3. The current state is printed to the screen as a Python list: ['B.B1.B11', 'B.B2', 'B.B3']. (The sequence of the components in this list is unimportant.) When event f is received, the model goes to state B.B1.B12. Orthogonal components B.B2 and B.B3 are unchanged. B.B1.B12 has two orthogonal components as its children. As a result, there are 4 components in the current state: ['B.B2', 'B.B3', 'B.B1.B12.B121', 'B.B1.B12.B122'].    Next: 2.5.4 An example of Up: 2.5 More Examples Previous: 2.5.2 An example of   Contents
Thomas Huining Feng
2004-04-05