Using Route Optimization to Reorder Calendar Events

Modified on Thu, 4 Dec at 11:35 AM

Using Route Optimization to Reorder Calendar Events

This guide covers using route optimization to reorder calendar events.

On this page

Jump to any section using the links below

The Optimize order feature automatically reorders multiple calendar events for a resource to minimize driving time, distance, and CO2 emissions by finding the most efficient route sequence.

TABLE OF CONTENTS


What is Route Optimization?

Route optimization is a powerful calendar feature that analyzes multiple events with geographic locations and calculates the most efficient order to visit them. The system evaluates thousands of possible route combinations in seconds and recommends the sequence that minimizes your chosen metric (driving time, distance, or environmental impact).
This is essential for:
  • Field service technicians visiting multiple customer locations
  • Healthcare professionals making home visits
  • Sales representatives scheduling client meetings
  • Any mobile resource traveling between appointment locations
The optimization can save significant time, fuel costs, and reduce environmental impact by eliminating inefficient routing.

Where to Access Route Optimization

The route optimization feature is available in the calendar view when working with events for a single resource that have location data.
Navigation: Calendar → Select events on a single resource → Optimize order

How Route Optimization Works

The Optimization Process

When you select multiple events and click Optimize order, Hubhus:
  1. Extracts location data from each event (addresses or coordinates)
  2. Calculates distances between all locations using real routing data
  3. Evaluates thousands of combinations (e.g., "40,320 possible routes and 64 transits")
  4. Applies your selected algorithm (brute force, nearest neighbor, or genetic)
  5. Ranks routes based on your optimization goal (time, distance, or CO2)
  6. Presents the optimal sequence with before/after comparison
The entire process typically completes in 1-2 seconds.

Using Route Optimization: Step-by-Step

Step 1: Select Multiple Events

Select the events you want to optimize on a single resource's timeline:
  1. Hold Ctrl (Windows/Linux) or Cmd (Mac) and click each event
  2. Or click the first event, hold Shift, and click the last event
Important: All selected events must:
  • Belong to the same resource
  • Have location information (address or coordinates)

Step 2: Click Optimize Order

Once multiple events are selected, the Actions section appears in the right sidebar. Click the Optimize order button.
A dialog box titled Route optimization of X events will open.

Step 3: Review Current Statistics

The system immediately displays current routing statistics:
Current metrics:
  • Driving minutes: Total time spent driving
  • Driving distance: Total kilometers traveled
  • CO₂ emission: Estimated carbon footprint
These represent your current event order.

Step 4: Configure Optimization Parameters

Parameter 1: Exclude Transport To/From Base

Controls whether the optimization includes travel from a starting base location.
Options:
  • Exclude transport to/from base - Minimize time from start of first event to end of last event (ignores travel from home/office)
  • Include transport to/from base - Minimize time from beginning of driving to first event until return from last event
Use "Include" when: Your resource starts and ends at a fixed base location (office, warehouse, home) and you want to optimize the entire journey including departure and return.
Use "Exclude" when: You only care about optimizing the sequence between events, not the journey to/from base.

Parameter 2: Optimization Method

Selects the algorithm used to find the optimal route.
Options:
Brute force method - Guarantees best route but is computationally intensive
  • Evaluates every possible combination
  • Always finds the absolute best route
  • Best for: High-priority schedules where perfect optimization matters
  • Note: "Heavy" computational load
Nearest neighbor method - Next address is always the closest
  • Fast and simple algorithm
  • Always goes to the nearest unvisited location
  • Best for: Quick optimization when locations are relatively clustered
  • Note: May not find the absolute best route but is very fast
Genetic algorithm - Finds closest to the most optimal combination
  • Evolutionary algorithm that "learns" better routes
  • Balances speed and optimization quality
  • Best for: Large numbers of events (10+) where brute force is too slow
  • Note: Gets very close to optimal without checking every possibility
Recommendation: Use brute force for 8 or fewer events, genetic algorithm for 9+ events.

Parameter 3: Optimization Goal

