AbstractIn district heating, it is often required to control the system in such a way, that temperature and supply power are simultaneously bounded [1], which results in a set of box constraints for the control variable, and mixed bilinear state‐control‐constraint. The latter one is relaxed using a Moreau‐Yosida penalty approach, leading to a parametrized series of optimization problem, whereas the former one is handled by projection. This problem is studied at the example simplified one‐pipeline model, and numerically solved using a projected gradient algorithm. Due to the regularity required by the nonlocal boundary condition, the control variable has to be a function in H1 , such that the gradient computation and projection steps require an additional elliptic subproblem, which has to be solved.