Examples of Plotter


Examples of ch.njol.skript.Metrics.Plotter

       
        EvtSkript.onSkriptStart();
       
        final Metrics metrics = new Metrics(Skript.this);
        final Graph scriptData = metrics.createGraph("data");
        scriptData.addPlotter(new Plotter("scripts") {
          @Override
          public int getValue() {
            return ScriptLoader.loadedScripts();
          }
        });
        scriptData.addPlotter(new Plotter("triggers") {
          @Override
          public int getValue() {
            return ScriptLoader.loadedTriggers();
          }
        });
        scriptData.addPlotter(new Plotter("commands") {
          @Override
          public int getValue() {
            return ScriptLoader.loadedCommands();
          }
        });
        scriptData.addPlotter(new Plotter("functions") {
          @Override
          public int getValue() {
            return ScriptLoader.loadedFunctions();
          }
        });
        scriptData.addPlotter(new Plotter("variables") {
          @Override
          public int getValue() {
            return Variables.numVariables();
          }
        });
        final Graph language = metrics.createGraph("language");
        language.addPlotter(new Plotter() {
          @Override
          public int getValue() {
            return 1;
          }
         
          @Override
          public String getColumnName() {
            return Language.getName();
          }
        });
        final Graph similarPlugins = metrics.createGraph("similar plugins");
        for (final String plugin : new String[] {"VariableTriggers", "CommandHelper", "Denizen", "rTriggers", "kTriggers", "TriggerCmds", "BlockScripts", "ScriptBlock", "buscript", "BukkitScript"}) {
          assert plugin != null;
          similarPlugins.addPlotter(new Plotter(plugin) {
            @Override
            public int getValue() {
              return Bukkit.getPluginManager().getPlugin(plugin) != null ? 1 : 0;
            }
          });
View Full Code Here

Examples of com.sk89q.craftbook.bukkit.Metrics.Plotter

            Metrics metrics = new Metrics(this);
            metrics.start();

            Graph languagesGraph = metrics.createGraph("Language");
            for (String language : languageManager.getLanguages()) {
                languagesGraph.addPlotter(new Plotter(language) {

                    @Override
                    public int getValue () {
                        return 1;
                    }
                });
            }
            languagesGraph.addPlotter(new Plotter("Total") {

                @Override
                public int getValue () {
                    return languageManager.getLanguages().size();
                }
            });

            Graph mechanicsGraph = metrics.createGraph("Enabled Mechanics");
            for(CraftBookMechanic mech : getMechanics()) {
                mechanicsGraph.addPlotter(new Plotter(mech.getClass().getSimpleName()) {
                    @Override
                    public int getValue () {
                        return 1;
                    }
                });
View Full Code Here

Examples of jSimMacs.display.plot.Plotter

    if (extension.equals(JSimConstants.PDBEXTENSION)) {
      PDBViewer pdbViewer = new PDBViewer(file);
      return pdbViewer;
    } else if (extension.equals(JSimConstants.XVGEXTENSION)) {
      Plotter plotter = new Plotter(fileContent);
      return plotter;
    }
    return null;
  }
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();
   
    Plotter pblmPlotter = new Plotter(vrp);
    pblmPlotter.plot("output/solomon_C101_specifiedVehicleEndLocations.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/algorithmConfig_fix.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_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

    /*
     * 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.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);

    /*
     * Solve the problem.
     *
     *
     */
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    /*
     * Retrieve best solution.
     */
    VehicleRoutingProblemSolution solution = new SelectBest().selectSolution(solutions);


    /*
     * print solution
     */
    SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
   
    /*
     * Plot solution.
     */
    Plotter plotter = new Plotter(vrp,solution);
//    plotter.setBoundingBox(30, 0, 50, 20);
    plotter.plot("output/solomon_C101_solution.png", "C101");

    new GraphStreamViewer(vrp,solution).setCameraView(30, 30, 0.25).labelWith(Label.ID).setRenderDelay(100).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).
     */
   
    final VehicleRoutingProblem vrp = vrpBuilder.build();
   
    new Plotter(vrp).plot("output/pd_solomon_r101.png", "pd_r101");
   
   
    /*
     * 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_solomon_r101_solution.png","pd_r101");

        //some stats
        SolutionAnalyser analyser = new SolutionAnalyser(vrp,solution,new SolutionAnalyser.DistanceCalculator() {

            @Override
View Full Code Here

Examples of jsprit.analysis.toolbox.Plotter

   
    /*
     * 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_solomon_r101_solution_open.png","pd_r101");
 
   
   
  }
View Full Code Here

Examples of jsprit.analysis.toolbox.Plotter

//    vra.getAlgorithmListeners().addListener(new AlgorithmSearchProgressChartListener("output/progress.png"));
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    SolutionPrinter.print(vrp, Solutions.bestOf(solutions), jsprit.core.reporting.SolutionPrinter.Print.VERBOSE);

    new Plotter(vrp, Solutions.bestOf(solutions)).plot("output/p08_solution.png", "p08");
   
    new GraphStreamViewer(vrp,Solutions.bestOf(solutions)).setRenderDelay(50).display();
  }
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/simpleEnRoutePickupAndDeliveryExample_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/simpleEnRoutePickupAndDeliveryExample_solution.png", "en-route pickup and delivery");
   
    new GraphStreamViewer(problem).setRenderShipments(true).display();
   
  }
View Full Code Here

Examples of jsprit.analysis.toolbox.Plotter

   
    Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
   
    SolutionPrinter.print(Solutions.bestOf(solutions));
   
    new Plotter(vrp, Solutions.bestOf(solutions)).plot("output/yo.png", "po");
   
  }
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.