Determines what metric the system minimizes.
Options:
  • Minimize driving minutes - Reduces total travel time
  • Minimize driving distance - Reduces total kilometers traveled
  • Minimize birds flight - Optimizes based on straight-line distances (as-the-crow-flies)
Use driving minutes when: Time efficiency is your priority (most common choice).
Use driving distance when: You want to reduce fuel costs or vehicle wear.
Use birds flight when: You need a quick approximation without routing calculation overhead.

Step 5: Review Optimized Results

Once parameters are set, the system displays:
Optimized metrics:
  • Driving minutes: New total travel time
  • Driving distance: New total kilometers
  • CO₂ emission: New carbon footprint
Saves display:
  • Shows exactly how much time, distance, and CO₂ you save
  • Example: "✅ 51 min." saved in driving time
Optimization time:
  • "Optimized in 1.5 seconds"

Step 6: Review New Event Schedule

Scroll down to the Change events section to see:
Summary information:
  • Date: When events occur
  • Resources: Which resource is assigned
  • Time of first event: When the day starts (editable)
  • Buffer between events: Minutes between consecutive events
  • Round off start times: Time interval rounding preference
Event table shows:
  • Location: Full address for each event
  • Old time: Original scheduled time slot
  • New time: Optimized time slot
  • Type: Event type (e.g., "Konsulentbesøg")
  • Checkbox: Select which events to apply optimization to
  • Contact name: Associated person for the event
  • Phone number: Contact information
Key features:
  • Events are listed in the new optimized sequence
  • You can see exactly how each event's time changes
  • Checkboxes allow excluding specific events from the reordering
  • Blue links to contact names provide quick access

Step 7: Adjust Settings If Needed

Before applying, you can fine-tune:
Time of first event: Change when the day starts (e.g., from 07:00 to 08:00)
Buffer between events (minutes): Add time between consecutive appointments
  • Enter 0 for back-to-back scheduling
  • Enter 10-15 for short travel/preparation buffers
  • The optimizer schedules events accordingly
Round off start times to nearest: Standardize start times
  • No - Use exact calculated times
  • 5 minutes - Round to :00, :05, :10, etc.
  • 10 minutes - Round to :00, :10, :20, etc.
  • 15 minutes - Round to :00, :15, :30, :45
  • 30 minutes - Round to :00, :30

Step 8: Select Events to Change

By default, all events are selected (checkboxes checked).
To exclude an event from reordering:
  • Uncheck its checkbox
  • The event will remain in its original time slot
This is useful when certain appointments have fixed times that cannot be moved.

Step 9: Apply the Optimization

Click the Apply button at the bottom right.
The calendar updates immediately with the optimized event sequence and new times.

Practical Examples

Example 1: Field Service Technician

Scenario: A technician has 8 service calls across a city, scheduled in the order customers booked them.
Current routing:
  • 226 minutes driving
  • 245 km distance
  • 31.8 kg CO₂
After optimization:
  • 175 minutes driving (saves 51 minutes)
  • 184 km distance (saves 60 km)
  • 23.96 kg CO₂ (saves 7.8 kg)
Settings used:
  • Method: Brute force (8 events)
  • Goal: Minimize driving minutes
  • Transport: Exclude transport to/from base
  • Buffer: 0 minutes
  • Rounding: No
Result: Nearly an hour saved in driving, allowing an additional service call or earlier completion.

Example 2: Healthcare Home Visits

Scenario: A nurse has 6 home visits scheduled but needs to maintain 15-minute buffers for notes and preparation.
Solution:
  • Select all 6 events
  • Optimize with: Nearest neighbor method (fast)
  • Set buffer: 15 minutes
  • Set rounding: 15 minutes (professional appearance)
  • Minimize: Driving minutes
Result: Optimal route with consistent 15-minute buffers and start times at :00, :15, :30, :45.

Example 3: Sales Territory Visits

Scenario: A sales representative wants to minimize fuel costs across 5 client meetings.
Solution:
  • Optimize with: Brute force method
  • Goal: Minimize driving distance (not time)
  • Include transport to/from base (starts/ends at office)
  • Buffer: 0 minutes (meetings have built-in duration)
