Examples of RouteTotals


Examples of com.lbslocal.cc.objects.v3.route.RouteTotals

      totalTime = "PT1M";
    return totalTime;
  }

  private RouteTotals getTotals(SegmentDescription[] segmentDescription, RouteProximityOptions ro, RouteStop[] rs, double gTotalToolFeeCost) {
    RouteTotals rt = new RouteTotals();

    double distance;
    distance = 0;

    try {
      distance = segmentDescription[segmentDescription.length - 1].getCumulativeDistance();

      // Total com ped�gios
      rt.setTotaltollFeeCost(Functions.formatDouble(gTotalToolFeeCost, "0.00"));

      // dist�ncia total
      rt.setTotalDistance(Functions.formatDouble(distance, "0.00"));

      // calcula o tempo total da viagem
      rt.setTotalTime(getTotalTime(rt.getTotalDistance(), ro.getVehicle().getAverageSpeed()));

      // calcula o total do combust�vel gasto na viagem
      if (ro.getVehicle().getAverageConsumption() > 0)
        rt.setTotalFuelUsed(Functions.formatDouble((rt.getTotalDistance() / ro.getVehicle().getAverageConsumption()), "0.00"));

      // calcula o valor total gasto com combust�vel na viagem
      rt.setTotalfuelCost(Functions.formatDouble((rt.getTotalFuelUsed() * ro.getVehicle().getFuelPrice()), "0.00"));

      // calcula o valor total gasto na viagem
      rt.setTotalCost(Functions.formatDouble((gTotalToolFeeCost + rt.getTotalfuelCost()), "0.00"));

      // Calcula o valor de tarifas de taxi
      double[] TaxiFare = getTaxiFare(rt, rs);
      rt.setTaxiFare1(TaxiFare[0]);
      rt.setTaxiFare2(TaxiFare[1]);
    } catch (Exception ex) {
      // throw (ex);
    }

    return rt;
View Full Code Here

Examples of com.lbslocal.cc.objects.v3.route.RouteTotals

    String response = requestRoute("", false, rs, ro, new Extent(), new MapSize(), barriersRoute, idLicenca, _dataSource, methodID);

    SegmentDescription[] segDescription = getSegmentDescriptionAlternative(response, ro.getVehicle().getTollFeeCat(), ro, rs, _dataSource,
        idLicenca);
    RouteTotals rt = getTotals(segDescription, ro, rs, totalPedagios);

    return rt;
  }
View Full Code Here

Examples of com.lbslocal.cc.objects.v3.route.RouteTotals

        dependencyObjects[1] = cr.new ObjectsHelper();
        dependencyObjects[1].object = new SegmentDescription();
        dependencyObjects[1].alias = "SegmentDescription";
       
        dependencyObjects[2] = cr.new ObjectsHelper();
        dependencyObjects[2].object = new RouteTotals();
        dependencyObjects[2].alias = "routeTotals";
       
        dependencyObjects[3] = cr.new ObjectsHelper();
        dependencyObjects[3].object = new RouteSummary();
        dependencyObjects[3].alias = "routeSummary";
View Full Code Here

Examples of com.lbslocal.cc.objects.v3.route.RouteTotals

          ri.getRouteSummary()[x].setDistance(rpi.getRouteSummary()[x].getDistance());
          ri.getRouteSummary()[x].setPoint(new Point());
          ri.getRouteSummary()[x].setPoint(rpi.getRouteSummary()[x].getPoint());
        }
      }
      ri.setRouteTotals(new RouteTotals());
      ri.setRouteTotals(rpi.getRouteTotals());
      double totalTime = 0;
      if (rpi.getSegDescription() != null) {
        ri.setSegDescription(new SegmentDescription[rpi.getSegDescription().length]);
View Full Code Here

Examples of com.lbslocal.cc.objects.v3.route.RouteTotals

   * Calcula os totais da rota informada
   */
  public RouteTotals getRouteTotals(RouteStop[] rs, RouteOptions ro, int idLicenca) throws Exception {
    iniDate = System.currentTimeMillis();

    RouteTotals rt = new RouteTotals();

    try {
      Validation("getRouteTotals", idLicenca, rs, ro);
      RouteProximityOptions routeOptions = new RouteProximityOptions();

View Full Code Here

Examples of com.lbslocal.cc.objects.v3.route.RouteTotals

          ri.getRouteSummary()[x].setPoint(new Point());
          ri.getRouteSummary()[x].setPoint(rpi.getRouteSummary()[x].getPoint());
        }
      }

      ri.setRouteTotals(new RouteTotals());
      ri.setRouteTotals(rpi.getRouteTotals());

      if (rpi.getSegDescription() != null) {
        ri.setSegDescription(new SegmentDescription[rpi.getSegDescription().length]);
View Full Code Here

Examples of com.lbslocal.cc.objects.v3.route.RouteTotals

                RouteInfo ri = route.getRoute((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], tk.getId());
                respostaWs = Common.SerializeJSObject(ri);
                break;
            case getRouteTotals:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { RouteStop.class, RouteOptions.class });
                RouteTotals rt = route.getRouteTotals((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], tk.getId());
                respostaWs = Common.SerializeJSObject(rt);
                break;
            case getRouteDescription:
                o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { RouteStop.class, RouteOptions.class });
                SegmentDescription[] sd = route.getRouteDescription((RouteStop[])tranformToArrayList((Object[])o[0]).toArray(new RouteStop[0]), (RouteOptions)o[1], tk.getId());
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.