Package jsprit.analysis.toolbox

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


     * 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

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

    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

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

  }
View Full Code Here

    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

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.