  Physarum polycephalum is an acellular slime mould that grows as a highly
adaptive network of veins filled with protoplasm. As it forages, Physarum
dynamically rearranges its network structure as a response to local stimuli
information, optimising the connection between food sources. This high-level
behaviour was already exploited to solve numerous optimisation problems. We
develop a flow-based model for the adaptive network formation of Physarum,
which solves some inconsistencies of previous models. We first derive a general
class of equations describing the adaptation and flow dynamics of a static
network comprised of elastic channels filled with an incompressible fluid
undergoing a Hagen-Poiseuille flow. An explicit form of the model is obtained
by minimising the total power dissipated by the network. Considering a more
general functional form of the adaptive equations, a phase transition in the
system is also found. The model is used for maze-solving and to build efficient
and resilient networks in an arena mimicking mainland Portugal. By comparing
the resulting networks with the real Portuguese railway system, we found that
the model produced networks with a better overall performance when considering
fluctuations in the network flows. Finally, the adaption model is extended to
incorporate the network growth in the presence of multiple food sources. The
coupling of both processes produces networks with similar traits to several
network systems found in nature. We found that when the food sources operate
alternately, the model can replicate the direct connections between the food
sources observed in Physarum.
