Shortest-Path Optimization of Ship Diesel Engine Disassembly and Assembly Based on AND/OR Network
Algorithm 1
Network cleaning and Branches Preprocessing.
Input: original network;: origin node of the shortest path;: destination of the shortest path.
Sets: a set of nodes;: a set of deleted nodes;: a set of deleted arcs;: a set of new-added arcs;: a sub-set of “OR” nodes.: set of nodes that have successor relationships with node s;: set of nodes that have precursor relationships to nodes p;: set of nodes in the cleaned network.: set of arcs in the cleaned network.: set of OR nodes in ;: a branch of an OR node, consisted of nodes;: set of branches of OR node ,;: set of nodes that are excluded from a path if node is in the path
Output: the network starting from node and ending in node ;: set of conflict nodes of node ;: branches of OR node ;
ProcessStep 1: find the successor nodes to which can be reached by a route from , denoted as ,Step 2: find the precursor nodes from which the destination can be reached by a route, denoted as ,Step 3: select the common nodes in both and , denoted as ,.Step 4: select the arcs among the nodes of to form ,.Step 5: for in Step 5.1: select the successors of , denoted as Step 5.2: for in Step 5.2.1: add the nodes having a successor of , denotes as generate , where contains the nodes that are successors of , contains the nodes that are successors of nodes in Step 5.2.2: for in Step 5.2.2.1: if exists in all set go to Step 5.2Step 5.3: for in Step 5.3.1: for in reverse : reverse (Set) means reversely visit the elements in SetStep 5.3.1.1: if remove from else go to Step 5.3.1Step 5.3.2: update ,Step 5.4: for in Step 5.4.1: for in Step 5.4.2: ,,Step 6: output ,