Initialisation of Dijkstra method