Accumulative Tank Farm Planning Algorithm in Refinery Simulation: Priority-Based Execution Model (A–B–C–D)

The Role of Accumulative Tank Farms in Planning Logic

       In modern refinery and oil & gas logistics systems, accumulative tank farms are no longer treated as passive storage infrastructure. Instead, they function as intermediate coordination nodes between production processes and downstream distribution activities. Their primary role is to ensure that product flows are not only stored, but also structurally aligned with planning requirements across multiple time horizons.

Accumulative Tank Farms as a Node Between Production and Dispatch

       An accumulative tank farm operates as a synchronization interface between upstream Plant production and downstream shipment systems. Production units typically generate continuous or semi-continuous product flows, while shipment operations are governed by discrete schedules, contractual obligations, and transport constraints.
       Without an intermediate coordination layer, these two temporal regimes—continuous production and discrete logistics—cannot be efficiently aligned. The tank farm resolves this mismatch by acting as a buffering and structuring element, where incoming flows are accumulated, reorganized, and released according to planned shipment profiles.
       In this sense, the tank farm is not simply a storage location, but a temporal mediator between production dynamics and logistics execution.

Why a Simple “Storage Tank” Model Is Not Sufficient

       A conventional “storage tank” abstraction assumes that residuals behaves as a passive volume container with uniform accessibility and unrestricted inflow/outflow behavior. While this simplification is sufficient for basic mass balance calculations, it becomes inadequate in planning-driven environments.
       In real operational systems, accumulative tank farms must account for several additional constraints:
       Planning horizons: residuals is linked to current and future shipment schedules, not just instantaneous demand
       State-dependent usability: stored product may not be immediately available for dispatch due to quality verification or operational constraints
       Multi-objective allocation: available capacity must be distributed between current fulfillment, future preparation, and operational reserves
       Temporal coupling: product inflows and outflows are driven by structured schedules.
       As a result, a simple storage model fails to capture the essential behavior of accumulative systems: they are planning-aware dynamic allocation structures, not passive buffers. To correctly represent their role, a more advanced modeling approach is required—one that incorporates planning logic directly into the operational behavior of the storage system.

Conflict Between Planning Logic and Physical Storage Constraints

       In accumulative logistics systems, the core modeling difficulty arises from a fundamental mismatch between planning representations and physical storage behavior. Three primary layers of inconsistency typically emerge:
       Calendar-based shipment plans define expected outbound volumes over discrete time intervals (e.g., monthly or daily schedules). These plans assume ideal execution conditions and stable availability of residuals.
       Actual residual inventory levels (residuals) evolve dynamically and depend on production variability, prior dispatch execution, losses, and intermediate handling constraints.
       Tank farm constraints impose hard physical limitations, including total capacity, minimum operational volumes, segregation rules, and structural limitations of how product is distributed across multiple tanks.
       Because these three representations evolve on different principles, direct alignment between plan and execution becomes non-trivial.

The “Unavailable Volume” Problem (Available ≠ Usable)

       A key modeling distortion arises from the difference between nominal storage availability and operational usability. Not all physically stored volume can be considered available for dispatch. Constraints such as:
        - minimum fill levels required for operational readiness,
        - tanks under quality verification or passportization,
        - or structural segregation of product batches,
create a gap between available volume (physical capacity perspective) and usable volume (planning and dispatch perspective). This divergence is especially critical in systems with strict shipment schedules, where timing and batch integrity are as important as total quantity.

Need for Priority-Based Flow Management

       Due to the inconsistencies between planning, residuals, and physical constraints, a purely reactive is insufficient. Instead, accumulative systems require a priority-driven flow control mechanism that continuously arbitrates between competing objectives, such as:
        - fulfilling current shipment obligations,
        - preparing for future planning periods,
        - maintaining minimum operational tank conditions,
and allocating remaining capacity to strategic product reserves.
This introduces the need for a structured decision hierarchy in which material flows are not simply balanced, but actively orchestrated according to planning priorities and system state constraints.

