Package jsprit.analysis.toolbox

Examples of jsprit.analysis.toolbox.Plotter


    VehicleRoutingProblemSolution best = Solutions.bestOf(solutions);
   
    SolutionPrinter.print(vrp, best, SolutionPrinter.Print.VERBOSE);
   
   
    Plotter plotter = new Plotter(vrp,best);
    plotter.plot("output/cn14.png", "cn14");
   
    new GraphStreamViewer(vrp, best).setRenderDelay(100).display();
  }
View Full Code Here


    SolutionPrinter.print(bestSolution);
   
    /*
     * plot problem without solution
     */
    Plotter problemPlotter = new Plotter(problem);
    problemPlotter.plotShipments(true);
    problemPlotter.plot("output/enRoutePickupAndDeliveryWithMultipleLocationsExample_problem.png", "en-route pickup and delivery");
   
    /*
     * plot problem with solution
     */
    Plotter solutionPlotter = new Plotter(problem,Arrays.asList(Solutions.bestOf(solutions).getRoutes().iterator().next()));
    solutionPlotter.plotShipments(true);
    solutionPlotter.plot("output/enRoutePickupAndDeliveryWithMultipleLocationsExample_solution.png", "en-route pickup and delivery");
   
    new GraphStreamViewer(problem,Solutions.bestOf(solutions)).labelWith(Label.ACTIVITY).setRenderDelay(100).setRenderShipments(true).display();
   
  }
View Full Code Here

        Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
        VehicleRoutingProblemSolution solution = Solutions.bestOf(solutions);

        SolutionPrinter.print(skillProblem, solution, SolutionPrinter.Print.VERBOSE);

        new Plotter(skillProblem,solution).plot("output/skill_solution","solomon_with_skills");

        new VrpXMLWriter(skillProblem,solutions).write("output/solomon_with_skills");
    }
View Full Code Here

    SolutionPrinter.print(bestSolution);
   
    /*
     * plot
     */
    Plotter problemPlotter = new Plotter(problem);
    problemPlotter.plotShipments(true);
    problemPlotter.plot("output/simpleMixedEnRoutePickupAndDeliveryExample_problem.png", "en-route pd and depot bounded deliveries");
   
    Plotter solutionPlotter = new Plotter(problem,Solutions.bestOf(solutions));
    solutionPlotter.plotShipments(true);
    solutionPlotter.plot("output/simpleMixedEnRoutePickupAndDeliveryExample_solution.png", "en-route pd and depot bounded deliveries");
   
  }
View Full Code Here

        Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();

        SolutionPrinter.print(vrp, Solutions.bestOf(solutions), SolutionPrinter.Print.VERBOSE);

        new Plotter(vrp, Solutions.bestOf(solutions)).plot("output/plot","plot");
    }
View Full Code Here

    /*
     * Finally, the problem can be built. By default, transportCosts are crowFlyDistances (as usually used for vrp-instances).
     */
    VehicleRoutingProblem vrp = vrpBuilder.build();
   
    new Plotter(vrp).plot("output/solomon_C101_open.png", "C101");
   
    /*
     * Define the required vehicle-routing algorithms to solve the above problem.
     *
     * The algorithm can be defined and configured in an xml-file.
View Full Code Here

    SolutionPrinter.print(bestSolution);
   
    /*
     * plot
     */
    new Plotter(problem,bestSolution).plot("output/solution.png", "solution");
  }
View Full Code Here

    assert !vrp.getJobs().containsKey("44") : "strange. service 44 should not be part of the problem";
   
    /*
     * plot to see how the problem looks like
     */
    new Plotter(vrp).setLabel(Label.ID).plot("output/cordeau01_problem_withInitialRoute.png", "c");

    /*
     * solve the problem
     */
    VehicleRoutingAlgorithm vra = VehicleRoutingAlgorithms.readAndCreateAlgorithm(vrp, "input/algorithmConfig_noVehicleSwitch.xml");
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    SolutionPrinter.print(Solutions.bestOf(solutions));
   
    new Plotter(vrp, Solutions.bestOf(solutions)).setLabel(Label.ID).plot("output/cordeau01_solution_withInitialRoute.png", "p01");
   
   
  }
View Full Code Here

    SolutionPrinter.print(bestSolution);
   
    /*
     * plot problem without solution
     */
    Plotter problemPlotter = new Plotter(problem);
    problemPlotter.plotShipments(true);
    problemPlotter.plot("output/enRoutePickupAndDeliveryWithMultipleLocationsExample_problem.png", "en-route pickup and delivery");
   
    /*
     * plot problem with solution
     */
    Plotter solutionPlotter = new Plotter(problem,Arrays.asList(Solutions.bestOf(solutions).getRoutes().iterator().next()));
    solutionPlotter.plotShipments(true);
    solutionPlotter.plot("output/enRoutePickupAndDeliveryWithMultipleLocationsExample_solution.png", "en-route pickup and delivery");
   
    new GraphStreamViewer(problem,Solutions.bestOf(solutions)).labelWith(Label.ACTIVITY).setRenderDelay(100).setRenderShipments(true).display();
   
  }
View Full Code Here

     * Finally, the problem can be built. By default, transportCosts are crowFlyDistances (as usually used for vrp-instances).
     */
   
    VehicleRoutingProblem vrp = vrpBuilder.build();
   
    new Plotter(vrp).plot("output/pd_christophides_vrpnc1.png", "pd_vrpnc1");
   
   
    /*
     * Define the required vehicle-routing algorithms to solve the above problem.
     *
     * The algorithm can be defined and configured in an xml-file.
     */
//    VehicleRoutingAlgorithm vra = new SchrimpfFactory().createAlgorithm(vrp);
    VehicleRoutingAlgorithm vra = VehicleRoutingAlgorithms.readAndCreateAlgorithm(vrp, "input/algorithmConfig_solomon.xml");
    vra.getAlgorithmListeners().addListener(new AlgorithmSearchProgressChartListener("output/sol_progress.png"));
    /*
     * Solve the problem.
     *
     *
     */
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    /*
     * Retrieve best solution.
     */
    VehicleRoutingProblemSolution solution = new SelectBest().selectSolution(solutions);
   
    /*
     * print solution
     */
    SolutionPrinter.print(solution);
   
    /*
     * Plot solution.
     */
//    SolutionPlotter.plotSolutionAsPNG(vrp, solution, "output/pd_solomon_r101_solution.png","pd_r101");
    Plotter plotter = new Plotter(vrp, solution);
    plotter.setLabel(Label.SIZE);
    plotter.plot("output/pd_christophides_vrpnc1_solution.png","pd_vrpnc1");
 
   
    new GraphStreamViewer(vrp, solution).setRenderDelay(200).display();
   
  }
View Full Code Here

TOP

Related Classes of jsprit.analysis.toolbox.Plotter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.