Result: Shortest total distance, minimizing fuel expenses.

Understanding the Algorithms

When to Use Each Method

Brute Force Method:
  • Best for: 2-8 events
  • Pros: Guaranteed optimal route
  • Cons: Exponentially slower as events increase
  • Use when: You need absolute best routing
Nearest Neighbor Method:
  • Best for: Any number of events
  • Pros: Very fast, good results for clustered locations
  • Cons: May miss better routes
  • Use when: Quick optimization is needed, locations are nearby
Genetic Algorithm:
  • Best for: 9+ events
  • Pros: Near-optimal results in reasonable time
  • Cons: Not guaranteed perfect
  • Use when: Large number of events makes brute force impractical

Quick Setup

Fastest optimization for typical field service:
  1. Select events (Ctrl/Cmd + Click)
  2. Click Optimize order
  3. Use defaults:
  • Method: Brute force (if ≤8 events)
  • Goal: Minimize driving minutes
  • Transport: Exclude to/from base
  1. Review results
  2. Click Apply
Total time: 10 seconds to optimize an entire day.

Best Practices

Always verify location data first: Optimization quality depends on accurate addresses. Check that all events have correct location information before optimizing.
Consider fixed appointments: Uncheck events with hard time constraints (e.g., customer requests specific time). Let the optimizer work around them.
Balance optimization goal with reality: Minimizing driving minutes may create odd time slots. Use rounding (15 or 30 minutes) for customer-facing schedules.
Add realistic buffers: Account for parking, walking to entrance, setup time, etc. A 5-10 minute buffer is often necessary between events.
Re-optimize when changes occur: If an event is cancelled or added, run optimization again to maintain efficiency.
Use appropriate algorithm: Don't use brute force for 15 events—it will take too long. Switch to genetic algorithm for larger event sets.

Troubleshooting

Q: The optimization doesn't show any savings
A: Your events may already be in optimal order, or locations may be in a straight line where sequence doesn't matter much. This is normal for some geographic distributions.
Q: I can't click Optimize order
A: Ensure: 1) You have multiple events selected, 2) All events belong to one resource, 3) All events have location data. Events without addresses cannot be optimized.
Q: The optimization moved an event to an impossible time
A: The optimizer focuses on routing efficiency and may not respect business hours or availability. Review the proposed schedule and manually adjust events that fall outside working hours. For automated checks, see How do I set business hours and holidays?.
Q: Why are there checkboxes next to events?
A: Checkboxes allow you to exclude specific events from reordering. Uncheck an event to keep it at its original time while optimizing around it.
Q: How does the system calculate driving time?
A: Hubhus uses real routing data that accounts for road networks, typical traffic patterns, and actual travel routes—not straight-line distances.
Q: Can I optimize events across multiple days?
A: No, route optimization works on events for a single resource on a single day. To optimize multiple days, run the optimization separately for each day.

Comparing Pack vs. Optimize Order

FeaturePackOptimize Order
PurposeCompress events to eliminate gapsReorder events for optimal routing
Event orderMaintains original sequenceChanges sequence for efficiency
Location dataNot requiredRequired for all events
CalculationSimple time-based compressionComplex route optimization
Best forFilling schedule gaps after cancellationsField service, mobile workers
Processing timeInstant1-2 seconds
Use both together: First optimize order for best routing, then pack to eliminate any remaining gaps.

For additional calendar optimization tools, see:

Summary

The Optimize order feature is an intelligent routing tool that automatically reorders calendar events to minimize driving time, distance, or CO2 emissions for mobile resources. By analyzing thousands of possible route combinations and applying sophisticated algorithms, it can save significant time and costs for field service operations. The feature provides full transparency with before/after comparisons, allows fine-tuning of optimization parameters, and gives you control over which events to include in the reordering. For organizations with mobile workers visiting multiple locations daily, route optimization can transform scheduling efficiency and dramatically reduce operational costs.

? Common searches

booking setup • calendar setup • appointment scheduling • booking configuration

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article