We prove existence and uniqueness of solutions, continuous dependence from
the initial datum and stability with respect to the boundary condition in a
class of initial--boundary value problems for systems of balance laws. The
particular choice of the boundary condition allows to comprehend models with
very different structures. In particular, we consider a juvenile-adult model,
the problem of the optimal mating ratio and a model for the optimal management
of biological resources. The stability result obtained allows to tackle various
optimal management/control problems, providing sufficient conditions for the
existence of optimal choices/controls.Comment: 22 pages, 7 figure