Modelling and Solving Optimal Placement problems in Wireless Sensor Networks