Modelling and Analysing Social Networks through Formal Methods and Heuristic Searches