Source in Refinery Simulation: Complete Guide to Feedstock Planning, Flow Control, and Statistics
The Petroleum Refining Library Source component in refinery simulation represents the upstream supply. of crude oil, natural gas, unstable gas condensate, and other hydrocarbon feedstocks entering a refinery or processing facility. In the Petroleum Refining Library (PRL) for AnyLogic, Source connects feedstock supply plans with continuous material flows throughout the refinery model. Unlike a generic flow generator, the Petroleum Refining Library Source component is designed specifically for refinery feedstock planning and refinery feedstock simulation. It supports daily and monthly production plans, database-driven planning, multiple feedstock sources, continuous flow generation, and flow smoothing between planning periods. In a typical refinery logistics simulation, the feedstock flow can be represented on figure.
Plan → Flow → Control → Statistics
The following sections explain Source configuration, production planning, flow smoothing, runtime control, statistics, and integration with refinery logistics and Digital Twin models.Production plan → Source → Target flow
Plan execution can then be evaluated by comparing actual Source output with the configured plan. Source Statistics provides plan values, completion ratios, and completion statuses for both daily and monthly planning. For monthly plans, Source can additionally apply flow smoothing at the boundaries between planning periods. This prevents artificial flow discontinuities while maintaining the planned delivery volumes. This makes Source suitable for modeling feedstock supply where production planning, production scheduling, and continuous refinery operation must remain synchronized.Monthly plan A → Transition → Monthly plan B
This is particularly useful in refinery Digital Twin models, where feedstock flows should represent realistic operating behavior.rather than instantaneous changes caused only by a change in planning data. Flow smoothing is therefore an important part of the Source workflow when monthly production planning is used and continuous feedstock behavior is required.See details: Source Control in Refinery Simulation: Runtime Flow Management
Source flow change → onSpeedChange() → downstream control logic
Such event-driven integration is useful when changes in feedstock supply must immediately affect pipelines, tank farms, production logic, or other refinery simulation components.Feedstock Sources → Source → Pipelines → Tank Farms → Refinery Units
Within a Digital Twin, this structure allows changes in feedstock supply to be reflected in the simulated refinery system and evaluated together with transportation, storage, and processing constraints.Plan → Generate Flow → Smooth → Connect → Control → Monitor → Analyze
This makes Source a core component for refinery feedstock simulation, crude oil supply chain simulation, refinery production planning, logistics modeling, and AnyLogic-based Digital Twin applications.