import{j as e}from"./ui-vendor-Dyu0xMC9.js";import{r as t,L as a}from"./react-vendor-BiKEbLqf.js";import{B as s,H as r}from"./button-F0c2zgfO.js";import{H as n,F as i,D as o,M as l}from"./Footer-BCdrvFQr.js";import{B as d}from"./badge-rRfUgTqY.js";import{C as c,d as m}from"./card-D8XUAx1y.js";import{B as h}from"./BreadcrumbNav-DNbFIb3a.js";import{C as x}from"./CaseStudyGate-DxLnTkbn.js";import{A as u}from"./arrow-right-BJutILxB.js";import{D as p}from"./download-DlY6qDWe.js";import"./chart-vendor-V3pFlbOw.js";import"./index-D2mkZfe8.js";import"./client-Ccea0ZZ8.js";import"./chevron-right-9d459eh4.js";import"./breadcrumb-BZGpceck.js";import"./refresh-cw-Lpgl1agh.js";const g=()=>{const[g,j]=t.useState(!1),f=`Check out this case study from Allerin: ${window.location.href}`,v=`mailto:?subject=${encodeURIComponent("Case Study: Predictive Freight Router — $18M Annual Fuel Savings")}&body=${encodeURIComponent(f)}`,N=e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"py-6 bg-surface/30",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsx(h,{items:[{name:"Home",url:"/"},{name:"Customers",url:"/customers"},{name:"Predictive Freight Router"}]})})}),e.jsx("section",{className:"py-16 bg-gradient-to-b from-surface/30 to-background",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground tracking-wide uppercase mb-4 block",children:"Case Study | Maritime Logistics | Machine Learning"}),e.jsx("h1",{className:"text-4xl md:text-6xl font-bold mb-4",children:e.jsx("span",{className:"bg-gradient-to-r from-data-orange to-data-teal bg-clip-text text-transparent",children:"$18M Annual Fuel Savings. 450 Vessels. Still Running 6 Years Later."})}),e.jsx("p",{className:"text-xl text-muted-foreground mb-8",children:"Predictive Freight Router: ML-Powered Logistics Optimization"}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[e.jsxs(s,{size:"lg",onClick:()=>j(!0),className:"bg-gradient-to-r from-data-orange to-data-teal hover:from-data-teal hover:to-data-blue",children:["Talk to an Architect",e.jsx(u,{className:"ml-2 h-5 w-5"})]}),e.jsxs(s,{size:"lg",variant:"outline",onClick:()=>{window.print()},children:[e.jsx(p,{className:"mr-2 h-5 w-5"}),"Download 1-pager"]}),e.jsx(s,{size:"lg",variant:"outline",asChild:!0,children:e.jsxs("a",{href:v,children:[e.jsx(l,{className:"mr-2 h-5 w-5"}),"Email this case"]})})]})]})})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-foreground",children:"Context"}),e.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"A global container shipping operator managing 450 vessels and 1.2 million TEUs annually was routing ships using static lane assignments updated quarterly by a team of four analysts. Their ETA predictions were off by 3 to 5 days. Fuel procurement was based on historical averages, not actual voyage conditions. Bunker fuel is the single largest operating cost in container shipping, and they were burning $18 million more annually than the physics of their routes required. The operator needed ML-powered route optimization that could factor in weather, currents, port congestion, draft restrictions, and fuel price arbitrage across bunkering ports. The system had to integrate with their SAP Transportation Management instance (SOAP APIs, not REST) and their existing Rails-based operations dashboard."})]})})}),e.jsx("section",{className:"py-12 bg-surface/30",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-foreground",children:"Approach"}),e.jsxs("ul",{className:"space-y-4 text-lg text-muted-foreground",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"text-data-teal mr-3 mt-1",children:"•"}),e.jsx("span",{children:"Built a PyTorch Graph Neural Network that models the global shipping lane network as a graph, with ports as nodes and routes as edges weighted by fuel cost, time, weather risk, and port congestion"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"text-data-teal mr-3 mt-1",children:"•"}),e.jsx("span",{children:"Rails middleware layer bridges SAP TM (SOAP/XML) with the ML pipeline (SageMaker/REST), handling data transformation, caching, and error recovery"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"text-data-teal mr-3 mt-1",children:"•"}),e.jsx("span",{children:"Route optimizer evaluates 15,000 permutations every 6 hours, incorporating live weather data, real-time port congestion feeds, and bunker fuel price APIs"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"text-data-teal mr-3 mt-1",children:"•"}),e.jsx("span",{children:"Progressive deployment: ran shadow mode for 8 weeks (ML recommendations alongside human decisions) before switching to ML-primary with human override"})]})]})]})})})]}),y=e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-6",children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Results"}),e.jsx(a,{to:"/how-we-measure#formulas",className:"text-data-teal hover:text-data-orange transition-colors text-sm font-medium inline-flex items-center",children:"Methodology →"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(c,{className:"clean-card",children:e.jsxs(m,{className:"p-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"Annual Fuel Spend (excess)"}),e.jsx("div",{className:"text-3xl font-bold text-foreground mb-1",children:"$18M → Eliminated"}),e.jsx("div",{className:"text-lg text-data-teal font-semibold",children:"-100%"})]})}),e.jsx(c,{className:"clean-card",children:e.jsxs(m,{className:"p-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"ETA Accuracy"}),e.jsx("div",{className:"text-3xl font-bold text-foreground mb-1",children:"±5 days → ±12 hours"}),e.jsx("div",{className:"text-lg text-data-teal font-semibold",children:"10x improvement"})]})}),e.jsx(c,{className:"clean-card",children:e.jsxs(m,{className:"p-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"Route Optimization Cycle"}),e.jsx("div",{className:"text-3xl font-bold text-foreground mb-1",children:"Quarterly → Every 6 hours"}),e.jsx("div",{className:"text-lg text-data-teal font-semibold",children:"Automated"})]})}),e.jsx(c,{className:"clean-card",children:e.jsxs(m,{className:"p-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"Port Congestion Delays"}),e.jsx("div",{className:"text-3xl font-bold text-foreground mb-1",children:"14% → 3.2%"}),e.jsx("div",{className:"text-lg text-data-teal font-semibold",children:"-77%"})]})}),e.jsx(c,{className:"clean-card",children:e.jsxs(m,{className:"p-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"Bunker Fuel Procurement"}),e.jsx("div",{className:"text-3xl font-bold text-foreground mb-1",children:"Historical avg → Dynamic arbitrage"}),e.jsx("div",{className:"text-lg text-data-teal font-semibold",children:"Cross-port optimization"})]})}),e.jsx(c,{className:"clean-card",children:e.jsxs(m,{className:"p-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"Analyst Team"}),e.jsx("div",{className:"text-3xl font-bold text-foreground mb-1",children:"Route planning → Exception handling"}),e.jsx("div",{className:"text-lg text-data-teal font-semibold",children:"Higher-value work"})]})})]}),e.jsx("div",{className:"mt-8 grid grid-cols-1 sm:grid-cols-2 gap-4",children:["450 vessels optimized across Atlantic, Pacific, and Indian Ocean trade lanes","1.2 million TEU annual throughput with no service level degradation","Survived the COVID-19 supply chain disruption (model adapted to unprecedented port closures)","System still in production 6+ years later (now on Rails 7, upgraded from Rails 5)","ROI payback period: 4.5 months"].map(t=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-data-teal mt-1 shrink-0",children:"✓"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t})]},t))})]})})}),e.jsx("section",{className:"py-12 bg-surface/30",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-foreground",children:"Stack & Integrations"}),e.jsx("div",{className:"flex flex-wrap gap-3",children:["Ruby on Rails (5 → 7)","PyTorch (GNN)","AWS SageMaker","SAP TM (SOAP)","PostgreSQL + PostGIS","Redis / Sidekiq","Weather API (ECMWF)","AIS Vessel Tracking","Bunker Fuel Price APIs"].map(t=>e.jsx(d,{variant:"secondary",className:"text-base px-4 py-2",children:t},t))})]})})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-foreground",children:"Approach Deep-Dive"}),e.jsxs("div",{className:"space-y-6 text-lg text-muted-foreground leading-relaxed",children:[e.jsx("p",{children:"The Graph Neural Network was the architectural insight that made this work. Traditional route optimization treats voyages as independent point-to-point calculations. But shipping networks are graphs: what happens at one port affects every connected route. When Shanghai gets congested, it does not just delay ships going to Shanghai. It cascades to Busan, Long Beach, Rotterdam. A GNN captures these network effects natively."}),e.jsx("p",{children:"The model ingests four data streams: historical voyage data (3 years of AIS tracking data covering every vessel in the fleet), live weather forecasts (ECMWF model, updated every 6 hours), real-time port congestion indicators (berth occupancy, vessel queue lengths, average wait times), and bunker fuel prices at 200+ bunkering ports worldwide."}),e.jsx("p",{children:"Every 6 hours, the optimizer generates route recommendations for every vessel currently at sea. Each recommendation includes: optimal speed profile (varying speed throughout the voyage to minimize fuel burn while meeting delivery windows), recommended bunkering ports (buy fuel where it is cheapest along the route), weather routing adjustments (reroute around developing storm systems), and port approach timing (speed up or slow down to arrive when berth space is available rather than anchoring to wait)."}),e.jsx("p",{children:"The SAP integration was the hardest part. SAP TM uses SOAP/XML over HTTP with complex nested schemas. The Rails middleware layer handles bidirectional data sync: pulling voyage plans and cargo manifests from SAP, pushing optimized routes back. The middleware includes a robust retry layer (exponential backoff with dead letter queue) because SAP's SOAP endpoints are, to put it politely, temperamental about uptime."}),e.jsx("p",{children:"The COVID stress test was unplanned but revealing. When ports started closing in March 2020, the model's training data had no precedent for \"major global ports shut down simultaneously.\" The model's confidence scores dropped (correctly), and it escalated more decisions to human analysts. As new data accumulated over 8 weeks, the model adapted. By June 2020, it was routing around closures and congestion patterns it had never seen in training data. The GNN's graph structure helped here: it could propagate disruption signals through the network even for port pairs it had never seen disrupted together."})]})]})})}),e.jsx("section",{className:"py-12 bg-surface/30",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-foreground",children:"Timeline"}),e.jsx("div",{className:"space-y-4",children:[{period:"Months 1-2",desc:"Data pipeline (AIS feeds, weather API, SAP extraction, fuel price APIs)"},{period:"Months 3-5",desc:"GNN model development and training on 3 years of historical data"},{period:"Months 6-7",desc:"SAP middleware development and integration testing"},{period:"Months 8-9",desc:"Shadow mode (ML recommendations parallel to human decisions)"},{period:"Month 10",desc:"Production cutover with human override capability"},{period:"Months 11-12",desc:"Performance tuning, model retraining with live data"}].map(t=>e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("span",{className:"text-data-teal font-bold text-sm w-28 shrink-0",children:t.period}),e.jsx("span",{className:"text-muted-foreground",children:t.desc})]},t.period))})]})})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-foreground",children:"Lessons Learned"}),e.jsx("div",{className:"space-y-6",children:["Shadow mode deployment is non-negotiable for ML systems that affect physical assets. Running ML recommendations alongside human decisions for 8 weeks built trust and caught edge cases the model mishandled.","SAP integration always takes longer than you think. Budget 40% more time for the middleware layer than the ML model itself.","The model that survives disruption is not the most accurate one. It is the one that knows when it does not know, drops its confidence score, and escalates to humans."].map((t,a)=>e.jsx("div",{className:"border-l-2 border-data-teal pl-6",children:e.jsxs("p",{className:"text-muted-foreground leading-relaxed italic",children:['"',t,'"']})},a))})]})})}),e.jsx("section",{className:"py-12 bg-surface/30",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-foreground",children:"Related Case Studies"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsx(a,{to:"/customers/healthcare-rails-resurrection",className:"group",children:e.jsx(c,{className:"clean-card hover:shadow-medium transition-all",children:e.jsxs(m,{className:"p-6",children:[e.jsx("h3",{className:"font-bold text-lg mb-2 group-hover:text-data-teal transition-colors",children:"Healthcare Platform Resurrection"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Rails 3 → 7, zero downtime"})]})})}),e.jsx(a,{to:"/customers/finops-fraud-detection",className:"group",children:e.jsx(c,{className:"clean-card hover:shadow-medium transition-all",children:e.jsxs(m,{className:"p-6",children:[e.jsx("h3",{className:"font-bold text-lg mb-2 group-hover:text-data-teal transition-colors",children:"FinOps Fraud Detection"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"$14.7M caught"})]})})}),e.jsx(a,{to:"/customers/cold-chain-guardian",className:"group",children:e.jsx(c,{className:"clean-card hover:shadow-medium transition-all",children:e.jsxs(m,{className:"p-6",children:[e.jsx("h3",{className:"font-bold text-lg mb-2 group-hover:text-data-teal transition-colors",children:"Cold Chain Guardian"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"$42M cargo saved"})]})})})]})]})})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-data-orange/5 via-data-teal/5 to-data-blue/5",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4 text-foreground",children:"Burning Money on Suboptimal Logistics?"}),e.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:"If your routing, scheduling, or resource allocation is driven by static rules or quarterly analyst updates, there is a quantifiable gap between what you are spending and what the math says you should be spending. We build ML systems that close that gap and stay in production for years."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[e.jsxs(s,{size:"lg",onClick:()=>j(!0),className:"bg-gradient-to-r from-data-orange to-data-teal hover:from-data-teal hover:to-data-blue",children:["Talk to an Architect",e.jsx(u,{className:"ml-2 h-5 w-5"})]}),e.jsxs(a,{to:"/services/data-analytics-platform",className:"text-data-teal hover:text-data-orange transition-colors font-medium inline-flex items-center",children:["View Data Analytics Platform Services",e.jsx(u,{className:"ml-2 h-4 w-4"})]})]})]})})})]});return e.jsxs(e.Fragment,{children:[e.jsxs(r,{children:[e.jsx("title",{children:"Predictive Freight Router: $18M Annual Fuel Savings with ML | Allerin Case Study"}),e.jsx("meta",{name:"description",content:"PyTorch GNN cut $18M in annual fuel costs across 450 vessels. ETA accuracy improved from ±5 days to ±12 hours. Still running 6 years later. Allerin."}),e.jsx("link",{rel:"canonical",href:"https://www.allerin.com/customers/predictive-freight-router"}),e.jsx("meta",{property:"og:type",content:"article"}),e.jsx("meta",{property:"og:title",content:"Predictive Freight Router: $18M Fuel Savings | Allerin"}),e.jsx("meta",{property:"og:description",content:"PyTorch GNN cut $18M in annual fuel costs across 450 vessels. ETA accuracy from ±5 days to ±12 hours."}),e.jsx("meta",{property:"og:url",content:"https://www.allerin.com/customers/predictive-freight-router"}),e.jsx("meta",{property:"og:image",content:"https://www.allerin.com/og/default.webp"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Predictive Freight Router: $18M Fuel Savings | Allerin"}),e.jsx("meta",{name:"twitter:description",content:"PyTorch GNN cut $18M in annual fuel costs across 450 vessels. ETA accuracy from ±5 days to ±12 hours."}),e.jsx("meta",{name:"twitter:image",content:"https://www.allerin.com/og/default.webp"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:"Predictive Freight Router: $18M Annual Fuel Savings with ML",description:"PyTorch GNN cut $18M in annual fuel costs across 450 vessels. ETA accuracy improved from ±5 days to ±12 hours. Still running 6 years later.",datePublished:"2026-03-17",author:{"@type":"Organization",name:"Allerin","@id":"https://www.allerin.com/#organization"},publisher:{"@type":"Organization",name:"Allerin","@id":"https://www.allerin.com/#organization"}})})]}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(n,{}),e.jsx("main",{children:e.jsx(x,{slug:"predictive-freight-router",ungatedContent:N,onRequestArchitect:()=>j(!0),children:y})}),e.jsx(i,{})]}),e.jsx(o,{open:g,onOpenChange:j,defaultIntent:"architect",context:{sourcePage:"/customers/predictive-freight-router",sourceButton:"case-study-cta",serviceContext:"data-analytics-platform"}})]})};export{g as default};