Priority-Based Control Principle (A–B–C–D)

       Accumulative tank farm operation in planning-driven environments is governed by a structured priority hierarchy, which defines how limited storage capacity and material flows are allocated across competing operational objectives. This hierarchy serves as the primary mechanism for resolving resource contention and aligning physical behavior with planning requirements. Instead of treating all incoming demands equally, they organizes into a structured sequence of request classes. Each class corresponds to a different planning objective and operational horizon. This hierarchy transforms the tank farm from a passive storage unit into an active decision layer, where allocation is continuously guided by ordered priorities rather than reactive flow balancing.

       The request hierarchy typically follows a four-level structure:
       Priority A — Current period fulfillment. Ensures execution of the active shipment plan for the current planning window. This level dominates all system behavior and directly enforces contractual or operational obligations.
       Priority B — Next period preparation. Allocates remaining capacity to pre-accumulation for upcoming shipment cycles, ensuring continuity between planning horizons.
       Priority C — Operational readiness and minimum volume enforcement. Ensures that tanks reach minimum usable volumes required for operational validation, certification, or functional readiness constraints.
       Priority D — Strategic or user-defined reserves. Utilizes remaining capacity for optional accumulation targets defined by operational strategy.

Deterministic processing order

       A defining property of this mechanism is its strictly deterministic execution order. Requests are not evaluated simultaneously or competitively within a single optimization loop. Instead, processing follows a sequential cascade:
  1. Priority A is fully satisfied first
  2. Only remaining capacity is passed to Priority B
  3. Priority C is processed based on residual availability
  4. Priority D is applied last using leftover capacity
       Because storage capacity is inherently limited, multiple request classes may compete for the same physical resources. This creates a capacity arbitration problem, where allocation decisions must be made under strict scarcity conditions. In this framework, conflicts are not resolved through cost-based optimization or utility maximization. Instead, they are resolved through hierarchical dominance rules, where higher-priority requests fully override lower-priority ones. Higher priority levels always preempt lower priority levels when resource constraints are binding. As a result, the system avoids ambiguity in allocation decisions and ensures that critical operational objectives (such as current shipment fulfillment) are never compromised by secondary or strategic accumulation goals.

Priority A — Current Month Plan Fulfillment

       Priority A is responsible for ensuring execution of the active monthly shipment plan. It represents the execution-critical layer of the system and has the highest allocation precedence. At this level, the tank farm performs residual-aware distribution, accounting for existing residuals when determining whether planned shipment volumes can be satisfied. The primary objective is to close any gap between planned outbound volumes and available tank farm residuals.

       Key functions include:
        - verification of coverage for current shipment obligations
        - adjustment of incoming mass requirements based on shipment demand constraints and available residual inventory levels
        - compensation of shortages or surplus volumes within the current plan window
        - coordination of distribution across available tanks to ensure feasible dispatch configuration
       This level directly shapes how additional mass flow is distributed between reservoirs, prioritizing configurations that guarantee fulfillment of committed shipment schedules under physical and operational constraints.

Priority B — Next Month Preparation

       Priority B focuses on predictive accumulation to support the subsequent planning period. Unlike Priority A, which is execution-driven, this level is anticipation-driven and aims to ensure continuity of supply in future shipment cycles.

       Key functions include:
        - formation of buffer inventory for the next month
        - proactive accumulation based on forecasted shipment plans
        - reduction of future deficit risk under uncertain production or demand conditions
        - use of planned schedules to guide forward-looking stock buildup
       The main distinction from Priority A is temporal orientation: Priority A ensures current execution, while Priority B ensures future readiness based on future plans demand.

Priority C — Minimum Operational Level Completion

       Priority C ensures that tanks reach the minimum technically and operationally valid tank fill levels required for certification (passportization) and subsequent dispatch. This level addresses a practical modeling issue where, after execution of Priority A or B, the final active tank may contain a marginal or physically unrealistic volume.
       For example, a tank with a minimum operational threshold of 10 tons and a maximum of 100 tons may be only 11 tons. Although numerically feasible, such a state is operationally non-viable, as the tank cannot realistically enter passportization or be used for dispatch at this marginal fill level.
       To resolve this, Priority C performs controlled top-up of partially filled tank to the minimum reasonable threshold at which: passportization becomes valid, product is considered dispatchable, and the tank is operationally stabilized. Priority C is applied only to the last active tank currently connected for loading, ensuring controlled completion of its minimum operational fill level.

       Key functions include:
        - ensuring compliance with minimum fill constraints
        - eliminating non-dispatchable low-volume residuals
        - completing partially filled last active tank.

