Examples of Plotter


Examples of jsprit.analysis.toolbox.Plotter

    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

Examples of jsprit.analysis.toolbox.Plotter

    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

Examples of jsprit.analysis.toolbox.Plotter

     * 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

Examples of jsprit.analysis.toolbox.Plotter

    SolutionPrinter.print(vrp, Solutions.bestOf(dataCollector.getSolutions()), Print.VERBOSE);
   
    /*
     * plot best
     */
    Plotter plotter = new Plotter(vrp,Solutions.bestOf(dataCollector.getSolutions()));
    plotter.plot("output/bestOf.png", "bestOfR101");
   
  }
View Full Code Here

Examples of jsprit.analysis.toolbox.Plotter

     * Finally, the problem can be built. By default, transportCosts are crowFlyDistances (as usually used for vrp-instances).
     */
//    vrpBuilder.addProblemConstraint(Constraint.DELIVERIES_FIRST);
    VehicleRoutingProblem vrp = vrpBuilder.build();
   
    Plotter pblmPlotter = new Plotter(vrp);
    pblmPlotter.plot("output/solomon_C101_specifiedVehicleEndLocations_withoutTWs.png","C101");
   
    /*
     * 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/algorithmConfigWithSchrimpfAcceptance.xml");
    vra.setMaxIterations(20000);
//    vra.setPrematureBreak(100);
//    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/solomon_C101_specifiedVehicleEndLocations_solution.png","C101");
    Plotter solPlotter = new Plotter(vrp, solution);
    solPlotter.plot("output/solomon_C101_specifiedVehicleEndLocations_withoutTWs_solution.png","C101");
   
   
    new GraphStreamViewer(vrp, solution).setRenderDelay(50).labelWith(Label.ID).setEnableAutoLayout(true).display();
 
   
View Full Code Here

Examples of jsprit.analysis.toolbox.Plotter

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

Examples of jsprit.analysis.toolbox.Plotter

    SolutionPrinter.print(problem, bestSolution, SolutionPrinter.Print.VERBOSE);
   
    /*
     * plot problem without solution
     */
    Plotter problemPlotter = new Plotter(problem);
    problemPlotter.plotShipments(true);
    problemPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_problem.png", "en-route pickup and delivery");
   
    /*
     * plot problem with solution
     */
    Plotter solutionPlotter = new Plotter(problem,Solutions.bestOf(solutions).getRoutes());
    solutionPlotter.plotShipments(true);
    solutionPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_solution.png", "en-route pickup and delivery");
   
    new GraphStreamViewer(problem, bestSolution).setRenderShipments(true).setRenderDelay(100).display();
  }
View Full Code Here

Examples of jsprit.analysis.toolbox.Plotter

    SolutionPrinter.print(bestSolution);
   
    /*
     * plot
     */
    Plotter plotter = new Plotter(problem,bestSolution);
    plotter.setLabel(Label.SIZE);
    plotter.plot("output/solution.png", "solution");

  }
View Full Code Here

Examples of jsprit.analysis.toolbox.Plotter

    validateSolution(Solutions.bestOf(solutions), bicycleMessengerProblem, nearestMessengers);

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

    //you may want to plot the problem
    Plotter plotter = new Plotter(bicycleMessengerProblem);
//    plotter.setBoundingBox(10000, 47500, 20000, 67500);
    plotter.plotShipments(true);
    plotter.plot("output/bicycleMessengerProblem.png", "bicycleMessenger");
   
    //and the problem as well as the solution
    Plotter plotter1 = new Plotter(bicycleMessengerProblem, Solutions.bestOf(solutions));
    plotter1.setLabel(Plotter.Label.ID);
        plotter1.plotShipments(false);
//    plotter1.setBoundingBox(5000, 45500, 25000, 66500);
    plotter1.plot("output/bicycleMessengerSolution.png", "bicycleMessenger");
   
    //and write out your solution in xml
//    new VrpXMLWriter(bicycleMessengerProblem, solutions).write("output/bicycleMessenger.xml");
   
View Full Code Here

Examples of net.citizensnpcs.utils.Metrics.Plotter

        Settings.setupVariables();

        // initialise metrics
        try {
            Metrics metrics = new Metrics(Citizens.this);
            metrics.addCustomData(new Plotter() {
                @Override
                public String getColumnName() {
                    return "Total NPCs";
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.