public Graph(string pathToConnections, string pathToNodes) { ManageFile mf = new ManageFile(); Edges = mf.GetAdjacencyList(pathToConnections); NodeList = mf.GetNodes(pathToNodes); }
public AlgorithmsTestBusinessLayer(int testNumber) { #region test1 if (testNumber == 1) { gaSettingsList.Add(new GASettings(100, 20, 20, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 50, 50, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.5, 0.1, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.5, 0.5, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 2)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.5, 0.5, 2)); vrpGraph.Edges = mf.GetAdjacencyList(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_Edges_Test1.json")); vrpGraph.NodeList = mf.GetNodes(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_Nodes_Test1.json")); pathMemoryList = mf.GetPathMemory(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_PathMemory_Test1.json")); } #endregion #region test2 else if (testNumber == 2) { gaSettingsList.Add(new GASettings(200, 100, 100, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(200, 100, 100, 0.9, 0.9, 1)); gaSettingsList.Add(new GASettings(200, 100, 100, 0.9, 0.9, 2)); vrpGraph.Edges = mf.GetAdjacencyList(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_Edges_Test2.json")); vrpGraph.NodeList = mf.GetNodes(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_Nodes_Test2.json")); pathMemoryList = mf.GetPathMemory(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_PathMemory_Test2.json")); } #endregion #region test3 else if (testNumber == 3) { gaSettingsList.Add(new GASettings(100, 100, 100, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 2)); vrpGraph.Edges = mf.GetAdjacencyList(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_Edges_Test3.json")); vrpGraph.NodeList = mf.GetNodes(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_Nodes_Test3.json")); pathMemoryList = mf.GetPathMemory(HttpContext.Current.Server.MapPath("~/Files/Test/Rzeszow_PathMemory_Test3.json")); } #endregion #region test4 else if (testNumber == 4) { gaSettingsList.Add(new GASettings(100, 20, 20, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 50, 50, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.5, 0.1, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.5, 0.5, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 2)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.5, 0.5, 2)); vrpGraph.Edges = mf.GetAdjacencyList(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_Edges_Test1.json")); vrpGraph.NodeList = mf.GetNodes(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_Nodes_Test1.json")); pathMemoryList = mf.GetPathMemory(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_PathMemory_Test1.json")); } #endregion #region test5 else if (testNumber == 5) { gaSettingsList.Add(new GASettings(200, 100, 100, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(200, 100, 100, 0.9, 0.9, 1)); gaSettingsList.Add(new GASettings(200, 100, 100, 0.9, 0.9, 2)); vrpGraph.Edges = mf.GetAdjacencyList(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_Edges_Test2.json")); vrpGraph.NodeList = mf.GetNodes(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_Nodes_Test2.json")); pathMemoryList = mf.GetPathMemory(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_PathMemory_Test2.json")); } #endregion #region test6 else if (testNumber == 6) { gaSettingsList.Add(new GASettings(100, 100, 100, 0.8, 0.3, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 1)); gaSettingsList.Add(new GASettings(100, 100, 100, 0.9, 0.9, 2)); vrpGraph.Edges = mf.GetAdjacencyList(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_Edges_Test3.json")); vrpGraph.NodeList = mf.GetNodes(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_Nodes_Test3.json")); pathMemoryList = mf.GetPathMemory(HttpContext.Current.Server.MapPath("~/Files/Test/Warszawa_PathMemory_Test3.json")); } #endregion }