Skip to main content

Dispatch Engine

The DispatchEngine is the core bridge between Layer 3’s optimization output and Layer 4’s command execution. It reads schedule DataFrames and produces a queue of timed Command objects, then manages their lifecycle through dispatch, response handling, retries, and timeout detection.

Schedule-to-Command Conversion

The dispatch engine parses Layer 3 schedule DataFrame columns using naming conventions:

Change Detection

The engine only emits commands when power values change between consecutive time slots. This avoids flooding assets with redundant setpoints:

Command Lifecycle

Dispatching Commands

Handling Responses

Timeout Detection

Command Object

Command Types

Event Publishing

The dispatch engine publishes events at each lifecycle transition:

Lookup Methods