In the previous section we identify the alternatives to mission plan adaptation and their different properties. This section focuses on our approach to mission plan repair for unmanned underwater vehicles. Mission plan repair involves the detection of events, the diagnosis of the effects that these events have on the mission plan and the re- sponse phase. As discussed, we based our approach on plan recovery methods (van der Krogt,2005) and extended them to the underwater domain. Plan recovery methods are based on plan-space searches and are able to adapt the existing plan to the new state of the world. We have extended these methods by combining them with the semantic knowledge-based framework introduced in Chapter 2. This combination provides a system that is suitable for the type of modular and dynamic solutions required in the underwater environment. Our research also goes beyond van der Krogt’s approach by providing an evaluation of the combined solution under a practical realistic applica- tion. In the following sections we describe the implementation of our approach for the three stages of detection, diagnosis and repair.
6.5.1
Detection
For the detection phase, we use the functionality of a status monitor agent in combi- nation with the knowledge-base framework described in Chapter 2. As we presented in that chapter, the status monitor agent considers all symptoms and observations from environmental and internal data in order to identify and classify events according to their priority and their nature (critical or incipient). Based on internal events and con- text information, this agent is able to infer new knowledge about the current condition of the vehicle with regard to the availability for operation of its components, i.e. sta-
tus (Hamilton, 2002). In a similar way, environmental data is also considered for de- tecting and classifying external events in order to keep the situation awareness stored in the knowledge base updated.
6.5.2
Diagnosis
Based on the analysis of the effects of the updated mission environment on the current mission plan, the plan diagnosis phase identifies the failures and gaps existent in the current mission plan. Plan failures are unsuccessful executions of actions. Plan gaps are parts of the plan that are no longer executable. Identifying these two elements makes repairing the plan possible, as they are the cause of the inconsistencies between the existent plan and the current status of mission environment. They are, therefore, preventing the correct execution of the mission. Our approach uses the reasoning and querying capabilities of the semantic knowledge-based framework presented in Chap- ter 2 to identify the impact that changes in the mission environment reported by the status monitor have on the mission plan. A detailed explanation on how the outputs from the status monitor are used to identify the level of repair and the gaps in the mission plan can be found in the description of the field experiment presented in Sec- tion6.7.2.
6.5.3
Executive Repair
Executive repair fixes plan failures identified in the mission plan during the plan di- agnosis stage. Our approach uses ontology reasoning in combination with an action execution template to adapt the mission plan at the executive level.
Once a mission plan πq is calculated by the mission planner, its list of ground
actions is transferred to the executive layer. In this layer, each ground action gah
q of
πq gets instantiated into an action execution instance etqusing the action template for
the action ahavailable in the Core Ontology of the knowledge base. At the end of this
phase, each etqcontains the script of commands required to perform its correspondent ground action (see Figure 6.3). Flexibility in the execution of an action instance is critical in real environments. This is provided by a timer, an execution counter, a time-out register and a register of the maximum number of executions in the action execution instance. Additionally, three different outputs control the success, failure or time-out of its execution. These elements handle the uncertainty during the execution phase and enable the executive repair process. This minimise the number of calls to
Action Execution Action Template Ground Action
Figure 6.3: An action execution etq is instantiated from a ground action gah
q from the mission plan using the action ah template from the Core Ontology of the knowledge base. Each instance contains a list of commands, a timer, an execution counter, a time- out register and a register of the maximum number of executions. The success, failure and time-out outputs point at the next instance to be executed in the mission plan.
the adaptive mission planner agent and therefore the response time for adaptation.
6.5.4
Plan Repair
Plan repair uses a strategy to repair with new partial plans the plan gaps identified during the plan diagnosis stage. Our approach uses an iteration of unrefinement and refinement strategies on a partial-ordered planning framework to adapt the mission plan at the planning level.
Planning in the plan space is slower than in the state space because the nodes are more complex. Refinement operations are intended to achieve an open goal from the list of mission requirements or to remove a possible inconsistency in the current partial plan. These techniques are based on the least commitment principle, and they avoid adding to the partial plan any constraint that is not strictly needed. A refinement op- eration consists of one or more of the following steps: adding an action, an ordering constraint, a variable binding constraint or a causal link.
A partial plan is considered to be a solution to the planning problem if has no flaw and if the sets of constraints are consistent. Flaws are either subgoals or threats. Subgoals are open preconditions of actions that have not been linked to the effects of previous actions. Threats are actions that could introduce inconsistencies with other actions or constraints. We implemented a recursive non-deterministic approach based on the Partial ordered Planning (PoP) framework (Penberthy and Weld, 1992). This
framework is sound, complete, and systematic. Unlike other Plan space planners that handle both types of flaws (goals and threats) similarly, each PoP recursive step first refines a subgoal and then the associated threats (Ghallab et al.,2004).
In our implementation, we introduce a previous step capable of performing an un- refinement of the partial plan when necessary. During the unrefinement strategy we remove refinements from the partial plan that are reported by the plan diagnosis phase to be affecting the consistency of the mission plan with the mission environment, i.e. to remove constraints and finally the actions if necessary.
Figure6.4 shows a graphical representation of the mission plan repair process. In simple terms, when changes on the ABox Planning Application Ontology are sensed ( ˙Πq) that affect the consistency of the current partial plan ψq−1, the plan repair pro-
cess is initiated. The plan repair stage starts an unrefinement process that relaxes the constraints in the partial plan ψq−1that are causing the mission plan to fail.
The remaining temporal mission partial plan ψ0q−1 is now relaxed to be able to cope with the new mission environment. However, this relaxation could open some subgoals and introduce threats in the partial plan that need to be addressed. The plan repair stage then executes a refinement process searching for a new mission plan ψq
that is consistent with the new mission environment Πq and removing these possible
flaws. By doing this, it can be seen that the new mission plan ψq is not generated
again from Πq (re-planned) but recycled from ψq−1 (repaired). This allows re-use of
the parts of the plan ψq−1that were still consistent with Πq.