ACI Documentation

Facility Route Optimization

Executive Summary

Facility Route Optimization re-sequences the visits on a facility route so the day's driving is as short as possible, and writes the new start times back to the visits in AlayaCare. Coordinators start a report for one or more facilities and a date range; each facility and each day in the range is optimized separately. For every facility day, the system reads the visits from AlayaCare, places each client at the visit address, asks the mapping service for the fastest driving order starting from the facility's depot, and then updates the visit start times in AlayaCare to follow that order. Each run is listed on the main page, and opening a run shows the result for every facility and day, with any messages. Because this page changes visits in AlayaCare, its settings control which AlayaCare checks may be overridden when the times are written.

Key Features

  • Start a run for selected facilities (optionally narrowed by group) and a date range; each day is processed on its own
  • Check that each facility is set up with a starting location, a geocoded starting address, a starting time and a depot visit time before anything is changed
  • Combine visits for the same client, address and start time into one stop, aligned to the longest duration
  • Leave out services excluded from route optimization, and keep fixed-time visits at their set time
  • Find the fastest driving sequence with the facility's starting location and, when set, ending location
  • Update each visit's start and end time in AlayaCare and add a note to the visit recording the change
  • Review each facility day's result, number of visits, travel distance and travel time, and read the messages for any problems
  • Choose which AlayaCare validations may be overridden when visit times are updated (page settings)

Typical Workflow

  1. Click Start A New Report.
  2. Optionally choose Groups to narrow the Facilities list, then choose one or more Facilities.
  3. Choose the date range, then click Ok. A progress panel lists the facilities and days as they are processed and can be cancelled.
  4. When processing finishes, the run opens automatically. Review the Result for each facility and day.
  5. Click the edit icon (or right-click a row and choose Edit) to read the Result Messages for a facility day, then click Ok.
  6. Use the back arrow to return to the list of runs.

Configurable Settings

Open View Settings or Edit Settings from this screen (when permitted) to change these options.

GroupSettingTypePurpose
GeneralFixed Time Visit TagTextThe AlayaCare tag that marks a visit as fixed time. Visits with this tag keep their appointment time during optimization and are not changed.
Update Visit OverridesOverlapping VisitsYes/NoAllows the visit time update even when it overlaps another visit.
Update Visit OverridesService InstructionsYes/NoBypasses the AlayaCare service-instructions validation.
Update Visit OverridesReason CodeYes/NoBypasses the AlayaCare reason-code validation.
Update Visit OverridesLocked VisitYes/NoAllows changes to a visit that is locked in AlayaCare.
Update Visit OverridesBlocked EmployeeYes/NoAllows the update when the assigned employee is blocked for the client or service.
Update Visit OverridesUnavailable EmployeeYes/NoAllows the update when the assigned employee is unavailable at the new time.
Update Visit OverridesBlocked FacilityYes/NoAllows the update when the facility is blocked for scheduling.
Update Visit OverridesAuthorizationYes/NoBypasses AlayaCare authorization checks.

A pause between visit updates is also set outside this dialog; when set, the run waits that long between each visit it updates.

Available Permissions

The following permissions are available to be assigned to AlayaCare Roles:

AttributeWhat It Controls
ViewOpen the page and open a run
Settings ViewOpen View Settings to see the page configuration
Settings EditOpen Edit Settings and change the page configuration

Main Grid

Lists every facility route optimization run, newest first (14 rows per page).

ColumnDescription
AddedDate and time the run was started, in the user's time zone.
Added ByUser who started the run.
FromFirst date of the range.
ToLast date of the range.
Processing StartWhen processing began.
Processing EndWhen processing finished.
DurationHow long processing took.
Manage RecordsAn edit icon that opens the run.

Actions

ButtonDescription
Start A New ReportOpens the Start A New Report dialog.
View SettingsOpens the page settings in read-only mode (when settings view is permitted).
Edit SettingsOpens the page settings for editing (when settings edit is permitted).
Edit (icon on a row, or right-click a row)Opens the run to show its results.

Dialog Components

Start A New Report

