Examples of CalculationListener


Examples of com.globant.google.mendoza.malbec.CalculationListener

    System.out.println("Leaving MerchantSampleApplication");
  }

  private void init() {
    /* Create the calculation listener */
    CalculationListener calcListener = new CalculationListener() {

      public MerchantCalculationResults calculate(final Long buyerId,
          final ShoppingCart cart, final String language,
          final MerchantCalculationCallback callback) {
        System.out.println(
View Full Code Here

Examples of jsprit.analysis.toolbox.ComputationalLaboratory.CalculationListener

       
    /*
     * plot search progress of different algorithms
     */
    final XYLineChartBuilder chartBuilder = XYLineChartBuilder.newInstance("random variations", "iterations", "costs");
    computationalLab.addListener(new CalculationListener() {
     
      @Override
      public void calculationStarts(BenchmarkInstance p, final String algorithmName,VehicleRoutingAlgorithm algorithm, final int run) {
        algorithm.addListener(new IterationStartsListener() {
         
View Full Code Here

Examples of jsprit.analysis.toolbox.ComputationalLaboratory.CalculationListener

       
    /*
     * plot search progress of different algorithms
     */
    final DataCollector dataCollector = new DataCollector();
    computationalLab.addListener(new CalculationListener() {
     
      @Override
      public void calculationStarts(BenchmarkInstance p, final String algorithmName,VehicleRoutingAlgorithm algorithm, final int run) {}
     
      @Override
View Full Code Here

Examples of jsprit.analysis.toolbox.ComputationalLaboratory.CalculationListener

       
    /*
     * plot search progress of different algorithms
     */
    final XYLineChartBuilder chartBuilder = XYLineChartBuilder.newInstance("schrimpf vs greedy", "iterations", "costs");
    computationalLab.addListener(new CalculationListener() {
     
      @Override
      public void calculationStarts(BenchmarkInstance p, final String algorithmName,VehicleRoutingAlgorithm algorithm, int run) {
        algorithm.addListener(new IterationStartsListener() {
         
View Full Code Here

Examples of jsprit.analysis.toolbox.ComputationalLaboratory.CalculationListener

       
    /*
     * plot search progress of different algorithms
     */
    final XYLineChartBuilder chartBuilder = XYLineChartBuilder.newInstance("alpha-sensitivity", "iterations", "costs");
    computationalLab.addListener(new CalculationListener() {
     
      @Override
      public void calculationStarts(BenchmarkInstance p, final String algorithmName,VehicleRoutingAlgorithm algorithm, int run) {
        algorithm.addListener(new IterationStartsListener() {
         
          @Override
          public void informIterationStarts(int i, VehicleRoutingProblem problem,Collection<VehicleRoutingProblemSolution> solutions) {
            /*
             * plot only distance-costs, i.e. without fixed costs
             */
            VehicleRoutingProblemSolution bestOf = Solutions.bestOf(solutions);
            chartBuilder.addData(algorithmName, i, bestOf.getCost()-bestOf.getRoutes().size()*100.);
          }
         
        });
       
      }
     
      @Override
      public void calculationEnds(BenchmarkInstance p, String algorithmName,VehicleRoutingAlgorithm algorithm, int run,Collection<VehicleRoutingProblemSolution> solutions) {}
     
    });
    /*
     * define dataCollector to collect an arbitrary number of indicators as well as solutions
     */
    final DataCollector dataCollector = new DataCollector();
    computationalLab.addListener(new CalculationListener() {
     
      @Override
      public void calculationStarts(BenchmarkInstance p, String algorithmName,VehicleRoutingAlgorithm algorithm, int run) {}
     
      @Override
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.