Priority D — User-Defined and Strategic Reserves

       Priority D represents additional user-defined or strategic accumulation targets. It is used to allocate remaining capacity for optional objectives such as safety stock, scenario-based buffers, or custom fill requirements defined by the planner. This level is conditionally activated and operates only after all higher-priority requirements have been satisfied.

System behavior under constraints

       When operational constraints occur, the system follows a strict temporal and procedural handling logic.
       If no free tank is available, the request is held in a pending state until the end of the current planning period. At the start of the next month, planning data and residual requirements are recalculated, and unresolved requests are re-evaluated within Priority A logic. Unfulfilled portions from the previous period are not carried over directly as active obligations. In case of shipment blocking, execution remains paused until the constraint is resolved. At the beginning of each planning cycle, shipment plans and residual targets are refreshed, and previous uncompleted residuals are discarded rather than propagated into the new period.

Practical Applications

       The described accumulative tank farm logic is widely applicable in oil & gas and refinery simulation environments where planning and physical constraints must be tightly coupled.

       It is used in:
       - oil refining systems for coordinating intermediate and final product flows
        - refinery product tank farms managing scheduled storage and dispatch operations
        - gas and condensate storage systems handling phase-dependent accumulation and shipment constraints
        - terminals and logistics hubs supporting multimodal transport and shipment scheduling
        - integration with production planning systems, where inventory dynamics are aligned with demand forecasts and execution schedules
       In all cases, the same core requirement applies: aligning continuous production with discrete, plan-driven distribution under physical storage constraints.

PRL implementation

       PRL provides a unified modeling framework for linking production planning with physical storage and shipment execution in accumulative systems.
       It separates planning logic from physical flow processing by transforming shipment plans into structured requests handled by accumulative tank farm components. A built-in four-level priority system (A–D) ensures deterministic execution of competing demands across different planning horizons, including current plan fulfillment, future pre-accumulation, operational minimums, and optional reserves. The model is accounting for residual levels, tank constraints, and usability conditions, which prevents fragmentation and non-dispatchable states.
       Shipment nodes act as the interface between external planning systems and internal execution logic, ensuring consistent alignment between production output, storage allocation, and dispatch operations.

Conclusion

       The priority-based model is essential for correctly aligning planning logic with physical storage constraints in accumulative systems. It provides a structured mechanism for resolving competing demands across different planning horizons and operational requirements.
       Compared to static storage modeling, this approach enables explicit handling of inventory fragmentation, usability constraints, and multi-level shipment planning, which cannot be represented in traditional buffer-based models.
       As a result, the system behaves not as a passive storage representation, but as a constrained scheduling engine that continuously allocates limited resources according to deterministic priority rules.
       In this context, the accumulative tank farm functions as a planning execution component that translates structured demand into physically feasible material distribution under real operational constraints.

FAQ

1 What is the main purpose of an accumulative tank farm in planning systems?
It acts as an intermediate layer between production and shipment, aligning continuous inflows with discrete, schedule-driven dispatch requirements.

2 Why is a simple storage tank model insufficient?
Because it cannot represent planning constraints, residuals fragmentation, usability restrictions, or multi-period shipment dependencies.

3 What defines Priority A?
It ensures execution of the current monthly shipment plan, adjusting allocation based on available residuals and correcting deficits or surpluses.

4 How does Priority B differ from Priority A?
Priority B is anticipatory: it prepares residuals for the next planning period, while Priority A focuses strictly on current execution.

5 What is the role of Priority C?
It ensures tanks reach minimum operational volumes required for passportization and prevents non-dispatchable low-volume states.

6 What is Priority D used for?
It allocates remaining capacity to optional user-defined or strategic reserves such as safety stock or scenario-based buffers.

7 How does the system handle capacity conflicts?
Conflicts are resolved deterministically through a strict priority hierarchy where higher levels always override lower ones.

8 What happens when no storage capacity is available?
Requests are held until the next planning cycle and re-evaluated under updated Priority A conditions.

9 Does the system use optimization algorithms for allocation?
No, allocation is rule-based and deterministic, following ordered priority execution rather than cost optimization.

10 Can unfulfilled requests carry over to the next period?
No, they are re-evaluated in the next planning cycle rather than being directly propagated as persistent obligations.

Last updated on 25.06.2026