AWS in Switzerland and Austria (Alps)
Optimizing operational planning for sustainability: e-switch’s AI solution with Timefold and AWS
Every organization grapples with the complex challenge of operational planning and resource optimization. From selecting the most efficient routes for dispatches, crafting the optimal employee shift roster, or scheduling maintenance jobs to allocating resources effectively, businesses across industries of all sizes face a myriad of intricate planning decisions daily.
These planning tasks, often involving numerous constraints, can significantly impact an organization’s efficiency and productivity, which results in unnecessary resource utilization and increases operational costs and carbon emissions. AI solutions can revolutionize the planning work by sorting through countless possibilities in planning and automating the complex optimization tasks to reach to optimal solution with least resource utilization. AWS makes it easy to build and scale AI solutions in the cloud by providing a comprehensive set of AI services and infrastructure, so organizations of every size can turn their ideas into real-world innovation.
In this blog post, you will learn how e-switch, a Swiss-based company, combines different types of AI to implement their planning solution to address sustainability challenges: Timefold’s open source constraint-solving model running on AWS infrastructure and AWS’s managed service for foundation models, Amazon Bedrock.
Real-world operations planning and sustainability challenges
Planning challenges occur when aiming to provide the best product or service with constrained resources. Traditionally, organizations plan manually – on paper, in an Excel spreadsheet, or in a dedicated system; tasks are primarily assigned based on experience and gut feeling, which can result in excessive carbon emissions from unnecessary travel and resource utilization.
Traditional planning methods that rely on static, long-term plans often fall short of addressing sustainability challenges in terms of environmental impact and long-term viability. These solutions need to account for rapidly changing conditions and adapt accordingly.
Instead of using traditional methods, innovating with AI solutions can have a significant impact. AI tools can be designed to understand and break down constraints, automate the planning process, and dynamically adjust plans based on changes in data. As a result, planners no longer need to spend the whole day planning tasks; instead, they have the freedom to focus on innovation. More importantly, the plans are optimized to minimize the resources needed while adhering to planning constraints.
Combining traditional and generative AI to optimize planning solutions
As the sustainability and cost consequences of planning are significant, the approach to planning has to evolve. To deal with this, e-switch has built their solution on AWS. Combining Timefold Solver, an opensource library, leveraging traditional AI with foundation models using Amazon Bedrock.
Timefold: In search of the best solution
Timefold Solver is a lightweight, embeddable constraint satisfaction engine which optimizes planning problems. The Timefold platform is built on Amazon Elastic Kubernetes Service (Amazon EKS) and Amazon Simple Storage Service (Amazon S3). Each EKS data plane node runs with a multi-core CPU required to solve a planning request. Planning requests can take several minutes to solve and are not distributed, meaning as new requests arrive, the data plane must scale accordingly. EKS allows the application to scale elastically, acquiring and releasing data plane resources as needed.
Timefold’s optimization algorithms are designed to solve complex planning and scheduling problems efficiently. As a planning problem gets more complex, the search space (the number of possible solutions to the planning problem) tends to blow up fast. To put this in context, relatively straightforward planning problems, e.g., the order of delivery of packets to 100 customers, can have more possible solutions (10157) than the number of atoms in the universe. Such problems are called NP-hard (extremely difficult computational problems) and are difficult to solve optimally for non-trivial datasets in a reasonable time, even with all the computer power in the world. Timefold AI models turn this problem on its head; instead of searching for the optimal solution in vain, it focuses on finding the best solution in the available time. This solution is near-optimal; however, it was found in minutes to hours rather than after the heat-death of the universe.
Using planning optimization companies have seen a remarkable 25% reduction in travel time for their fleets, which often include tens of thousands of vehicles. This optimization has led to significant annual benefits: over $100 million in cost savings and a reduction of more than 10 million kilograms in carbon emissions while respecting the constraints of the planning problem. For example, in field service routing, having a limit on the number of daily site visits an employee makes must be respected for the employee’s well-being. Timefold will find a solution to the planning problem while respecting those constraints.
Use case: Railroad maintenance scheduling
Let’s look at the real-world use case of railroad maintenance, which involves planning the daily activities of 1,200 field technicians responsible for scheduled device maintenance and emergency incident responses. A further team of 120 dispatchers coordinates the planning activities of the maintenance crews. Railroad maintenance is operationally complex. The infrastructure assets include tracks, signal systems, terminals, and electrification systems spread across the country. Railway infrastructure assets need regular maintenance at different intervals and skill requirements. To service these assets, maintenance crews must drive from job to job. Each crew member has a single vehicle, possesses a set of skills, and fulfills a handful of daily jobs.
Hard and soft constraints
Hard constraints are constraints that must be fulfilled. If that’s the case, the solution is feasible, and the plan can be executed. Some of the hard constraints for railroad maintenance scheduling include:
- Each maintenance job has a deadline (a maximum end date) and often a minimum start date too.
- Every day, crews need a lunch break around noon.
- Overtime is limited per day, per week, and per month.
- Maintenance jobs have skill requirements.
Soft constraints should be fulfilled as much as possible. They improve the business value of the solution, such as cost reduction and/or the quality of life for the employees. Those include:
- Minimize travel time to increase productivity.
- Avoid overtime to improve employee happiness.
- Schedule jobs earlier in the schedule to allow for unexpected jobs later.
Timefold examines all the constraints when its algorithms pick a solution to evaluate, out of a search space of more than billions of possible solutions, to discover the best way to assign each maintenance job to a crew.
Results
The result after implementing this solution for this use case is impressive. What once consumed 60-70% of 120 dispatchers’ time, coordinating to 1,200 field technicians, now takes just a few hours. This efficiency allows dispatchers to focus on critical or innovative tasks. The system meets and balances hard and soft constraints. Consequently, field crew travel time has decreased by 13-15% with higher job satisfaction, boosting productivity and reducing significantly CO2 emissions.
Planning meets generative AI
e-switch enhanced their planning solution by integrating Timefold’s technology with generative AI, leveraging AWS services to handle unstructured data across various silos. The architecture is built on Amazon Bedrock, offering a simple API endpoint for high-performing large language models (LLMs), and utilizes Amazon Bedrock Knowledge Bases to implement a Retrieval-Augmented Generation (RAG) architecture.
This solution optimizes field technician dispatch by:
- Integrating diverse data sources (ERP, maintenance specifications, HR systems) into Bedrock Knowledge Bases.
- Eliminating the need for custom integrations or manual data flow management.
- Equipping the LLM with proprietary company data.
- Enabling dispatchers to use simple prompts via a mobile app to query:
- Technician availability for specific tasks
- Proximity of technicians to job locations
- Required skills for tasks
- Suitable tasks for specific technicians
This approach significantly reduces processing time and minimizes human errors in task assignment, leading to more efficient and accurate field technician dispatch.
Conclusion
In this blog, you have learned how e-switch leverages the AWS cloud infrastructure, chooses the right AI tools to build the architecture to address the environmental challenges from inefficient planning. Do you want to try it out for yourself? Please find below the relevant documentation to learn more about planning optimization and Amazon Bedrock samples to begin working with large language models.
- e-switch Optimized Task Scheduling (OTS) with Timefold
- Open Source Vehicle Routing code with Quarkus and Timefold
- AWS repository of Amazon Bedrock Samples
- Implement a fully managed RAG solution using Knowledge Bases for Amazon Bedrock
e-switch’s solution demonstrates the concept of sustainability through the cloud. There are more ways to leverage AWS technology to meet your company’s sustainability goals: