The name is planner: Optaplanner

Planning problems. You will find them in all shapes and sizes. How do you work efficiently with the planning of a limited set of resources (employees, vehicles, classrooms, …) that are clustered with a lot of rules that, in an optimal world, must not be broken?

Problems

Take, for example, a transport company that is to supply 500 televisions to 10 different locations with only 3 trucks at its disposal and within a certain period of time. I don’t think it’s so easy to manually map out the best possible route for this, right?

 

Another example. 200 nurses who have to be divided into their shifts, taking into account contractual obligations and the wishes of the nurses themselves. Combined with the law of nature that says that a nurse can, of course, not practice 2 shifts at the same time, this again does not seem to be a simple planning that needs to be made.

 

In short, tackling such problems manually requires very time-consuming and intensive efforts, which are far from reaching the optimum level possible. But is it possible to achieve the optimum level? A solution is almost never optimal, but we can make sure that we generate the best possible solution within a certain time. How do you ask? Well, the Optaplanner software is the most suitable candidate for this.

Solution

What started out as a hobby soon grew into the world’s best business resource optimizer. Geoffrey De Smet is Optaplanner’s father and soon, after taking part in several competitions with his implementation, realized that he had a rough diamond that could lead to a new era in the optimization of business resources. Sponsored by Red Hat, Geoffrey and his team work on a daily basis on sharpening this rough diamond by generating new features which can master the modelling and solving of any kind of problem.

 

All of this may sound promising, but how does Optaplanner work correctly? This Technology uses metaheuristic algorithms and an effective scoring system that takes the scheduling of all kinds of business resources to the optimum level. The constraints of business rules form part of the basis of OptaPlanner and ensure that a planning will not deviate from certain criteria. Constraints are defined as hard and soft constraints in which the soft constraints can be both negative and positive and the hard constraints only negative.

 

Hard constraints are based on the principle that they must not be broken, and soft constraints may only be broken if there’s no other way. Each type of constraint is assigned a certain value that will feed the scoring system in the search for a solution. Constraints and their associated parameters are formulated and converted using the Drools business rules engine. 

 

Optaplanner will generate multiple underlying solutions in which each solution will be given a score, assigned by whether or not the constraints are broken. Negative constraints will be assigned penalties or and positive constraints will be assigned a reward. The engine will each time bring the solution forward with the highest possible score.

The way in which the planner looks for the most optimal solution is configured using complex metaheuristic algorithms that can be tweaked and benchmarked in such a way that the best possible solution can be found in a flexible manner.

Alright, for me an Optaplanner please!

 

Too bad, but Optaplanner is not a finished product that is ready to be integrated into your current systems. At Infofarm, we use the Optaplanner engine to build a customized, customer-focused solution that will fully meet our customers’ needs. The technology is 100% Java compatible and can be used by any developer by downloading the community version or by purchasing the enterprise version, with Red Hat taking full responsibility for support and maintenance.

 

Curious for more?

 

Take a look at the Optaplanner website and the use cases that have already been worked out. If you face similar planning problems in the future, you will undoubtedly remember this technology.

 

Thank god there’s Optaplanner!

Data is gold and infofarm wants to make this gold tangible. Infofarm wants to support their customers in processing their data by providing targeted analyses, forecasts and recommendations. Their passionate and talented team of data scientists, data developers and project managers, provides together with the latest technologies, significant added value to their projects, each other and their customers.

Author: Robin Pauwels, 25 july 2018