  BATS (BATched Sparse) codes are a class of efficient random linear network
coding variation that has been studied for multihop wireless networks mostly in
scenarios of a single communication flow. Towards sophisticated multi-flow
network communications, we formulate a network utility maximization (NUM)
problem that jointly optimizes the BATS code parameters of all the flows and
network scheduling. The NUM problem adopts a batch-wise packet loss model that
can be obtained from the network local statistics without any constraints on
packet loss patterns. Moreover, the NUM problem allows a different number of
recoded packets to be transmitted for different batches in a flow, which is
called adaptive recoding. Due to both the probably nonconcave objective and the
BATS code-related variables, the algorithms developed for the existing flow
optimization problems cannot be applied directly to solve our NUM problem. We
introduce a two-step algorithm to solve our NUM problem, where the first step
solves the problem with nonadaptive recoding schemes, and the second step
optimizes adaptive recoding hop-by-hop from upstream to downstream in each
flow. We perform various numerical evaluations and simulations to verify the
effectiveness and efficiency of the algorithm.
