## 3 Implementation of AOG Network Mechanism within OENNs
### Networking of Glands  
A complete structure of networked glands and integration of formed structure within the OENN system is presented in Figure 2. In the continuation of this section, how the configuration from Figure 2 is created and what components are introduced for that purpose will be explained. Three types of glands are proposed in this research to provide optimal responses to various environmental stimuli: a leaf gland, a mediator gland and a root gland. However, the same gland structure and operational algorithm described in the previous section are used in all three cases. The difference between glands is their position in a gland network and is determined based on the layer they individually belong to. In order to propose the gland types, first of all, the classification of all possible environmental stimuli should be made into two categories: primary and secondary environmental stimuli. The primary environmental stimuli are those that can influence the system performance significantly and that are in direct correlation with system responses. Secondary stimuli are considered those whose influence on the system cannot considerably affect the system but are still present in the system's environment. A leaf gland directly responds to a secondary environmental stimulus (SES). Suppose an SES signal value is larger than the threshold value specified for that SES: in that case, the leaf gland is activated, the implemented gland mechanism from the previous section is  
Figure 2: Integration of a gland network within OENN structure. triggered, and the processing signal activities are conducted. On the other hand, if the SES signal is smaller than the threshold, the leaf gland will be in the standby regime, resulting in the \(CI_{LI}\) signal equal to 0 or 1. The maximal number of leaf glands can be equal to the number of SES. Still, that number could be less than that number, considering that multiple stimuli can be introduced to a single gland cell. A mediator gland is used to process a primary environmental stimulus (PES) brought to the gland in the form of a \(SI_{MGe}\) signal. The number of mediator glands is less or equal to the number of identified PESs. Following Figure 2, additional inputs to every mediator gland are hormone concentration signals (\(Cg_{Lg1}\), \(Cg_{Lg2}\),..., \(Cg_{Lgu}\)) introduced from the leaf glands. To accept these signals, a threshold of each mediator gland should be set, and mathematical apparatus from the previous section applied. Unlike leaf glands, mediator glands must always be in the active state. If the leaf glands' outputs are zero (if SESs do not exist or are negligible), it will not be allowed for mediator glands' \(CI\)s signals to be zero or insufficient to reach the gland threshold. In other words, the mediator glands must always be activated by setting them up to one of the three values: \(CI=2\), \(CI=3\) or \(CI=4\). In order to provide an optimal control input (\(CI\)) to a mediator gland, the Algorithms 1 is implemented. ```
Initial setup of all control inputs of the mediator glands is \(CI=2\) If the current system error (\(Err_{sys}(t)=Y(t)-Y_{ref}(t)\)) > acceptable error for \(Err_{sys}(t)\) If sum (\(Cg_{Lg1}\), \(Cg_{Lg2}\),..., \(Cg_{Lgq}\)) \(\leq\) Mediator_Glands_Threshold Then CIMG = 4 (production of hormones is intensified) Else CIMG = 3 (production of hormones is suppressed) Else CIMG = 2
```  
**Algorithms 1** Control input selection process  
Finally, all output signals of the mediator glands (\(CIMG_{1}\),..., \(CIMGe\)) are introduced to a single root gland (Figure 2). Contrary to the mediator glands, when the zero state (\(CI=0\)) is not possible, that option is enabled here. If the sum of (\(CIMG_{1}\),..., \(CIMGe\)) is not enough to trigger the root gland, all PES and SES influences on a system are negligible, and there is no need for the neural network to receive any information from the AOG network. In that case, the entire AOG network will be in a standby work regime.