Opens from Start A New Report.

FieldPurpose
GroupsNarrows the Facilities list to facilities in the selected groups.
FacilitiesThe facilities (routes) to optimize. Use Select All to choose every facility listed.
Choose a Date Range (each day will be processed individually)The first and last day to optimize.

Click Ok to start. A warning is shown if no facility is selected ("Please select at least one facility") or the date range is missing ("Please select a valid date range").

Facility Route Optimization Run

Opens from the main grid, and automatically when a run finishes. The run number is shown at the top (ID). Use the back arrow to return to the list.

Grid

Lists the result for each facility and day that had visits to optimize (12 rows per page).

ColumnDescription
NameThe facility.
DateThe service day.
ResultPass when the mapping service found a sequence, otherwise Fail.
VisitsNumber of visits that were included.
Travel KMDriving distance of the optimized route.
Travel TimeDriving time of the optimized route in minutes.
Manage RecordsAn edit icon that opens Detail.

Grid Actions

ButtonDescription
Edit (icon on a row, or right-click a row)Opens Detail for the row.

Detail

A read-only dialog showing the Result and the Result Messages for the facility day, such as clients without a map location, errors from the mapping service, waypoints that could not be placed, and visits that AlayaCare refused to update. Click Ok to close.

Dependencies

The following tables must be configured for lookups on this view to work:

TableDescription
FacilitiesFacilities offered for the run, with their time zone and route setup: starting location (with a geocoded address, a starting time and a depot visit time in minutes) and optional ending location.
GroupsGroups used to narrow the facility list.
ServiceCodesService codes flagged to be excluded from route optimization, and how long each service takes (the visit's own duration or a duration set on the service code).
TagsThe tag chosen as the fixed-time visit tag in the page settings.

Processing Overviews

This section describes what happens after you confirm a processing action.

Ok (Start A New Report)

  1. Reloads the page settings and checks the selection and date range. The dialog closes and a progress panel opens that can be cancelled. The run is created with the user, the start time and the date range.
  2. Checks every selected facility before doing any work. Processing stops with a warning if a facility is not found, is not set to use a starting location, has no geocoded starting address, or has no starting time or depot visit time.
  3. For each facility, loads its visits for the whole date range in the facility's time zone, leaving out cancelled visits, then works through each day in the range.
  4. For each day, leaves out visits on hold and visits without a client, loads each visit's client, service and details, and works out its location: the service's own address when the service overrides the address, otherwise the client's home address. Visits for the same client, address and start time are treated as one stop, and every visit in the stop is aligned to the first visit's start time and the longest duration.
  5. Leaves out visits whose service code is flagged to be excluded from route optimization. Each remaining visit is given a service duration: the visit's own length, or the service code's duration, whichever the service code is set to use, and five minutes when that is zero. Visits tagged with the fixed-time tag keep their appointment time.
  6. If any included client has no map location, no optimization is attempted for that day. The result is Fail and the message "Client ... does not have a valid location geocoded." is recorded for each such client. Days with no usable visits produce no result.
  7. Otherwise asks the mapping service for the fastest driving order (traffic ignored): from the facility's starting location, through each stop, to the facility's ending location when one is set (the starting location when it is set to end where it starts). Departure is the facility's starting time plus the depot visit time.
  8. If the mapping service returns a sequence, the result is Pass and the travel distance and time are saved. Errors and constraint failures from the mapping service are recorded in the result messages and the result stays Fail.
  9. For a Pass, updates the start and end of every non-fixed visit in AlayaCare to the estimated arrival and departure (five minutes are added to the end when the two would be equal). All visits at the same stop get the same times. The update uses the overrides turned on in the settings, and waits the configured pause between updates.
  10. After each successful update, adds a note to the visit in the form "Start time changed from {old time} to {new time} by Facility Route Optimization". If AlayaCare refuses an update, a warning is shown and "At least one visit failed update" is added to the result messages. The result can still be Pass.
  11. Saves the facility day's result, visit count, travel and messages. When every facility and day is done, saves the end time and duration on the run and opens the run.