We distinguish an internal states and priorities of the kernel processes during the kernel execution. The values of actual priority and state involve the process behavior.
The internal state of the parent process is equal to the state of the whole kernel. The state is implemented in the collector layer of the parent process. The state is changed mainly by the user's command that is sent as a message of the kernel control interface. Or the state is changed as a response to the internal event: an internal error or satisfaction of the termination condition. An internal error event is recognized whenever the error is reported through the base class TObj or an error message (MT_EVENT,MS_ERROR) is received.
We states are in this book referred by their symbol names defined in basic.h:
For more detailed information on particular states see User's Guide
The internal priority is implemented in the collector layer of the child process. Its value involves message processing of the process. Each child process periodically executes main loop of the genetic algorithm until the computation is stopped by the user's command or until the termination condition is fulfilled. In fact process periodically calls the method GABody() that implements the main loop genetic algorithm. During this computation the incoming messages (either from parent process or other child processes) have to be processed. This interruption of the computation is realized as a call of the virtual method Interrupt(). This method is called at several points of the main loop of the computation. The internal priority of the child process, in fact, identifies at which point of the GABody() was the computation interrupted.
Each layer of the child process that needs to receive and to send messages has to override the method Interrupt(). The method is called in upward direction i.e. at first the layer calls its predecessor's method Interrupt(), then it processes its own messages. We distinguish four priorities referred by their symbol ID defined in file basic.h Each layer has to respect the actual priority of the process as follows:
We suggest to use this template of the Interrupt() method for each layer of child process.