Building upon the hierarchical knowledge organization concept by Kamel and Quintana [29] that is proven effective in man- agement of heterogeneous KSs in knowledge system develop- ment, we employ the object-oriented approach to organize KSs in a hierarchical architecture. The top knowledge is abstract and general, while the descendent knowledge is specific and is used to solve practical problems. Each KS is modeled as an object that resides in an independent module. The implementation of the KS depends on the attributes encapsulated inside the KS ob- ject. For example, a “precondition” attribute provides a simple, efficient-to-evaluate condition under which the KS might con- tribute partial solutions to the blackboard. In other words, the KS is activated if its precondition is satisfied. Instead of immediately executing the activated KS, a knowledge source activation record (KSAR) is created first and is placed into the agenda pending ex- ecution of the KS body. Hence, referring to Fig. 3, the abstract KS objects can be represented as “Abstract_KS” class with the
Fig. 3. Hierarchy of KSs using object-oriented knowledge organization
basic attributes including “problem_domain”, “precondition”, and “KS_body”. Problem_domain indicates the domain of KS application. KS_body may accommodate a hard-coded proced- ure or a production rule. The Abstract_KS class also contains the basic methods such as “reset ( )” and “evaluate_blackboard ( )”. Reset ( ) is used to restart the KS, and evaluate_blackboard ( ) is used to evaluate the state of the blackboard.
The lower level classes including “Unfolding_KS”, “Nest- ing_KS”, “Mapping_KS”, “Staging_KS” and “Strategy_KS” can be represented as the child class objects of the Abstract_KS. They can inherit the latter’s attributes and methods, and also add specific slots and methods pertinent to themselves. For example, the Mapping_KS class includes a new attribute “evaluate_rule (
)” that is used to incorporate the necessary rule-based represen- tation scheme of mapping KSs. The Mapping_KS class is further developed into next lower level concrete KS classes including “Piloting_KS”, “Piercing_KS” and “Bending_KS”. The Pilot- ing_KS class, Piercing_KS class, and Bending_KS class include a new attribute “rule_pointer” respectively pointing to the pilot- ing KS rules, piercing KS rules, and bending KS rules discussed earlier. The separation and organization of different KS rules greatly enhances the modularity and efficiency of the knowledge base.
3.3 Agenda-based control module
The specialist KSs respond opportunistically to the events, i.e., changes on the blackboard due to new data or KS action. An agenda-based control module is used to monitor the events and decides the actions to be taken next. The agenda keeps track of all the events on the blackboard, and serves as a reposi- tory of specialist knowledge source activation records (KSARs) that can be selected for execution, and calculates the priority of execution.
The control module uses heuristic control rules as the strat- egy KS to set the above agenda, e.g., by defining the dynamic priorities of activated KSARs at the particular point in differ- ent stamping process planning stages, and invoking execution of a KSAR with the highest priority. Examples of strategy KS rules are given below.
Rule Strategy501: If the piercing operations to stamp two pilot holes have not been added to the blackboard, the priority of pi- loting KS is set to 100. (Note that the priority of a specialist heuristic rule can be represented using the “salience” property in CLIPS programming language.)
Rule Strategy502: If the piercing operations to stamp two pilot holes have been added to the blackboard, the priority of piloting KS is set to zero.