Integrated forecasting and optimization system for managing electrical load across oil and gas facilities. Uses Random Forest regression trained on temporal, weather, price, and lag features to predict short-term demand, then identifies capacity constraint violations and schedules demand response events. The optimization ranks site-hour curtailment opportunities by cost per MWh while respecting each facility's minimum participation incentives.
Use template ->Forecasting methodology
The system implements short- to mid-term load forecasting using a supervised learning approach with time-series features.
Model architecture uses Random Forest regression. Feature engineering incorporates temporal variables (hour, day, week), weather conditions (temperature, humidity, wind speed), electricity price signals, and lagged load values from previous periods. This combination captures both cyclical patterns in facility operations and exogenous factors that influence energy consumption. The ensemble approach helps handle non-linear relationships between weather extremes and cooling/heating loads.
Train-test split follows temporal ordering. The first 10 days of data train the model, with the final 4 days held out for validation. This temporal split avoids lookahead bias and better represents how the model would perform in production, where it must forecast future periods using only historical data. Cross-validation within the training period could further refine hyperparameters, though the document doesn't specify whether this was implemented.
System-level forecasts aggregate across facilities. Individual site forecasts sum to produce system-wide load predictions, which are then compared against total capacity limits. This aggregation approach allows the demand response optimization to consider where curtailment is most effective across the portfolio rather than treating each facility independently.
Demand response optimization
Once forecasts identify periods where predicted load exceeds capacity, the system schedules curtailment events through a constrained optimization process.
Capacity violations trigger DR event planning. Hours where forecasted system load surpasses available capacity become candidates for intervention. The system must reduce aggregate demand back below the constraint while minimizing total program costs and respecting operational limits at each facility.
Site-hour opportunities are ranked by program cost. Each facility has a cost per MWh curtailed—essentially the compensation required for that site to voluntarily reduce load. The optimization selects the lowest-cost curtailment options first, continuing until system load drops below capacity or all available DR resources are exhausted. This greedy approach works when curtailment decisions are independent across sites.
Minimum incentive thresholds constrain participation. Each facility specifies a minimum payment level required to accept curtailment during any given hour. This reflects operational considerations such as production schedules, safety requirements, or contractual obligations that make certain hours more expensive to curtail than others. The scheduler respects these floor prices, potentially leaving some capacity violations unresolved if all remaining DR options exceed program budgets.
The scheduled DR output shows temporal and spatial allocation. Results display which sites curtail load during which hours, allowing operators to verify that the schedule doesn't over-rely on specific facilities or create unintended clustering of events. This visualization helps identify whether DR resources are well-distributed or if certain sites bear disproportionate curtailment burden.
KPIs quantify program performance and environmental impact. Metrics track total curtailed energy, program costs, average incentive levels, and participation rates across the facility portfolio. The system also estimates avoided emissions based on grid carbon intensity during curtailment hours, assuming that reduced load corresponds to reduced generation from marginal fossil fuel plants.