メインコンテンツまでスキップ

Predefining operations by weekday

Planners can use simulation templates to define distinct operational rules and settings for different days of the week. For example, a fleet might have different vehicle availability or cost structures on weekends versus weekdays.

To achieve this:

  1. Create separate simulation templates for each distinct operational pattern (e.g., "Weekday Operations", "Weekend Operations").
  2. Configure the specific settings (like vehicle profiles, shift times, or cost parameters) within each template.
  3. Use the recurrence field in the simulation object to schedule when each template should be active.

Example: Vehicle Coding Rules You can define different "coding rules" or constraints for vehicles based on the day.

  • Monday-Friday Template: Vehicles might be configured with standard city traffic speeds and normal shift costs.
  • Saturday-Sunday Template: Vehicles might be configured with faster travel speeds (due to less traffic) but higher driver overtime costs.

When the system creates a simulation for a specific date, it picks the template matching that weekday, ensuring the correct vehicle configurations are applied automatically.

Managing Milkruns with varying routes

Milkruns—fixed routes that are repeated regularly—can also be managed effectively using templates. Since a template copies over existing routes and assignments, you can pre-assign orders to vehicles in the template itself.

If milkruns vary by day (e.g., Route A is run on Mondays and Wednesdays, but Route B is run on Tuesdays), you can:

  1. Create a "Monday/Wednesday Template" with Route A pre-planned (orders assigned to vehicles).
  2. Create a "Tuesday Template" with Route B pre-planned.
  3. Schedule these templates using the recurrence rule.

When the simulation for a Monday is generated, it will automatically include the pre-assigned Route A, ready for execution or further optimization.

Seasonal Operations

For businesses with seasonal fluctuations (e.g., holiday seasons, summer schedules), templates can be used to switch entire operational strategies automatically.

  • Standard Operations Template: Active for most of the year.
  • Peak Season Template: Active during specific months (e.g., November-December), with different settings like higher vehicle counts or extended hours.

By using the recurrence field with date ranges (using UNTIL or specific date lists), you can seamlessly transition between these modes without manual intervention.

Advanced Scenarios

For more detailed examples and advanced configurations, including how to construct complex recurrence rules and handle holidays, please refer to the Simulation Templates Scenarios guide.

Simulation Templates Scenarios

This guide provides detailed scenarios and examples for using simulation templates effectively, focusing on complex recurrence rules and operational patterns.

Understanding Recurrence Rules

The recurrence field in the simulation object uses the iCalendar (RFC-5545) format. This allows for powerful scheduling capabilities.

Common components:

  • FREQ: Frequency of the rule (DAILY, WEEKLY, MONTHLY, YEARLY).
  • BYDAY: Days of the week (MO, TU, WE, TH, FR, SA, SU).
  • UNTIL: Date until which the rule is valid.
  • COUNT: Number of occurrences.
  • INTERVAL: How often the rule repeats (e.g., every 2 weeks).

Example Strings

ScenarioRecurrence String
Every MondayRRULE:FREQ=WEEKLY;BYDAY=MO
Weekdays onlyRRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
Every 2 weeks on FridayRRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=FR
Until Dec 31, 2024RRULE:FREQ=DAILY;UNTIL=20241231T235959Z

Scenario: Seasonal Operations

Goal: Automatically switch between "Standard" and "Peak" operations based on the time of year.

Setup:

  1. Standard Template:
    • Configured for normal volume.
    • Recurrence: RRULE:FREQ=YEARLY;BYMONTH=1,2,3,4,5,6,7,8,9,10;BYDAY=MO,TU,WE,TH,FR (Jan-Oct, Weekdays)
  2. Peak Template:
    • Configured for high volume (more vehicles, longer hours).
    • Recurrence: RRULE:FREQ=YEARLY;BYMONTH=11,12;BYDAY=MO,TU,WE,TH,FR (Nov-Dec, Weekdays)

JSON Snippet (Peak Template):

{
"name": "Peak Season Template",
"simulation_mode": "template",
"recurrence": "RRULE:FREQ=YEARLY;BYMONTH=11,12;BYDAY=MO,TU,WE,TH,FR",
"recurrence_priority": 10,
}

Scenario: Holiday Planning

Goal: Handle public holidays where operations might be suspended or significantly reduced.

Approach 1: Exclusion via Project Settings The Project object has a public_holidays field. If a template's recurrence falls on a date listed in public_holidays, the system can be configured to skip simulation creation for that day.

Approach 2: Specific Holiday Template If you operate on holidays but with a skeletal crew:

  1. Create a "Holiday Template".
  2. Set recurrence to specific dates or a pattern matching holidays.
  3. Set a higher recurrence_priority than your standard daily template.

JSON Snippet (Holiday Template):

{
"name": "Holiday Skeletal Operations",
"simulation_mode": "template",
"recurrence": "RRULE:FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=25",
"recurrence_priority": 100,
}

Note: recurrence_priority ensures this template is chosen over the standard daily template if they overlap.

Scenario: A/B Testing Operational Changes

Goal: Test a new routing algorithm or vehicle configuration on specific days (e.g., Tuesdays) without disrupting the rest of the week.

Setup:

  1. Standard Template:
    • Recurrence: RRULE:FREQ=WEEKLY;BYDAY=MO,WE,TH,FR
  2. Test Template:
    • Recurrence: RRULE:FREQ=WEEKLY;BYDAY=TU
    • Configuration: New settings (e.g., algo_type: "dynamic" vs static).

This allows you to isolate the impact of changes to a single day of the week while maintaining stability for the rest of the operation.