# Optimizing schedules is hard. Custom algorithms that leverage ML and Mathematical Optimization can help make it easy.

Staffing and scheduling optimization are crucial for many industries, significantly when the exact timing of high-volume activity can change based on complex factors. Augmenting the workforce and assets too early means diverting profit to unnecessary costs while waiting until high-volume demand is already underway, risking operating below capacity and decreasing customer satisfaction (e.g., if there are long wait times).

Machine learning can be deployed to forecast operational demand and predict event duration. Mathematical optimization can augment these ML inputs to recommend a schedule that optimizes against your unique scheduling objectives.

Mosaic Data Science has deep expertise in developing custom algorithms to solve highly complex scheduling problems.

#### In the following video, Mosaic displays a custom tool that leverages machine learning and mathematical optimization designed to optimize surgery scheduling for a hospital system.

Machine Learning’s (ML) rise and Mathematical Optimization’s plateau have led to some tension in the world of Operations Research. One might say there is some jealousy right now at how popularized ML has become. People in the optimization world treat ML as all hype, while people in the ML world treat optimization as archaic.

At Mosaic, we care about identifying the right tool for the right job, meaning that the relative popularity of the technologies we leverage is a moot point. After all, math itself is a few thousand years old. So, in the spirit of dedicating the use of tools to solve problems, instead of using problems to demonstrate the efficacy tools, we propose an exploration of how ML and mathematical optimization can complement each other in solving problems.

## Scheduling Problems Persist Despite Advancements in ML

Scheduling problems, in their most basic form, are:

1. An assignment problem, assigning resources to entities that require them,
2. A schedule is a sequence, an assignment problem that involves order
3. A schedule almost always has a start time and duration.

From a data scientists’ standpoint, it would be nice to capture all dimensions in a model (people, rooms, resources, asset features, etc.) As you start to imagine all the features that go into a schedule, finding an optimal time allocation becomes quite the challenge.

Scheduling problems remain some of the most difficult problems to solve. Because scheduling can be so complicated, schedulers often rely heavily on simple rules or over-generalized out of the box software to merely create feasible schedules. However, this doesn’t need to be the case. Scheduling problems are an excellent candidate for custom-built algorithms that use machine learning and mathematical optimization to find significantly better schedules at the click of a button.

## Mosaic has helped several organizations design and deploy ML to their scheduling challenges.

### Workforce Planning Predictions

Our whitepaper highlights best practices for optimizing seasonal staffing and resourcing.

The use cases we use to highlight the problem include forecasting Energy Consumption due to Weather and Optimizing the Routing of Technicians across the network, and Predicting Emergency Room Usage for a leading Hospital to Inform Staffing Needs.

### Automating Inspection with Computer Vision

In this customer success story, Mosaic helped an energy conglomerate to automate the inspection process using AI.

Computer vision offers all organizations a tremendous opportunity to identify assets that require attention, allowing them to automate & improve maintenance schedules.

### Automating & Optimizing Sales Force Routing Decisions

This case study highlights how Mosaic built custom sales forecasts to help a leading beverage company set more effective sales targets and plan profitable customer routes

ML and Optimization techniques used together can help businesses make decisions that directly affect the bottom line.

### Dispatch Routing Optimization for Home Service Technicians

The vehicle routing problem is a combinatorial optimization and integer programming problem which asks “What is the optimal set of routes for a fleet to traverse in order to deliver to a given set of customers?”

In our whitepaper, Mosaic explores the synergies between machine learning and optimization to illustrate a solution focused on dispatching in-home technicians.

## Custom Analytics vs Off-The-Shelf Software

An off-the-shelf solution always sounds excellent compared to the rigors of building something unique. Several of the prebuilt scheduling platforms focus on finding a feasible schedule instead of finding the optimal one.

For some situations, having a feasible allocation of resources is good enough. Still, for organizations looking to benefit from the power of machine learning & mathematical optimization to deliver the max ROI, they will likely need a solution that is unique to their data, resources, and processes.

Our sister company, Mosaic Software, has devoted an entire blog post to the topic of buying vs. building. Please read it here.

## Potential ML + Optimization Scheduling Optimization Use Cases

#### Maintenance Bay Scheduling

Schedules need to be developed for vehicles being backed into maintenance bays. An inventory of available parts, staff, and staff expertise need to be fused with information on the maintenance issues to sequence which vehicle should be given priority versus waiting in the lot.

#### Transportation

Many organizations own and manage large vehicle fleets. These organizations need to decide how to schedule the replacement of their vehicles over time while achieving low/no carbon emission goals that require an optimized schedule, not a feasible one.

Companies across the board look for ways to streamline goods’ movement while minimizing cost and maximizing service levels. One such process ripe for an ML & mathematical optimization solution is loading cartons onto trucks on the outbound dock.

#### Healthcare Resource Scheduling

With more foresight, hospitals can proactively adjust staffing levels or postpone less urgent scheduled surgeries that can involve ICU recovery time to open more ICU capacity and avoid a saturation event. In the following case study, Mosaic utilized ML to aid in resource allocation decisions.

#### Global Hotel Workforce Planning

In the hotel industry, it is valuable for management to know ahead of time how many rooms will likely be occupied on any given day. Because the number of rooms booked affects resourcing demands and revenue, knowledge of booking trends can help hotel operators plan ahead.

#### Food & Retail Weekly Staffing Scheduling

Any food or retail store needs to create a weekly schedule, yet fe