A new class of control problems for a certain transport system is considered. The peculiarity of the system is the variable number of participants in the control process. The regrouping of participants, along with their unification and dispersal, is determined by the specified target points of visit, the initial point of departure and the final point of completion of the system’s movement, and the constructed trajectories. The structure of a multi-agent transport system implies the presence of primary and secondary carriers, with the former being able to transport the latter at some stages. It is at such moments that the number of participants in the control process changes. In the constructed mathematical model of the movements of the system under consideration and its control, a hybrid system of differential equations with switching is obtained, containing continuous and discrete components. The problem of finding optimal routes under certain constraints is solved.