Solving Complex Planning Problems With The Help Of Machine Learning – A Practical Example



More efficient loading of heavy loads thanks to smart software solution

In logistics, we encounter many small and large questions every day – be it during the transport of goods, on the factory premises or in the warehouse: How are resources on the factory premises optimally used? When should the warehouse staff start removing goods from storage in order to be ready in time for the arrival of the truck without blocking valuable space at the ramp? Especially when it comes to heavy loads, the level of complexity increases once again, as these pose major challenges to all logistics disciplines due to their enormous weight and size. Machine learning can provide valuable assistance in solving such almost unsolvable tasks – and thus increase the efficiency of many processes.

As part of a customer project, we were recently faced with such a special planning problem: Numerous huge steel coils, each with an individual diameter, weighing several tons and varying widths, had to be loaded onto train wagons. As few wagons as possible were to be used. The aim was therefore to make optimum use of each of them in order to accommodate as many coils as possible on the shortest possible train.

The wagons, in turn, are designed for different coils. For example, they have specially shaped troughs that prevent the coils from rolling away, thus ensuring safe transport. Depending on the diameter, however, only certain coils fit into these troughs. The maximum permitted axle or line load of the wagons did not make things any easier either.

Machine learning can assist with complex planning problems

But how do you calculate the optimum distribution of the coils on the train? Just looking at the number of parameters to be factored – diameter, weight and width of the steel coils vs. trough size, axle and line load of the wagons – can make one dizzy. It quickly becomes clear that the calculation would yield an almost unimaginably large number of different combinations.

It’s a good thing that we can turn to computers in such cases. With the help of their computing power, simulations or artificial intelligence (AI), many complex problems can be solved much faster today than just a few years ago.

An innovative technology such as machine learning (ML) is particularly suitable for processing large volumes of data. ML is generally understood as a subfield of artificial intelligence (AI) and means the artificial generation of knowledge based on specific information. Simply put, a computer system can learn from experience in a similar way to a human being, draw conclusions from it and develop solutions. To do this, algorithms analyze sometimes huge data sets and recognize patterns in them. From these, they can then derive statistical models and general laws. It is important to know that it is still up to humans to feed the machine with both the data and the algorithm.

Smart pre-planning of loading based on machine learning

In our example, these are on the one hand the information regarding the steel coils and the wagons and on the other hand the appropriate algorithm: How can the coils be distributed over the train in the best possible way so that it remains as short as possible?

To solve the customer’s loading problem, we created a machine learning approach that sorted the steel coils into different clusters based on their properties. From these, the software we developed specifically for this purpose can determine combinations for the individual wagons in order to load the train as efficiently as possible. The basic idea was to always load the heaviest possible valid coil combinations first, in order to reduce the residual problem (the coils left over after this step) most effectively.

Illustrated, the algorithm proceeds in seven steps:

The more complex the problem, the more clever the algorithm must be

However, because it was also possible to place two coils next to each other in a trough for some wagons in the customer project, it was also necessary to extend the algorithm to include this option. The way to do this was to “add” valid individual combinations for a wagon load together and thus also achieve a valid double occupancy of the troughs. After this step, at least one trough on each wagon had to be loaded with two coils – otherwise this combination would have already been captured by the algorithm in the original combination pool. The next step was then to discard invalid as well as unnecessary combinations.

AI-supported calculation of the optimal loading quantity

The algorithm we developed was therefore as follows:

The calculation, which would have been difficult for a human, can now be processed in a few seconds with the help of the algorithm. Our customer now has a clear plan in which order and in which combinations the steel coils are to be loaded onto the train.

Transferring theoretical considerations into the real process and IT world

To ensure that such machine learning approaches do not remain mere gimmicks, it is important that they are also feasible and can be integrated into the actual process and IT world.

In the SAP environment, for example, the SAP S4/HANA Predictive Analytics Library can be used for this purpose. In our case study, we were thus able to calculate the information regarding the coils directly on the basis of the SAP database. This is not only conveniently often already provided within the framework of SAP S/4HANA, but also offers high performance in the calculation of complex planning problems.

Opportunities for the use of Machine Learning in SAP S/4HANA

It is worth taking a closer look at the possibilities of AI in the area of planning and optimization. New technologies such as machine learning offer excellent opportunities to solve complex planning problems and make processes noticeably more efficient – and thus more cost-saving. Have we piqued your interest? Then please feel free to contact us.

If you have any questions about this or other topics in the blog, please contact 

Hendrik Hilleckes
Development Architect 



Are you interested in state-of-the-art logistics solutions? Then I am your contact person. I look forward to your call or your message via contact form.

Stay up-to-date

Sign up now and get access to our free whitepaper and downloads.