/** * Return the solution associated to the jobId * * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. * * @throws ApiException * if the Api call fails */ @Test public void getSolutionTest() throws ApiException { String key = null; String jobId = null; Response response = api.getSolution(key, jobId); // TODO: test validations }
/** * Return the solution associated to the jobId * * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. * * @throws ApiException * if the Api call fails */ @Test public void getSolutionTest() throws ApiException { String key = null; String jobId = null; Response response = api.getSolution(key, jobId); // TODO: test validations }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); // System.out.println(rsp); // if(rsp.getStatus() == null) continue; if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }