Task planning involves automating the creation of the routes for vessels with known coordinates in a confined
space. The management of vessel release in a given area affects the time required for a vessel to complete its
voyage, and maximizing vessel performance involves identifying the shortest route. A key issue in automating
the generation of the optimal (shortest) routes is selecting the appropriate mathematical apparatus. This paper
considers an optimization method based on a recursive algorithm using Bellman-Ford routing tasks for large
dimensions. Unlike other optimization techniques, the proposed method enables the shortest path to be assessed
in a network model with a complex topology, even if there are arcs with negative weights. The practical implementation
of the modified Floyd algorithm was demonstrated using a sample automated build and using it
to calculate a network model with a complex topology, using an iterative procedure for a program prepared in
MATLAB. Implementation of the computer model is simple, and unlike existing models, it eliminates restrictions
associated with the presence of negative weights and cycles on a network and automates search shortcuts
in ground branch functional means in MATLAB. To confirm the accuracy of the obtained results, we performed
an example calculation using the network. The proposed algorithm and recursive procedure are recommended
for finding energy-efficient solutions during the management of mobile objects on waterways.