Mixed-Integer Optimal Control of a Residential Heating Network using Linear and Nonlinear Programming Techniques