Time to Accept Order

Formula

Variables

  • order_value: Value of the order in tokens

  • acceptance_time: Time taken by the manufacturer to accept the order (in minutes)

  • max_time: Maximum time allowed for acceptance to get the max reward (in minutes)

  • avg_response_time: Manufacturer's average response time to that customer (in minutes)

  • communication_score: Score (0-1) representing the manufacturer's communication during the waiting period

Weights

  • reward_weight_max: Weight for the max reward (e.g., 0.005 for 0.5%)

  • reward_weight_response_time: Weight for the reward based on average response time (e.g., 0.002 for 0.2% of order value)

  • reward_weight_communication: Weight for the reward based on communication score (e.g., 0.003 for 0.3% of order value)

reward = min(
    # Reward for immediate acceptance (before max_time)
    I(acceptance_time <= max_time) * reward_weight_max * order_value,
    # Combined reward for delayed acceptance (if not accepted before max_time)
    order_value * (
        reward_weight_response_time * (1 - avg_response_time / max_time) +
        reward_weight_communication * communication_score
    )
)

Explanation

  • The formula directly accounts for both immediate acceptance and delayed acceptance scenarios.

  • I(acceptance_time <= max_time) remains the indicator function, ensuring the first term applies only if the acceptance happens within the max_time limit.

  • The second term calculates the combined reward for delayed acceptance, considering both average response time and communication score.

  • min ensures the final reward doesn't exceed the order value.

Scenario

  • order_value = 100 tokens

  • acceptance_time = 12 minutes (exceeds max_time of 10 minutes)

  • avg_response_time = 7 minutes

  • communication_score = 0.7

Calculations

  1. Immediate acceptance reward:

    • I(acceptance_time <= max_time) = 0 since acceptance happened after max_time.

    • Therefore, this term contributes 0 tokens to the reward.

  2. Delayed acceptance reward:

    • reward_weight_response_time = 0.002 (2% of order value)

    • reward_weight_communication = 0.003 (3% of order value)

    • 1 - avg_response_time / max_time = 1 - 7 / 10 = 0.3 (normalized response time contribution)

    • Combined response and communication reward:

    • 0.002 * 100 * 0.3 + 0.003 * 100 * 0.7 = 0.6 + 2.1 = 2.7 tokens

  3. Final reward:

    • min(0, 2.7) = 2.7 (capped at the earned reward)

Therefore, in this scenario, the manufacturer would receive a reward of 2.7 tokens based on their delayed acceptance, considering their average response time and communication during the waiting period.

Last updated