Command Control Center
The command control center (declared as CommandControlCenter Command_handler) is a place temporarily holding information for a certain period of time specified by an attribute of the information then release the information to the Communication Place to be processed further. Such function is to model the time required for information processing and execution.
When an operator makes a decision, the decision is sent to the Command Control Center (CCC) through the Branch_center mentioned in the previous chapter. The decision could be an oral communication, a physical action, or a cognitive decision. They is a time delay between the operator having the decision and the action is actually carried out. The time delay for performing a physical action may take longer than having a oral communication (e.g., asking for system information or reporting perceived system information). The cognitive decisions (e.g., selecting a problem solving goal) may takes no time but it is necessary that the cognitive decisions still need to be processed by the Command Control Center.
Each piece of information sent to the CCC has an attribute indicating its delay time. Every time step the CCC reduces the delay time of all information within it by one second since currently each ADS time step is a second. The information is hold in the CCC until its delay time has been reduced to zero or a negative value then be sent to the Communication Place.
The CCC uses pointers to pointing to the relevant information stored in the Branch_center instead of claiming memory for the objects to conserve the use of computer memory and enhance simulation performance. Figure 37 illustrates such concept.
On the top of Figure 37 shows the branches information stored in a BranchCluster of Branch_center. Object memory is located for each piece of information within the BranchCluster. The type of information could be goal, strategy, sub-goal etc., and the information for a branch is carried by a BranchProbability. The CCC use the class CommandControlUnit to register information within it. Each piece of information is represented by an CommandControlUnit object. Each CommandControlUnit contains a list of pointers for pointing to various types of activities. Initially these pointers’ addresses are set as zero (0 i.e., NULL). Depending on the type of information shown in a BranchProbability, the corresponding type of pointer is pointed to the object in the BranchProbability. As shown in Figure 37 that the goal pointers within a CommandControlUnit are pointing to the goal branches in the BranchProbability objects. Other pointers in the CommandControlUnit are pointing to NULL. Each CommandControlUnit should have one and only one pointer pointing to an object within a BranchProbability. All other pointers should point to NULL (i.e., 0).
Using the pointers instead of claiming memory for the objects pointed by the CommandControlUnit creates a problem for saving branching nodes information in order to simulate other sequences. This practice results in requiring reestablishing the links between the pointers and real objects for the branching nodes (i.e., represented by class RestartNodeInfo). The solution taken by ADS is by creating a “spare” storage place that make a copy of the real objects and stores them. As seen in the following declaration for the class CommandControlCenter contains two arrays: commands and command_residual. The command_residual is the “spare” component. As a result, the CommandControlUnits within the commands contain pointers only; however, CommandControlUnits within the commands_residual contains objects that have memory located. Table 14 shows the memory control related functions of the Command Control Center.
class CommandControlCenter{
list<CommandControlUnit \*> commands;
list<CommandControlUnit \*> commands_residual;
}Figure 39 Command Control Center uses pointers to identify the relevant objects stored in the Branch_handler
Table 16 The Command Control Center memory management related functions
| Functions | Elements | Objects and Pointers* | Pointers Only* |
|---|---|---|---|
| clearCommandControlCentePointer() or clearCommandControlCenteForRestart() or clearCommandControlCenteFromSimulation() | commands | X | |
| commands_residual | X | ||
| clearCommandControlCenter() or clearCommandControlCenteFromRestartInfo() | commands | X | |
| commands_residual | X | ||
| copyCommandControlCenterToRestartInfo | Make a copy (with object memory located) of the commands and commands_residual of the simulation to the commands_residula of the restartInfoNode. | ||
| copyCommandControlCenterFromRestartInfo | Copy the objects in the commands_residual of the restartInfoNode to the command_residual of the simulation with object memory located | ||
*Note: the pointers and objects mentioned here are whether the pointers of the CommandControlUnit only pointing to the corresponding parameters in the Branch_centers (i.e., pointers only) or making a copy (with memory allocated) of the corresponding object in the Branch_center then with the pointer pointing to the object (i.e., object and pointers). In both of these two cases, it requires the removal of the memory declared for the CommandControlUnit.
***** Note************************************************************
The clearCommandControlCenter() and clearCommandControlCenteFromRestartInfo() should not be used. [WHY DON’T WE DELETE THESE FUNCTIONS] They are product of a stressful and “not so clear” brain. The reason of having three or two functions shown in Table 14 to do the same function is a result of thorough analysis of the memory management for different situations during a simulation.
******************************************************************