Skip to Content
Product Information
Author's profile photo Marcus Dettenbach

SAP optimizes Berth Plans to increase productivity and utilization of scarce infrastructure

Imagine you run an ever increasing business but cannot expand your infrastructure to meet growing demand. 

Many logistic service providers such as harbor operators see increasing demand but cannot easily increase their infrastructure such as the number of berths in a harbor. The intuitive solution is to optimize productivity and utilization of what you already have. That is where optimization kicks in.

Luckily this is one of the tasks that can be done quite well with the integrated SAP HANA features for optimization. My name is Marcus Dettenbach and I am a Data Scientist at SAP. This blog is about a solution we built to tackle the problem I just lined out.

Berth Planning – How to approach the problem

Do more with less – Berth Planning is one of the classical optimization problems of matching demand and supply in an optimal way. Demand in our case are vessels that require a berth position for loading and unloading. Supply is the harbor’s infrastructure such as berths, cranes, pumps etc. The objective is to pack vessels as tight as possible in the time and space dimension and to maximize productivity of loading and unloading. Of course there are quite a number of constraints to consider. These constraints include minimal spatial and time distance between vessels, draught of a vessel, handling of dangerous goods, special equipment for loading or unloading, timing constraints etc. The figure below illustrates the problem.

illustrative%20concept%20of%20berth%20planning

Illustrative concept of berth planning

If the description of the current problem gives you a tingling sensation in the back of your mind, then it’s probably the reminder of the operations research course you once took at university or the linear programming lecture you attended. Right, this is the time this becomes quite useful since the problem can be modeled as a so called set partitioning problem.

The solution approach works like this: A set of vessels needs to be berthed. A number of berth plans are created. Each berth plan covers a subset of vessels and has costs attached. The task is to find a set of berth plans that covers all vessels once and minimizes total cost. This set of berth plans is called a partition and constitutes the solution, i.e. the optimal berth plan.

Getting out the secret sauce – OFL and SCIP

In order to solve it, we use the SAP HANA Optimization Function Library (OFL). Similar to the SAP HANA Predictive Analytics Library (PAL) the OFL is an SAP HANA  Application Function Library and comes with every SAP HANA installation.  The OFL provides functions to solve various optimization problems including the Set Partitioning Problem. Being one of the lesser known features of SAP HANA it provides access to an open-source solver called SCIP. While other (commercial) solvers can also be used by OFL, we found that for many problem sizes in berth planning SCIP solved most problems in reasonable time. Only to stress this point a little bit more: In most projects or product development it is highly appreciated that SCIP comes for free with every SAP HANA installation whereas commercial solvers usually have a pretty decent price tag attached.

Guess What! Berth Planning is now part of SAP Yard Logistics.

With the 2021 release of SAP Yard Logistics berth planning became an integral part of the product. SAP Yard Logistics has always integrated end-to-end yard logistics management. With berth planning, a new feature was added to allow for optimal berth allocation. The resulting berth plan is graphically visualized and fully integrated into the overall solution.

Sample%20berth%20plan%20in%20SAP%20Yard%20Logistics

Sample berth plan in SAP Yard Logistics

Let’s sum it up.

In this blog post you have been introduced to one example of how the built-in optimization capabilities of SAP HANA can be applied. The SAP HANA optimizer capabilities can solve any kind of linear optimization problem and have been applied successfully in projects and product development. SAP Data Science Teams have a huge amount of experience in developing customer or product specific optimization algorithms.

If you are interested in using tools like OFL with SCIP in your own products or have any questions around optimization problems in general, please feel free to contact Marcus Dettenbach or engage in the comment section below.

For the readers interested in other use cases of applied optimization at SAP these blog posts offer more on this topic:

SAP optimizes call center workforce to make customers and staff happy

SAP schedules car drivers at scale

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michael Cocquerel
      Michael Cocquerel

      Marcus Dettenbach

      Thanks for this blog, it looks promising.

      I have in mind one use case related to job scheduling in our HANA system in order to minimize to memory consumption and avoid peaks. Each HANA job consist of an HANA store procedure and we are already collecting memory consumption of each procedure thanks to the HANA expensive statement trace. All those information are store into a customer table.
      OFL seems to be installed on our system as I saw OFL entries in table SYS.AFL_FUNCTIONS with functions like GENIOS_SOLVE, GENIOS_SOLVE2, NETWORK_SIMPLEX_SOLVE, COST_SCALING_SOLVE, LAPJV_SOLVE.
      My issue is that I didn't find any information about those functions in help.sap.com . Are they documented somewhere else? What is the one that allows usage of SCIP ?

      Regards,

      Michael

      Author's profile photo Marcus Dettenbach
      Marcus Dettenbach
      Blog Post Author

      Hi Michael, thank you for your comment.

      Please note the following limitation regarding the license and external (outside of SAP) use.

      The AFL OFL is free to be used. No extra license is necessary.

      The MILP API for solving linear or  mixed integer problems is only allowed to be use in SAP products or projects. Because of licensing restriction customers or partners must not use it directly.

      I am allowed to share some documentation and an sql script with an example. In case you are interested just send me an e-mail.

      Regards,
      Marcus