public Response <string> RunSolver(string projectName, string encodingType, string encodingFilename) { var response = new Response <string>() { Success = true }; try { var encodingFilePath = UtilityFunctions.GetProjectFolder(projectName) + "\\" + encodingFilename; var encodingFileName = Path.GetFileNameWithoutExtension(encodingFilePath); var resultFilepath = UtilityFunctions.GetProjectFolder(projectName) + "\\" + string.Format("{0}_SAT4j.txt", encodingFileName); var solverRunner = new SolverRunner(); var resultFilename = solverRunner.RunSolverSAT4J(encodingFilePath, resultFilepath); response.Data = resultFilename; } catch (Exception ex) { response.Success = false; response.ErrorMessage = "Error while running the solver!"; return(response); } return(response); }
public Response <bool> CreateNewProject(string projectName) { Thread.Sleep(2500); return(UtilityFunctions.CreaNewProject(projectName)); }
public Response <string> GenerateRandomCostGraph(string projectName, int numberOfNodes) { Thread.Sleep(2500); return(UtilityFunctions.GenerateRandomCostMatrix(projectName, numberOfNodes)); }
public Response <string> GenerateEuclideanDistanceCostGraph(string projectName, int numberOfNodes) { Thread.Sleep(2500); return(UtilityFunctions.GenerateEuclideanDistanceCostGraph(projectName, numberOfNodes)); }
public Response <bool> SaveSelectedPoints(List <CellVector> selectedPoints, string projectName) { Thread.Sleep(2500); return(UtilityFunctions.SaveSelectedPoints(selectedPoints, projectName)); }