Shipment Node Performance Metrics in Refinery Simulation

       Modern refinery simulation requires flexible control of shipment operations during model execution. Engineers often need to modify shipment behavior, evaluate alternative logistics strategies, integrate production planning systems, or respond to changing operating conditions. Shipment Node provides runtime configuration, shipment plan management, event-driven callbacks, and API methods for controlling shipment execution without modifying the simulation model. This article explains the available control capabilities, configuration parameters, events, and public API for Shipment Node in refinery simulation. Shipment Node provides a runtime control API for refinery logistics simulation.

Shipment Node Runtime Control

       Shipment Node combines automatic shipment execution with flexible runtime control. Engineers can configure shipment scheduling algorithms, manage shipment plans, limit shipment rates, and integrate the component with external applications through an event-driven API. These capabilities allow refinery digital twins to reproduce realistic petroleum logistics while preserving automatic shipment execution.

Initialization and Configuration

       Shipment Node behavior is configured through a small set of runtime parameters that define shipment planning, operating restrictions, statistics collection, and user interaction. Most parameters can also be updated through an external INI configuration file, allowing operational settings to be modified without rebuilding the simulation model.

Shipment Schedule Type
       The shipmentScheduleType parameter defines how shipment node executes shipment plans during simulation. The component supports daily scheduling and two monthly execution strategies, allowing engineers to select the most appropriate shipment behavior for refinery logistics. The selected scheduling algorithm affects only shipment execution and does not change the planning data itself. Detailed descriptions of the available scheduling modes are provided in Shipment Planning Algorithms.

Working Hour Restrictions
       The restrictShipmentToWorkHours parameter determines whether shipments are executed only during configured working hours. When enabled, Shipment Node automatically suspends shipment operations outside working hours and on weekends and configured exception days. When disabled, shipments are executed continuously without calendar-based restrictions.
Detailed configuration of working hours and shipment calendars is described in Working Calendars in Refinery Shipment Simulation.

Over-Planning
       The allowOverPlanning parameter determines whether shipment may continue after the planned shipment volume has been completed. When enabled, the outlet valve remains open, allowing product transfer beyond the planned amount. When disabled, Shipment Node automatically closes the outlet valve once the shipment plan is fulfilled. This option is commonly used to reproduce operating scenarios where shipment is driven by process conditions rather than strict production targets.

Statistics Collection
       The enableStatisticsSaving parameter enables automatic storage of monthly shipment statistics in the internal database. The collected data can be used to analyze shipment plan execution, generate operational reports, and evaluate refinery logistics performance. Detailed information about the available performance metrics is provided in Shipment Node Performance Metrics.

User-Defined Shipment Plans
       The useUserDefinedPumpingPlan parameter determines the source of the shipment plan. When disabled, Shipment Node automatically loads shipment plans from the database. When enabled, the shipment plan is supplied programmatically during simulation through the public API, allowing external applications to modify shipment volumes dynamically without changing the simulation model.

Shipment Plan Management
       Shipment Node supports both database-driven and user-defined shipment plans. Depending on the selected operating mode, shipment plans can be loaded automatically from the internal database or assigned programmatically during simulation. This flexibility allows engineers to integrate Shipment Node with production scheduling systems, optimization algorithms, and operator decision support applications.

User-Defined Pumping Plan
       When useUserDefinedPumpingPlan is enabled, the shipment plan is provided programmatically instead of being loaded from the database. The current plan value is stored in the userDefinedPumpingPlan parameter and can be updated during simulation through the public API.
setUserDefinedPumpingPlan(double pumpingPlan);
getUserDefinedPumpingPlan();
       The update behavior depends on the selected ShipmentScheduleType. For MONTHLY_FAST, the new plan is applied immediately. For DAYS and MONTHLY_EVENLY, the updated value becomes effective at the beginning of the next planning period. This mechanism allows external production planning and optimization systems to adjust shipment targets without interrupting the simulation.

Shipment Rate Control
       Shipment Node allows engineers to dynamically limit the maximum shipment rate without modifying the simulation model. Runtime flow control is useful for reproducing pump capacity limits, pipeline restrictions, maintenance activities, and other operational constraints.
setSpeedLimit(double speedLimit);
resetSpeedLimit();
Shipment Execution Control
       Shipment Node provides utility methods for monitoring and controlling shipment execution during simulation. These methods allow external applications to determine whether shipment is currently active, verify operating conditions, and synchronize refinery logistics with custom business logic.
isValveOpen();
shouldOpenValve();
switchFlowDirection(boolean isOpen);
       isValveOpen() returns the current state of the shipment valve. shouldOpenValve() evaluates whether shipment is allowed based on the current operating conditions, including working hours and remaining planned volume. switchFlowDirection() controls the flow direction of connected direct-flow accumulative tank farms, allowing upstream equipment to react automatically to shipment start and stop events.
Event-Driven Control
       Shipment Node automatically generates runtime events that allow external applications to monitor shipment execution and synchronize business logic with the simulation. These callbacks can be used for production planning, reporting, optimization, and integration with MES, ERP, or refinery digital twin applications.
onAfterInitialize();
onNewShipmentPlan(double totalPlan, double periodPlan);
onShipmentPlanCompleted(double completedPlan);
onValveStateChange(boolean isOpen);
       onAfterInitialize() is triggered after component initialization. onNewShipmentPlan() reports every new shipment plan together with the total and current period target. onShipmentPlanCompleted() is invoked when the planned shipment volume has been fully executed, while onValveStateChange() notifies external applications whenever the shipment valve opens or closes. These callbacks provide a simple event-driven interface for extending Shipment Node behavior without modifying its internal control algorithm.

Working Calendar Utilities
       Shipment Node provides utility methods for checking whether shipment operations are permitted at a specific time. These methods are useful for custom scheduling logic, external integrations, and validation of operating conditions.
isInWorkingHours(Date date);
isScheduleExceptionDate(Date date);
       isInWorkingHours() determines whether shipment is allowed at the specified date and time by considering working hours, weekends, and configured exception days. isScheduleExceptionDate() checks whether a date is defined as a non-working shipment exception in the operating calendar.

Conclusion

       Shipment Node provides a flexible runtime control framework for refinery shipment simulation. Its configurable parameters, public API, and event-driven architecture allow engineers to adapt shipment behavior, integrate external planning systems, and reproduce realistic petroleum logistics without modifying the simulation model. These capabilities make Shipment Node suitable for production planning, refinery digital twins, logistics simulation, and operational decision support.

FAQ

1. Can Shipment Node load shipment plans from a database?
Yes. By default, shipment plans are loaded automatically from the internal database.

2. Can shipment plans be changed during simulation?
Yes. When user-defined mode is enabled, shipment plans can be updated programmatically through the public API.

3. Can shipment speed be limited at runtime?
Yes. Shipment Node allows the maximum shipment rate to be changed or restored dynamically without interrupting the simulation.

4. Does Shipment Node support working calendars?
Yes. Shipments can be restricted by working hours, weekends, and configured exception days.

5. Can external applications receive shipment events?
Yes. Shipment Node generates callbacks for initialization, new shipment plans, plan completion, and valve state changes.

6. Does Shipment Node automatically collect execution statistics?
Yes. Monthly shipment statistics can be stored automatically in the internal database when statistics collection is enabled.

7. Can Shipment Node be integrated with refinery digital twins?
Yes. Its runtime API and event-driven callbacks simplify integration with production planning, optimization, reporting, MES, ERP, and digital twin applications.