A production system which produces a large number of items in many steps can be modelled as a continuous flow problem. The resulting hyperbolic partial differential equation (PDE) typically is nonlinear and nonlocal, modeling a factory whose cycle time depends nonlinearly on the work in progress. One of the few ways to influence the output of such a factory is by adjusting the start rate in a time dependent manner.We study two prototypical control problems for this case: i) demand tracking where we determine the start rate that generates an output rate which optimally tracks a given time dependent demand rate and ii) backlog tracking which optimally tracks the cumulative demand. The method is based on the formal adjoint method for constrain...