# Mixed-Integer-Based Path and Morphing Planning for a Tensegrity Drone
## 6 Numerical Studies, Results
### Study of the Computational Cost of the Algorithm  
In this section, the study of how the time cost and the number of variables depend on the \"path length\" (as given by the number of steps between the start and the finish points) is undertaken. The same problem as described in the above subsection is considered and solved for a varying number of steps \(K\).  
The following experimental design is used. To collect a single data point, choose \(K\) in the range of 3 to 27, and solve Equation (13); this is repeated 10 times and the averages and the range of results are recorded. Repeat this procedure for three different values of the Gurobi gap parameter--0.05, 0.02, and 0.005--recording the results for each value individually; the effect this parameter has on the results is discussed below. The following dependencies are plotted: CPU time as a function of \(K\) (Figure 4), number of iterations as a function of \(K\) (Figure 5), and number of variables as a function of \(K\) (Figure 6).  
From Figure 5, one can observe a rapid growth in the number of iterations for all values of the Gurobi gap; however, when gap 0.005 is chosen, the growth becomes exponential, appearing linear in the semilog scale. This mainly indicates the necessity of choosing the Gurobi gap carefully when solving the problem (13), as the choice can easily render the problem practically intractable. Figure 4 shows close correspondence with Figure 5, which is to be expected if each iteration takes roughly the same time. In both cases, one can note that the difference between choosing the Gurobi gap to be 0.05 or 0.02 plays a significant role in the performance only for longer paths (more than 15 steps), while for shorter paths, the difference is small. This is a good indicator that the algorithm's performance is robust to small changes in this parameter, which is important for its practical usefulness. Note that at 15 steps, the solution takes 30 and 32.5 s for gap values 0.02 and 0.05, respectively. Finally, from Figure 6, one can observe that the number of variables after simplification (as performed by CVX) grows linearly with the number of steps, which is to be expected, as  
\begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Parameters**} & \multicolumn{2}{c}{**Number of Steps, \(K\)**} \\ \cline{2-3}  & \(K=5\) & \(K=27\) \\ \hline Number of binary variables & 65 & 351 \\ Number of linear inequalities & 14,400 & 77,760 \\ Solution time & 2.8 s & 733 s \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameters of the six-bar tensegirty drone path and morphing planning through three rooms connected via tilted shafts, with 5- and 27-step paths.  
Figure 3: Path and sequence of deformation planned with the proposed method; A, C and E are rooms, and B and D are corridorsthe constraints associated with each step are independent of each other in terms of both the binary and continuous variables that enter them.  
Note that all graphs in Figures 4-6 have error bars, but these are too tight to be distinct, indicating that, at least within this experimental design, the results are replicable. However, it would be of additional interest to repeat the same experiment, but using a sufficiently large dataset of locations, which would correspond to typical use cases for such drones.  
Figure 4: CPU time as a function of the number of steps, calculated for Gurobi gap values 0.05, 0.02, and 0.005; vertical axis is given in logarithmic scale.  
Figure 5: Number of iterations as a function of the number of steps, calculated for Gurobi gap values 0.05, 0.02 and 0.005; vertical axis is given in logarithmic scale.