top of page

Blockchain, IoT & ML - a magical concoction for Supply-Chain


ree

Introduction

I had completely underestimated the complexity of shipping industry; when a proposal had come along to architect a solution. The company is providing solutions to shippers, terminal operators and to logistics provider. And their BHAG was to provide complete transparency to their customer's customer – ranging from where my shipment is; to did all the involved entities, from manufacturers or producers to retail or trucker, in the supply-chain meet their contractual obligation. And to do all of this in the most optimum way i.e. to reduce the cost, reduce the time of operations and to reduce the effort involved in completing a given pass-through of a supply.


In-terms of scope, I am to focus on shipping route/running cost optimization, container vessel stowage planning, terminal equipment plan, port operations optimization, to improve contractual/SLA related compliance and to reduce the port workers (stevedore) overtime.


Background

Chances are you may not be familiar with this domain and that is fine. However, some words will sound foreign, hence I will share my notes about the domain which will help you understand where the data is coming from; what the system, including predictive models, are supposed to do and the reason behind the proposed architecture.


Few important Terminologies

Container ships are called Liners. A container is a big box loaded completely or partially with goods. Containers dimensions have been standardized and the common ones are:


ree

20ft containers are the most common and are used to declare the capacity of the liner. All containers are 8ft wide. Both 20ft and 40ft are 8.6ft high; whereas tall cubes are 9.6ft high and have a length of 45ft.


ree

Refrigerated containers require power plugs; which are usually at the bottom of the ship. Tank containers could be carrying dangerous goods and therefore cannot be placed adjacent to containers carrying heat sensitive or inflammable material.


ree

Liners come in various sizes, however majority are bulk carriers – with a full capacity which is upward of 8000 containers; with triple-E types carrying 18000 containers and CDSCs carrying 19000 of them. The containers go on the deck as well as below it. The ship is divided into sections, called bays. It’s like a vertically slice of the ship, spanning above and below the deck. A large ship can have as many as 88 bays. Each bay is further divided into rows. So the row within a given bay is a vertical column. And these carry a set of containers on top of each other, called tiers.


ree

Each container is uniquely identified by the following coordinate – bay#row#tier#. Thus a container bearing a number 080312, is in 8th bay, 3rd row at level/tier 12. The deck gets defined by a hatch which separates the containers held below deck from the ones held above it.

We should also look at some of the terms used for port or terminal (also called). A typical port, as shown under, has a row of quay cranes which load and offload containers from the ships. The containers are stored in the yard. Trucks ferry the containers to and from the yard.


ree

When a ship arrives at the port, quay cranes (QCs) take the import containers off the ship's hold or off the deck. Next, the containers are transferred from the QCs to vehicles that travel between the ship and the yard. The yard consists of a number of lanes, where containers can be stored for a certain period. Equipment’s, like cranes or straddle carriers (SCs), serve the lanes. A straddle carrier can both transport containers and store them in the stack. It is also possible to use dedicated vehicles to transport containers. If a vehicle arrives at the yard, it puts the load down or the yard crane takes the container off the vehicle and stores it in a stack. After a certain period the containers are retrieved from the stack by cranes and transported by vehicles to transportation modes like barges, deep sea ships, trucks or trains. To load export containers onto a ship, these processes are also executed in reverse order. Most of the terminals make use of manned equipment’s, like straddle carriers, cranes and multi-trailer-systems. However, at semi-automated terminals, Automated Guided Vehicles (AGVs) are used for the transport of containers. Furthermore, the stacking process can also be done automatically by Automated Stacking Cranes (ASCs).

Architecture

Each player in any supply-chain wants to have the most optimal and cost-effective operations. When the operators are inter-dependent, like in shipping, to improve their efficiency; the complexity increases many times over. The picture below highlights some of the primary challenges faced by a liner and a terminal operator.


ree

Primary Use-cases to address


ree

Use-case1: Optimal stowage plan for the entire route. Aside from this, it should cater to number of business rules which are based on safety standards and constant monitoring. For example, temperature and humidity of reefer containers. Some containers carrying fish require a particular salinity of water. Most modern liners carry containers with all the required sensors which beams the monitored data continuously.


ree

Use-case2: Ship stowage plan should enable quay crane to move a container out of the ship in least number of moves. For example, the two situations in the diagram are unacceptable





ree

Use-case3: Containers weight distribution should be uniform across the ship and shouldn’t lead to a tilt in the draft line beyond a certain limit. A tilt is indicative of stress in the hulk and may also lead to the propeller blade ejecting out of the water. Aside from safety concerns, the propeller will not be able to push the ship at an optimal speed.


