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:
- Set Pricing Preferences: Use the sliders to define the maximum and minimum payments, the value of your time, and any penalties for late arrivals.
- Choose Time Compensation: Select whether you want to be compensated for time spent waiting at the departure and/or arrival locations.
- 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.
- Check Contract Terms: The "Contract Terms" section shows the mathematical formula that represents your settings.
- 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
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 =
Late Compensation Function:
l =
Where:
- = total_time_in_minutes (Total trip time in minutes)
Final 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: