# Topsheet Test
title: Kelheim KEXI conventional Fleet

# Input files -------------------------
files:
 # kexi_customers:
 #   file: "*customer_stats_drt.csv"
 #   useLastRow: true
  conventional_vehicles:
    file: "*drt_vehicle_stats_drt.csv"
    useLastRow: true
  stops:
    file: "av-stops-Hohenpfahl-DP-AS.xml"
    xmlElements: 'transitSchedule.transitStops.stopFacility'
  drtVehicles:
    file: "*drt_vehicles.xml.gz"       # This is an XML file.
    xmlElements: 'vehicles.vehicle'    # Create an array from all <vehicle> tags which
                                       # are inside the <vehicles> tag
  

# These are text entry boxes in the UI
userEntries:


# Calculations ------------------------
# these are evaluated top down!
calculations:
  nr_conventional_vehicles: '{conventional_vehicles.vehicles}'
  conventional_fleetDistance: '{conventional_vehicles.totalDistance} /1000'
  #nr_stops: '{stops.id}'

  #kexi_passengerdistance: '{conventional_vehicles.totalPassengerDistanceTraveled} /1000'
  #kexi_rides: '{kexi_customers.rides}'
  #kexi_rides_per_vehKM:  kexi_rides / conventional_fleetDistance
  #kexi_waiting_mean: '{kpi.waiting_time_mean}'
  #kexi_waiting_median: '{kpi.waiting_time_median}'
  #kexi_p95: '{kpi.waiting_time_95_percentile}'

  # opHours: the drtVehicles file is an array of elements that each have t_1 and t_0.
  # This eqn takes the SUM of all t_1 values, subtracts the SUM of all t_0 values,
  # and divides this by 3600
  opHours: '( {drtVehicles.t_1} - {drtVehicles.t_0}) / 3600'



# Table rows
outputs:
  #- title: AV Rides
  #  value: {av.number_of_requests}
  #  #css styling
  #  style: {backgroundColor: yellow}

  - title: Number of conventional vehicles
    value: nr_conventional_vehicles
  - title: conventional Fleet Km
    value: conventional_fleetDistance
  #- title: Number of served stops
  #  value: nr_stops
  - title: Operating Hours
    value: opHours


  #- title: conventional Passenger Km
  #  value: kexi_passengerdistance
  #- title: KEXI Rides
  #  value: kexi_rides
  #- title: KEXI Rides per Veh-KM
  #  value: kexi_rides_per_vehKM
  #  style: {font: red}
  #- title: Waiting mean [s]
  #  value: kexi_waiting_mean
  #- title: Waiting median [s]
  #  value: kexi_waiting_median
  #- title: Waiting p95 [s]
  #  value: kexi_p95
