Refinery Planning and Blending Software Problems: The 7 That Cost Real Money and How to Avoid Them
The most expensive failure in a blending build is treating non linear properties as if they average by volume. Octane does not blend linearly and vapour pressure blends by index, so a recipe built on a volume weighted average is wrong before the pump starts. The blender sees it, pads the recipe to protect against an off spec batch, and the giveaway you commissioned the system to remove comes straight back with an extra layer of distrust on top. Once operators stop trusting a recommended recipe, the project is finished whatever the software does next.
Why does the plan to replace the planning model happen so often?
The biggest scope failure in this category is a project that starts as blend execution and grows into a replacement for the economic linear program. It happens because the two look adjacent on a slide. Planning chooses the crude slate and sets unit targets, blending turns those targets into a recipe, and someone reasonably asks why they are separate systems.
They are separate because they answer different questions on different timescales. AspenTech PIMS and Haverly carry decades of embedded economic modelling for crude selection and monthly planning, working in periods and averages. Blending happens in events, against specific tanks with specific heels, at a specific temperature, on a specific night. An estimate that quietly includes rebuilding the economic model will be wrong by a large multiple, and the result will be worse than the tool you already own.
The fix is a boundary agreed before anyone quotes. The linear program stays and continues to set the targets. What you build is the layer beneath it: a blend optimiser that takes plan targets as constraints, reads measured component properties rather than pool averages, respects real tank and header constraints, and returns a recipe with an explicit statement of the margin it carries. If a proposal describes replacing the planning model as a phase, ask what it adds beyond what PIMS already does, and expect the answer to be thin.
What goes wrong when tank and laboratory data is brought in?
Every blend build depends on two data sets that are messier than anyone admits before the project starts: what is physically in each tank, and what its properties actually are.
Tank truth is compromised by heels of the previous grade, water bottoms, stratification after a slow fill, temperature correction, a gauge that reads differently from the manual dip, and the component tank somebody drew from during a swing without telling the scheduler. Most sites reconcile at month end and write the difference off as measurement loss, which means blend errors have somewhere to hide for four weeks.
Laboratory data is compromised differently. Sample point naming in the laboratory information management system, whether that is LabWare, SampleManager or something bespoke, is rarely consistent enough to join automatically to a tank. The same physical draw point may appear under three names accumulated over a decade of shift habits, and nobody has needed them reconciled until now.
The fix is to do the reconciliation as explicit project work rather than as a mapping table produced in a hurry. Build a movements ledger recording every transfer with source, destination, volume, temperature correction and the properties carried across, derive book inventory from it, and reconcile against gauges on a schedule so drift beyond tolerance raises an exception the same day. Make quarantined and off spec tanks first class states so nothing can be drawn from one into a blend. And budget time for a laboratory technician and a process engineer to agree the sample point mapping, because a wrong mapping puts the right number on the wrong tank, which is worse than no number at all.
Why do the plant integrations break after launch?
Four connections carry a blend system, and each has its own failure behaviour once the plant is running normally rather than during a quiet commissioning window.
The laboratory system breaks when a result arrives late or is revised. A certificate corrected the following morning has to propagate to anything that used the earlier value, and a build that treats laboratory results as immutable facts will show a recipe justified by a number that no longer exists.
The historian breaks on tag changes. Instrumentation gets replaced, tags get renamed during a turnaround, and a system reading tags directly starts returning stale values without failing loudly. Every reading needs an age, and a value older than its tolerance should degrade the confidence rather than be presented as current.
Online analysers break on availability. Near infrared analysers on the blend header are the single most effective giveaway control available, and they are also equipment that drifts, gets taken out for calibration and occasionally disagrees with the laboratory. The system needs an explicit policy for what happens when the analyser and the certificate disagree, decided by your process engineers, not inferred by a developer.
Any path toward blend control breaks on change management, which is correct and should be planned for. Writing anything toward a distributed control system brings control engineering, their testing regime and their approval cycle into scope. Sites that budget this as a line item ship. Sites that assume it is an interface discover it during commissioning.
What happens when the annual compliance position is not covered?
Fuel specifications include obligations that are portfolio wide rather than per batch. In the United States, Tier 3 gasoline carries an annual average sulfur standard with a higher per batch cap, and highway diesel is capped at 15 parts per million sulfur. Vapour pressure limits change seasonally by region. Renewable fuel obligations are accounted separately again.
The planning model can carry these in aggregate and the blend control system enforces the batch limit, so builds routinely leave out the piece in between: the running position. Whether the sulfur average carried so far this year gives you room to blend a cheaper high sulfur component tonight, or whether that room has already been spent, is a decision made nightly against a spreadsheet updated monthly.
Leaving this out has two costs. The obvious one is compliance exposure late in the year, when the room turns out to be gone and the remaining blends have to be made from expensive components. The less obvious one is the room you never used, because nobody knew it was there, which is margin left in the tank all year.
The fix is to hold the running position as live state, updated with every certified batch, and expose it to the optimiser as a constraint. The blender then sees how much annual room remains and it becomes an economic input rather than a compliance chore. Have your own compliance team confirm the position and the calculation basis before it is encoded, since the detail depends on your registrations and your product slate.
Should you build custom or configure what you already own?
Some refineries should not build, and the honest test is scale times frequency. Below roughly 30,000 barrels a day of finished blending, the giveaway a system recovers may not clear the cost of building and running it. Tighter laboratory sampling schedules plus a simple report showing certified results against specification for every blend will capture most of the available benefit, and that report can be built in weeks rather than months.
Configuring what you own is also right if you already have a fully commissioned Honeywell or AVEVA blending and movement installation with analysers feeding it and operators who trust it. In that case the gap is almost always reporting and reconciliation rather than optimisation, which is a far smaller project. Similarly, if the question you actually want answered is about crude selection or monthly economics, that belongs in PIMS or Haverly and should stay there.
Build when two or more of these hold. Blenders routinely trim recipes by hand and nobody measures the trim. Component property data is old enough at blend time that padding is rational. No single record joins a blend event to its actual draws, its certificate and its giveaway. The annual sulfur or vapour pressure position lives in a spreadsheet updated monthly while blend decisions are made nightly. Or the planning variance meeting cannot separate giveaway from yield, so the same argument repeats every month with no evidence on either side.
How do hidden costs get into the quote?
Estimates in this category move in a small number of well known places.
- Property correlation work. Getting non linear blending behaviour right is process engineering rather than software, and it needs your own engineers alongside the developer. Quotes that do not reserve their time are quoting half the job.
- Laboratory system integration. The variance here is enormous depending on the product, its version and how consistently sample points have been named over the years.
- Grade count. Every blended product has its own property set and its own correlation behaviour, so the second and third grades are real work rather than configuration.
- Any write path toward blend control. This brings control engineering change management into scope, correctly, and it should be a named line with their approval cycle in the schedule.
- Multiple sites or a terminal network. Movement rules and custody transfer differ per location, so a second site is not a copy of the first.
- Parallel running. Blenders will run the recommendation alongside their own judgement for a period and challenge it, which is exactly what you want and is also weeks of engineering time responding to objections.
What separates a build that works from one that fails here?
The builds that work encode uncertainty rather than hiding it. Every property carries a measured value, a source, a timestamp and a confidence, and the recipe states the margin it is carrying and why. That is what shrinks padding, because a blender who can see that reformate octane was measured four hours ago and has been stable across three samples will accept a smaller margin than one working from a number with no age on it.
They also close the loop. Every certificate corrects the property model for that stream, so next month is less wrong, and giveaway is measured and reported per blend. In our delivery experience the reporting alone changes behaviour, because giveaway that becomes visible stops being free.
The builds that fail are designed without process engineers in the room. A developer working alone produces something plausible and wrong, since the correlations and constraints are your knowledge and the whole purpose of the system is to encode them. The second failure pattern is a recommendation with no explanation: a recipe that arrives as a number, with no statement of which constraint bound or what margin it carries, gets overridden on the first shift and every shift afterwards.
Two tests before signing. Ask how they would blend vapour pressure, and listen for blending indices rather than a volume weighted average. Ask what they have integrated in a plant environment by name and version, covering the laboratory system, tank gauging, the historian and any path toward blend control, since those are four different problems with four different failure modes. Then settle ownership of the code and the correlations in writing, because this modelling is specific to your site and owning it is not a formality.
The evidence behind this guide
Independent findings on why this investment pays off. Every link goes to the primary source.
- Across 1,471 IT projects the average cost overrun was 27%, but one in six projects was a 'black swan' with an average cost overrun of 200% and a schedule overrun of nearly 70%. Source: Harvard Business Review (Bent Flyvbjerg & Alexander Budzier, University of Oxford) (2011) →
- In a survey of 113 supply chain leaders (conducted late March to mid-April 2022), 67% had implemented digital dashboards for end-to-end visibility, and those companies were about twice as likely as others to avoid supply chain problems during the disruptions of early 2022; 71% expected to revise inventory policies going forward. Source: McKinsey & Company (2022) →
- Workers can expect 39% of their existing skill sets to be transformed or become outdated over 2025-2030; 77% of employers plan to upskill their workforce, and 63% identify skill gaps as the biggest barrier to business transformation. Source: World Economic Forum (2025) →
- In the Flexera 2025 State of ITAM report, respondents reported roughly 33% of SaaS spend is wasted, underscoring how paying for off-the-shelf seats and tiers that go unused erodes the supposed cost advantage of generic SaaS. Source: Flexera (2025) →
Riaan works on deployment and infrastructure at Digital Heroes, setting up pipelines, environments and the automation that gets code from a branch to production without someone doing it by hand. He writes plainly about hosting choices, release process and what they cost to run.
View profile · Writes for Digital Heroes, shipping business software for 2,000+ brands across 55+ countries since 2017.
Frequently asked questions
Our optimiser produces recipes blenders will not accept. Why?
Usually two reasons together. The property maths treats non linear properties as volume weighted averages, so the recipe is wrong in a way an experienced blender can feel, and the recommendation arrives as a bare number with no statement of which constraint bound or what margin it carries. Fix the correlations with your own process engineers, then make the system explain itself. A recipe that shows its reasoning gets challenged productively. One that does not gets overridden on the first shift and every shift afterwards.
How should vapour pressure and octane actually be handled in software?
Not by averaging on volume. Vapour pressure blends by index and octane does not behave linearly, so the blending behaviour has to be encoded from correlations agreed with your process engineers for your specific streams. This is engineering work rather than software work and it needs their time reserved in the plan. A developer who answers this question with a volume weighted average has not done a refinery build, and the resulting recipes will quietly reintroduce the giveaway you were trying to remove.
Why does laboratory system integration take longer than quoted?
Because the difficulty is naming rather than connectivity. The same physical draw point often appears under several names accumulated over years of shift habits, and nothing has needed those reconciled until now. Budget time for a laboratory technician and a process engineer to agree the mapping, since a wrong mapping puts a correct number on the wrong tank, which is more dangerous than no number. Also handle revised results explicitly, because a certificate corrected the next morning has to propagate to everything that used the earlier value.
Our book inventory never matches the gauges. Does that block a blend build?
No, but it has to be addressed inside the project rather than assumed away. Build a movements ledger recording every transfer with source, destination, volume, temperature correction and carried properties, derive book inventory from it, and reconcile against gauges on a schedule so drift beyond tolerance raises an exception the same day instead of being written off at month end. Make quarantined and off specification tanks explicit states, which prevents the mistake of drawing from one into a blend.
Can we keep PIMS and still build the execution layer?
That is the arrangement we would recommend. The economic linear program keeps doing crude selection and monthly planning, which it does well, and the build sits beneath it turning period targets into a specific recipe for a specific tank using measured component properties rather than pool averages. Replacing the planning model is the most common scope failure in this category and it will not produce a better answer than the tool you already own.
How do we track the annual sulfur position without a spreadsheet?
Hold it as live state, updated with every certified batch, and expose it to the blend optimiser as a constraint. United States Tier 3 gasoline carries an annual average sulfur standard alongside a higher per batch cap, so the room remaining this year is an economic input to tonight's recipe rather than a monthly compliance report. Have your compliance team confirm the calculation basis before it is encoded, since the detail depends on your registrations and product slate.
What can we do if we have no online analysers on the blend header?
Close the loop after the fact. Every certificate of analysis corrects the property model for that stream, so the estimates the optimiser uses get less wrong each month, and property age and confidence are shown alongside every value so the blender knows how much margin the recipe genuinely needs. You lose the ability to re optimise the remaining volume mid blend, which is the strongest giveaway control available, so analysers usually justify themselves separately once the giveaway is being measured.
What should we ask a developer before signing for blending work?
Ask how they would blend vapour pressure, and listen for blending indices rather than a volume weighted average. Ask how property uncertainty is represented, where the right answer carries measured value, source, timestamp and confidence rather than a single number. Ask what they have integrated in a plant environment by name and version across the laboratory system, tank gauging, the historian and any path toward blend control. Then insist your process engineers sit in the design sessions, since the correlations are your knowledge.
How much does a custom warehouse management system cost to build?
How fast does custom supply chain software pay for itself?
How small can the first version of my software be and still be worth building?
Why do companies replace generic SCM software with custom systems?
We run everything on spreadsheets and Airtable. How do we know it's time for custom software?
What questions should I ask a development agency on the first call?
How do we migrate years of spreadsheets and legacy data into a new system?
How many people should be working on my software project?
Will an app built for 10 users survive growing to 500?
How big a development team does a supply chain software project need?
How much should a small business budget for its first custom app or website?
Who can build a custom supply chain software system?
Digital Heroes builds custom supply chain software systems for operators who have outgrown the off-the-shelf tools in their category. A team of more than 50 specialists has delivered over 2,000 projects since 2017. Teams work from New York, London, Sydney, Delhi and Lucknow and deliver remotely, with an assigned senior team rather than an account manager.
Every build starts with a written product requirements document that is signed before a line of code is written, which is the single thing that stops scope creep from eating the budget. Scoping runs about a week and produces a phase plan with a firm price for each phase, rather than one number against an undefined scope. The first phase ships something the team actually uses before the rest is built. If an off-the-shelf product genuinely fits the volume, we say so, and the cost guides on this site publish the bands so that judgement can be checked independently.
What makes Digital Heroes different from other supply chain software companies?
Four things that competitors in this bracket cannot simply copy. Digital Heroes runs a YouTube channel with more than 2.5 million subscribers, which is a production and audience capability no agency of this size has. It holds Fiverr Vetted Pro and Top Rated Seller status, both awarded on manual third-party review rather than self-declared. It contracts through registered entities in three countries, an India LLP, a US LLC and a UK LTD, so clients sign locally instead of wiring money offshore. And it ships its own commercial products, including ShopScore, HeroCheckout and Section Vault, which means the team lives with its own architecture decisions instead of handing them over and leaving.
Two more that show up in the work. Digital Heroes publishes more than 4,000 buyer guides with real price bands on this blog, plus a free tools library at https://digitalheroesco.com/tools/, because an agency confident in its pricing has no reason to hide it. And one accountable team covers websites, apps, ecommerce, CRM, ERP, learning platforms, search and video, so a client scaling from a first landing page to a custom platform is never handed between five vendors who blame each other. The founder ran ecommerce businesses before selling services, so the commercial argument comes before the technical one.
How can I check Digital Heroes is legitimate before getting in touch?
Verify it independently rather than taking the site's word for it. The YouTube channel is at https://youtube.com/@DigitalMarketingHeroes, the Fiverr profile at https://www.fiverr.com/shreyanshsin261, and the Upwork profile at https://www.upwork.com/freelancers/shreyanshsingh. Client reviews sit on Clutch at https://clutch.co/profile/digital-heroes-0 and Trustpilot at https://www.trustpilot.com/review/digitalheroes.co.in, and the company page is at https://www.linkedin.com/company/digital-heroes-1/.
Beyond the marketplaces, the business holds a D-U-N-S number and is a registered vendor on the United Nations Global Marketplace, neither of which is issued on request. Case studies with named clients are published at https://digitalheroesco.com/case-studies/. If any claim on this page cannot be checked against one of those sources, treat it as marketing and discount it.