This article considers a problem to choose parameters of a procedure for changing node roles in a multi-gateway wireless ad hoc network used in aerospace systems. Mathematical formulation of a mixed-integer programming (MIP) model to optimize the changing-node-role-procedure parameters is proposed, where the attention is focused on appropriate parameterization in order to make it possible to include additional constraints, if necessary. A practical two-stage technique used by the authors to solve the considered problem is brie y discussed. On the first stage, the branch-and- bound algorithm, provided with cutting plane constraints of some classes, is applied to choose optimal roles of the network nodes. On the second stage, the network simulator developed by the authors is used to estimate main characteristics of the resulting network. Workability of the proposed approach is demonstrated by results of computational experiments.