ree

Use-case4: Weight distribution of the containers shouldn’t lead to a tilt in the ship on either of its two sides – port or starboard. Aside from the danger of toppling over, the container on the deck might get thrown off the ship in the rough sea.







ree

Use-case5: The planning should encompass optimal quay crane scheduling in such a way that all the export (in red) and import (in green) containers should be handled by all the free cranes in least number of moves.



ree

Use-case6: Optimize the vehicle scheduling by tying it with the ship loading sequence. By rule, the ship per bay is loaded from sea to the land side. Each container has its own preparation time, which includes vehicle ferrying time and in refrigerated containers case, ensuring that the temperature and humidity will be maintained within the range while the container is being loaded.



ree

Use-case7: Allow for container position swap in such a way that preparation time of the containers is taken into account while deducing the container loading sequence; as long as the swap will not lead to increased time in offloading the container at its destination port.



ree

Use-case8: Build a model such that it has no-show possibility built-in, in such a way that in the event of a no-show the container loading sequence shouldn’t become sub-optimal.


Use-case9: Collect, monitor and alert in case of likely contractual breach. Sometimes it might trigger an insurance claim process too.


Use-case10: Collect, monitor and alert on completion of a handover from one business entity to another. Sometimes it might trigger an auto payment from the bank.


Use-case11: This is similar to use-case5. Yard crane and truck or straddle carrier scheduling. Both the truck and yard crane scheduling algorithms have to handle different rate of offloading and on-boarding of containers from many different ships on one end and different places where the containers should be stored in the yard for optimal next pickup or shipment, on the other.


Example supply-chain

To best describe the usage of blockchain, machine-learning and IoT sensors; its best to talk about a particular product’s supply-chain. I will go with French wine export as an example. The overall supply-chain involves many business entities, as shown in the diagram below:


ree

You can get more information about these entity’s role in the supply-chain from wiki.

An end-customer will be interested in knowing as to where the wine got bottled, where the grapes were grown etc. For expensive wines, the retailer has to maintain the shipment history and inspection reports too. With increasing digitization, the demand on authenticity proof will become common-place.

The diagram below shows the centrality of blockchain, IoT sensors and Machine-learning plays in supply-chain optimization and automation solution. Some of the important benefits that it accrues over tradition supply-chain and ERP solutions are:

  • Improves the efficiency by un-coupling integration across different vendor solutions, lot of data is captured and analysed along the supply-chain which will quickly bubble-up the redundant and inefficient business processes and by automating verifiable and traceable business essentials like payments and insurance claims.

  • Helps reduce cost by negating the chances of human error on any step along the way

  • Provides for high quality security and trust by providing for traceable data and data which just cannot be tampered with

  • End-to-end visibility by enabling end-customer to have all the details needed for trustworthy purchase decisions. And by delivering customer feedback about the product to the right decision makers as and when the feedback becomes available

  • Unparalleled intelligence by sourcing data from all related parties for dependency analysis to trigger a business rule breach. For instance, trucker route change could be because of genuine local weather condition (like heavy rain or landslide); shouldn’t trigger a breach of predetermined route taken business rule in the smart-contract.


ree

Estimation of data volume

A reefer container or any special provisioning container would carry from 1 to 3 sensors; with each sensor carrying its own collection timers – triggering a data collection every one to four times in an hour. Additionally data was sourced from Google maps, weather services, ship-engine, port-vehicles and social-media. They were anticipating about 150 million new measurements to show up in the dataflow cluster every hour. Data compression (redundancy removal) at the edge was also proposed.


Architecture Explanation

The proposed architecture was as under:


ree

Since Apache NiFi is memory and network intensive and that the company expected to scale its service to handle 100 mil data volume per month for the 1st 6 months. A m4.large instance of AWS was recommended, which is EBS optimized and Network optimized, to carry the NiFi instance. Additionally the disk partitions of separate disks for the Provenance, FlowFile, and Content repositories, were recommended. Rest of the nodes in the 8-node cluster were all c4.xlarge boxes.


Conclusion Supply-chain domain is a prime candidate for the application of technological confluence of IoT, blockchain and machine-learning. Very complex business problems can be solved. And with a cloud fabric to support its data-volume need, a holistic approach towards offering a highly scalable and completely secure solution has become a reality.


 
 
 

Comments


bottom of page