private void createFloydWarshall(List <TrainLine> lines, List <TrainStation> stations) { // createConstraintSet node array, assign stationId toStation index of node nodes = FloydWarshallUtil.createArrayOfNode(stations); // initialize size n if (stations.Count == nodes.Length) { n = nodes.Length; } // createConstraintSet multidimensional arrays of size n time = FloydWarshallUtil.crateArrayOfTimeNxN(n); distance = FloydWarshallUtil.createArrayOfNxN(n); //line_ = FloydWarshallUtil.createArrayOfNxN(n); throughStation = FloydWarshallUtil.createArrayOfNxN(n); // createConstraintSet list of edges according the stops of trainlines edges = FloydWarshallUtil.createEdges(lines); // initialize all useful arrays by edges initializeArrays(edges); }