# Sequence Planner: A Framework for Control of Intelligent Automation Systems
## 2 The Sequence Planner Control Framework
### Operation Planner
If the operations have a time associated with them (which can be different based on the state of the resources when the operation is started), knowledge about whether a tool change is needed to perform the operation can be of crucial importance. We provide some preliminary planning benchmarks on the example system. The transition planning model includes 6 resources and has 84 transitions (of which 30 are auto transitions coming from operations), 58 specifications, and \(1.02434~{}\times~{}10^{22}\) reachable states. The operation planning model is orders of magnitudes smaller, with \(1.61248~{}\times~{}10^{9}\) reachable states and 30 transitions modeling the operations. The transition and operation planning times, ordered by plan length, are shown in Figure 10. The plans were computed on a consumer-grade laptop computer, and every single computed plan is represented by a cross. As it can be seen from Figure 10, the transitions planner can comfortably plan 15-20 steps ahead, while keeping the system responsiveness under 1 s. For the most part, though, the system behaves nominally. This means that even if SP can handle great flexibility, there are few occasions where replanning is needed. ### Rate of Plan Computation

The plots in Figure 11 show the rate at which new plans are computed given that the system starts with empty planning caches. The data were recorded in a simulation of the system during four assembly cycles (one cycle takes 210 s, depending on how much the operator does in advance or interferes). In the 16 min data collection period, the automation system produced 160 unique transition plans, averaging one plan per 6 s, and 35 unique operation plans, averaging one plan per 27 s. The system is left alone in the first half of the chart, which leads to steadily increasing cache hits for both planners once the same sequences are being played out again. In the second half, a human operator starts \"interfering\" by completing assembly tasks using a smart tool as well as being in the way, which leads to an increase in the rate of new plans being computed. While this paper does not go into detail about how SP performs error handling, error situations are handled by replanning, which is also a factor when it comes to how quickly the number of plans grow. Figure 11: Rate of new plan computation and caching performance. Figure 10: Planning performance. Each cross represent the time to solve a planning problem of a given length. ### Plan Complexity

As can be seen in Figure 11a, transition plans are generally between 7 to 18 steps long. Commonly, plans are comprised of several pairs of control actions coupled with expected effects, for example giving a command and waiting until the action has finished before taking the next step in the plan. This means there are around three to nine different actions in each transition plan (sometimes less when resources expose intermediate states). By running the system without the operation packing heuristic, only one operation is run at a time, allowing us to count the number of resources involved in reaching each operation goal. We find that the number of resources included in an operation plan is between two and four, with most of the operations using only two resources. It is interesting to note that there is no operation which only uses a single resource. The large number of operations which utilize two resources are the ones which use the robot and a tool, for example, to tighten bolts and oil filters, but there are also situations where a resource that is not actively involved in an operation needs to move to a certain state during completion due to a specification. The operations that involve more resources include, for example, calling a robot motion planning service, and setting IOs for the connector attached to the robot. ## 5 Conclusions

This paper introduced Sequence Planner (SP) as a framework to model and control intelligent automation systems. The control framework has been implemented with support for ROS and applied to an industrial demonstrator.