Skip to main content

Value Function Builder

Create custom pricing functions for your transportation contracts with our interactive tool.

Compensation Model:

  • Maximum Payment: The highest amount the rider will pay. This is also the payment for an instant, on-time trip.
  • Minimum Payment: The lowest possible payment, which can be negative (meaning the rider gets paid).
  • Time Value: The rate at which the rider is compensated for their total travel time.
  • Late Compensation (Fixed): A fixed penalty subtracted for any late arrival.
  • Late Compensation (Per Minute): An additional penalty for each minute of late arrival.
  • Time Valuation Method: Determines if the rider is compensated for time spent waiting at the departure or arrival locations.

How to use the builder:

  1. Set Pricing Preferences: Use the sliders to define the maximum and minimum payments, the value of your time, and any penalties for late arrivals.
  2. Choose Time Compensation: Select whether you want to be compensated for time spent waiting at the departure and/or arrival locations.
  3. Review the Heatmap: The heatmap on the right visualizes the payment for different departure and arrival times. Hover over any cell for a detailed breakdown of the calculation.
  4. Check Contract Terms: The "Contract Terms" section shows the mathematical formula that represents your settings.
  5. Get the Code: Once you're satisfied, navigate to the "Python Code" or "API Request(s)" tabs to get the generated code to use in your application.

πŸš— Value Function Builder

Create custom pricing functions for your transportation contracts

πŸ—ΊοΈ Sample Trip

Mississauga β†’ Toronto
Earliest Departure: Jan 1, 2025 at 7:00 AM
Latest Arrival: Jan 1, 2025 at 9:00 AM
This sample trip has a 2-hour window. The heatmap shows how much you'll pay or receive based on your actual departure and arrival times.

πŸ’° Pricing Preferences

Maximum Payment$150
This is also the payment for instant transport on-time (zero travel time)
Minimum Payment$-100
Time Value (per minute)$0.5
Late Arrival Compensation (per minute)$0.0
Late Compensation (fixed amount)$0.0
Fixed compensation amount subtracted when rider arrives late

Time Compensation

No location compensation - only travel time and late arrival penalties apply

πŸ• Trip Times

πŸ–ŠοΈ Contract Terms

The total payment shall be calculated as follows:

Payment Formula:

Payment = 150βˆ’(0.5Γ—t)150 - (0.5 \times t)

Late Compensation Function:

l = 00

Where:

  • tt = total_time_in_minutes (Total trip time in minutes)

Final Payment = min⁑(150,max⁑(βˆ’100,Payment))\min(150, \max(-100, \text{Payment}))

πŸ“Š Value Heatmap

Arrival Time
08:00
08:10
08:20
08:30
08:40
08:50
09:00
09:10
09:20
09:30
07:00
07:10
07:20
07:30
07:40
07:50
08:00
08:10
08:20
08:30
$060m
$070m
$080m
$090m
$0100m
$0110m
$0120m
$0130m
$0140m
$0150m
$050m
$060m
$070m
$080m
$090m
$0100m
$0110m
$0120m
$0130m
$0140m
$040m
$050m
$060m
$070m
$080m
$090m
$0100m
$0110m
$0120m
$0130m
$030m
$040m
$050m
$060m
$070m
$080m
$090m
$0100m
$0110m
$0120m
$020m
$030m
$040m
$050m
$060m
$070m
$080m
$090m
$0100m
$0110m
$010m
$020m
$030m
$040m
$050m
$060m
$070m
$080m
$090m
$0100m
β€”
$010m
$020m
$030m
$040m
$050m
$060m
$070m
$080m
$090m
β€”
β€”
$010m
$020m
$030m
$040m
$050m
$060m
$070m
$080m
β€”
β€”
β€”
$010m
$020m
$030m
$040m
$050m
$060m
$070m
β€”
β€”
β€”
β€”
$010m
$020m
$030m
$040m
$050m
$060m
Departure Time
Rider Pays (Positive)
No Payment
Rider Receives (Negative)
Late Arrival Area (after 9:00 AM)
Heatmap shows payment values based on actual departure and arrival times
Version: v1.0.2

Next Steps​

Once you've created your value function using the builder above, you can: