# Topsheet Test
title: Topsheet

# Input files -------------------------
files:
  customers:
    file: "*customer_stats_drt.csv"
    useLastRow: true
  vehicles:
    file: "*vehicle_stats_drt.csv"
    useLastRow: true

  drtVehicles:
    file: "*drt__vehicles.xml.gz"
    xmlElements: "vehicles.vehicle"

# These are text entry boxes in the UI
userEntries:
  vehCost_fix:
    title_en: Veh-Cost (Fixed)
    title_de: Veh-Cost (Fixed)
    value: 1.0
  vehCost_km:
    title_en: Veh-Cost / km
    title_de: Veh-Cost / km
    value: 0.50
  vehCost_hour:
    title_en: Veh-Cost / hour
    title_de: Veh-Cost / hour
    value: 4.00
  sampleSize:
    title_en: Sample Size
    title_de: Sample Size
    value: 1.00

# Calculations ------------------------
calculations:
  userCost_km: 0.25
  userCost_fix: 3.00
  minShareIdleVehicles: 1.0
  simple: 'vehCost_hour * userCost_fix'
  rides: '${customers.rides}'
  vehicles: '${vehicles.vehicles}'
  totalDistance: '${vehicles.totalDistance}'
  opHours: '(${drtVehicles.t_1} - ${drtVehicles.t_0}) / 3600'
  operatingHours: 'opHours * sampleSize ^ (-0.662)'
  directDistanceMean: '${customers.direct_distance_mean}'
  userFare: '${customers.fare}'
  demand: 'rides / sampleSize'
  fleetSize: 'vehicles * sampleSize ^ (-0.637)' 
  fleetMileage: 'round(totalDistance * sampleSize ^ (-0.928))'
  revenueDistance: 'directDistanceMean * demand'
  incomePerDay: 'userFare'
  expensesPerDay: 'fleetSize * vehCost_fix + fleetMileage*vehCost_km'
  annualProfit: '365 * (incomePerDay - expensesPerDay)'
  effectiveFleetSize: 'fleetSize * minShareIdleVehicles'

# Table rows
outputs:
  - title_en: Demand
    title_de: Demand
    value: demand
    style: { color: green}

  - title_en: Fleet size
    title_de: Fleet size
    value: fleetSize

  - title_en: Fleet mileage
    title_de: Fleet mileage
    value: fleetMileage

  - title_en: Revenue distance
    title_de: Revenue distance
    value: revenueDistance

  - title: Operating Hours
    value: operatingHours

  - title_en: Expenses/day
    title_de: Expenses/day
    value: expensesPerDay

  - title_en: Annual profit
    title_de: Annual profit
    value: annualProfit
    style: { textDecoration: underline }

  - title_en: Effective fleet size
    title_de: Effective fleet size
    value: effectiveFleetSize

