## 3 AQM Framework for Smart City Applications
### Definition and Specification  
The first part of the AQM is the definition and specification process, starting with the definition of agent quality goals and criteria. Agent quality criteria are the factors that constitute high-quality agents. The existing works suggested that data quality can be defined as quality assessments performed toward several defined parameters [46; 47]. In this research, the focus was toward the agent quality (non-functional) requirements during run-time. The high-quality agents were the agents that fulfilled the constraints or non-functional requirements to ensure reliability and trust between agents. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**No.**} & \multirow{2}{*}{**Agent Tools**} & \multicolumn{6}{c}{**Features**} \\ \cline{3-6}  & & **Design** & **Modelling** & **Simulation** & **Development** & **Analysis** \\ \hline
1 & AnyLogic [40] & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) \\
2 & Java Agent Development & & & & & \(\surd\) & \\  & Framework (JADE) [41] & & & & & \(\surd\) & \\
3 & Cougaar [42] & & & & & \(\surd\) & \\
4 & Jason [43] & & & & & \(\surd\) & \\
5 & ACLAnalyzer [44] & & & & & & \(\surd\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Agent tools with their associated features. Thus, the selected criteria should represent the quality of agents in various conditions and activities during execution. The selected criteria were preferably measurable in order for the introduced metrics for these criteria can be used to continuously quantify agent quality statuses during run-time. The agent parameters and critical states were defined to be included in the agent quality metric definition. An agent quality metric is a measure of agent quality properties. In order to measure the agent quality, based on the abstraction of the agent requirements definition, the agent quality metrics were constructed. Finally, at the end of the definition and specification phase, checking rules were constructed. Figure 2 shows the definition processes. The agent quality requirements, parameters, and critical states identified were transformed into the checking rules that reflect the specifications and real condition of the agent quality status. The main aim of the checking rules was to tie together the agent parameters that contribute to the checking and assessment of the agent quality statuses. The implemented information quality works were adapted [46; 47], where the aggregation of multiple agent quality parameters is suggested. The rules defined in this phase are will be used in the verification and assessment phase as the checking rules  
Figure 1: Extension of the generic verification process and integration of the Total Data Quality Management (TDQM) process. Figure 2: Definition and specification phase of the Agent Quality Management system. to perform run-time verification and quality assessment within the agent models. The rules for each agent quality metric range from a simple if-else statement typical in many programming algorithms to more complex formal specifications (e.g., written in temporal logic) for verification purposes. For each metric, the rules require the execution of run-time verification to detect the reachability of critical states where quality assessment is performed. For this research, to define the checking rules mentioned above, the steps are listed below:  
1. Defining the agent quality goal for an agent system: The agent quality goals during run-time are used to ensure that agents are high in quality such that the non-functional agent requirements are fulfilled. The examples of agent non-functional requirements are trust, reputation, privacy, confidentiality, and integrity. 2. Defining agent quality requirements: To define the agent quality requirements, the selected criteria should represent the quality of agents in various conditions and activities during execution.