COGEniX: an industrial informatics framework for cognitive energy forecasting and carbon-aware scheduling in smart zones Authors: Alanoud Al Mazroa Published: 2025 ABSTRACT AbstractIndustrial energy management faces escalating challenges from rising electricity costs, volatile carbon intensity and the operational complexity of integrating renewables and storage. Traditional approaches, ranging from heuristic rules to black-box machine learning models, struggle to balance adaptability, transparency and deployability. Heuristic rules fail to adjust to dynamic operating conditions, while opaque models undermine operator trust, and deployment friction often prevents reliable execution on edge hardware. As a result, factories continue to suffer from inefficiency, idle consumption and missed opportunities for cost-effective decarbonization. This study introduces COGEniX (Cognitive Energy Informatics and eXecution), a unified framework that integrates calibrated multi-horizon forecasting, reinforcement learning (RL) based scheduling, explainability and deterministic edge deployment. Experiments on an adapted CityLearn dataset simulating microgrid-style industrial zones compare COGEniX against three representative baselines such as a rule-based scheduler using time-of-use heuristics, a gradient-boosted regression forecaster with deterministic dispatch, and a short-horizon model predictive controller. Validation on the Kaggle multi-floor smart building dataset demonstrates 44.0% lower MAE and 39.3% lower RMSE with 15.3% energy savings and 18.1% CO2 reduction at edge-feasible latency, confirming both predictive and operational gains. Patch-based transformers generate calibrated load and price forecasts that expose temporal drivers, while a Soft Actor–Critic scheduler optimizes a joint objective over cost and carbon under uncertainty and process constraints. SHAP (SHapley Additive exPlanations) explanations align with attention to yield interpretable decision narratives, and ONNX(Open Neural Network Exchange)/TorchScript export with pruning, quantization and profiling ensures compliance with latency and memory limits on real devices. Evaluation across CityLearn industrial zones shows up to a 27% reduction in operational cost and a 31% decrease in CO2 emissions compared with the strongest baseline, maintaining robustness under forecast noise. By coupling forecasting, control, interpretability and deployment in a cohesive pipeline, COGEniX advances industrial energy management toward adaptive, carbon-aware and auditable decision-making that aligns profitability with sustainability.Keywords: Industrial energy management, Reinforcement learning scheduling, Forecasting with transformers, Explainable AI (SHAP and attention), Edge deployment optimizationSubject terms: Energy science and technology, Engineering, Mathematics and computing Introduction Industrial energy management lies at the intersection of economic pressure, environmental responsibility and operational complexity. Although modern factories stream high-resolution telemetry, many still depend on manual or rule-based routines that cannot keep pace with volatile tariffs, time-varying carbon intensity and the coupled dynamics of on-site renewables and storage1–5. The consequence is persistent inefficiency and high idle consumption, while operators lack tools that anticipate and adapt to changing conditions2. Industry accounts for roughly one third of global electricity use6 and tightening emissions policies raise the costs of energy and non-compliance7. Renewable penetration is increasing but still the intermittency and forecast errors continue to cause missed opportunities to exploit low-cost and low-carbon energy or force grid reliance at the worst moments8. Early automation via heuristics and simple statistics offered incremental gains but did not scale to multi-asset factories9. Conventional deep learning often targeted commercial buildings, remained opaque and struggled to build operator trust10. With waste reported up to twelve percent per cycle in some settings11, industry needs a unified, explainable and efficient approach that reasons jointly about loads, prices and emissions under uncertainty and executes reliably on constrained edge hardware12,13. The bottleneck is not a better predictor or a more aggressive optimiser in isolation but the absence of an integrated mechanism that couples accurate multi horizon forecasts with adaptive constraint aware control and that explains its actions in terms engineers can audit. In practice plants maintain granular telemetry for energy, price and carbon signals, yet scheduling remains static and insensitive to ramp rates, market events and stochastic process loads14–16. We observe three recurring pain points, namely nonadaptivity that fails to shift when carbon intensity spikes or tariffs change intraday17, opacity that blocks validation when models act as black boxes18 and deployment friction that strands promising models because of edge latency and memory limits. Typical pipelines are omitted with uncertainty quantification, lack safety checks and also they doesnt provide audit trail19, while the reinforcement learning efforts often require substantial training effort and rarely expose transparent rationales20. From a practical perspective, operating disjoint forecasting, control, explainability and deployment stacks multiplies integration and governance overhead and shifts operational costs into hidden budgets. A principled bridge from data to decisions to deployment is therefore required to deliver cost effective and carbon aware schedules together with governance artifacts produced by construction21,22. COGEniX responds with an industrial informatics pipeline for cognitive energy forecasting and carbon aware scheduling tailored to smart industrial zones23. The system integrates data analysis and feature engineering that include normalization, temporal alignment, lag and delta construction and the inclusion of exogenous drivers such as carbon intensity and tariffs24. PatchTST forecasters produce multi step load and price predictions and attention maps that highlight influential temporal fragments25. A Soft Actor Critic (SAC) scheduler optimizes a reward that internalizes both cost and emissions while encoding process limits and promoting a stable policy through entropy regularization26. SHAP (SHapley Additive exPlanations) based explanations decompose forecasts and actions into per feature attributions that support engineering review and audit27. A dashboard surfaces accuracy, savings, emissions and trust and deployment readiness is achieved through ONNX (Open Neural Network Exchange.) and TorchScript export with pruning, quantization and profiling across devices for low latency execution28,29. The framework is developed and evaluated on the CityLearn environment, adapted to microgrid-like industrial conditions with heterogeneous zones, storage and variable tariffs30, and further validated on the Kaggle multi-floor smart building dataset (2018–2019) to assess generalization under real-world load and price dynamics. The scheduler links forecast variance to action selection to avoid brittle behavior under noisy horizons31. In aggregate the integration replaces repeated point to point glue with a single pathway that amortizes engineering effort across many sites and reduces total cost of ownership by collapsing duplicated interfaces and audits. The design is a systems solution rather than a single algorithm. At the perception and forecasting layer, PatchTST (Patch Time-Series Transformer) uses patch wise embeddings that preserve local industrial rhythms such as shifts and batch runs and attention provides native interpretability25. At the decision layer, the Soft Actor Critic method translates economic and environmental goals into an entropy regularized control problem that makes explicit how tariffs, carbon intensity and process limits shape actions26. The policy is carbon aware and it schedules flexible loads and storage to minimize a joint cost that internalizes emissions penalties rather than price alone4,13. At the explanation layer, SHAP provides per feature and per decision attributions that can be cross checked against attention to generate trust scores and to flag suspect recommendations27,32. At the deployment layer, models are exported through ONNX and TorchScript and are compressed and profiled to meet edge latency, memory and throughput budgets28,29. This end to end alignment reduces operational cost in practice because calibration connects forecasting to safe control, explainability connects actions to governance and edge first engineering connects laboratory models to production without bespoke refits. This study contributes four innovations and their integration. The first is bidirectional interpretability that uses attention and SHAP as cross validating views to quantify agreement and to surface divergences27,32. The second is price and carbon co optimization that embeds carbon intensity in both the reward and the state and enables exploitation of low marginal emissions even when price signals are weak4,13. The third is uncertainty aware control that adjusts exploration and action strength according to forecast confidence31. The fourth is edge first deployment that treats export, compression and hardware in the loop profiling as core functions in order to guarantee deterministic latency and memory footprints28,29. Beyond their individual merit, the integration lowers total cost of ownership by eliminating duplicated data pipelines, interfaces and audits across siloed components, which is a central requirement for application driven deployments. Compared with prior systems, our novelty lies not in a single algorithm but in a deployment ready closed loop where calibrated multi horizon forecasting, uncertainty aware control, transparent explanations and deterministic edge execution are jointly engineered. PatchTST forecasts are integrated with a Soft Actor Critic scheduler that internalizes carbon and price signals, exploration is modulated by forecast confidence, process constraints are enforced and attention maps and SHAP attributions are fused to yield auditable decision narratives. Export, compression and per device profiling via ONNX and TorchScript with pruning and quantization are treated as first class design principles that ensure policies validated in simulation remain safe, low latency and repeatable on real edge hardware28,29. On adapted CityLearn industrial scenarios, the framework achieves measurable cost and emission gains while producing governance artifacts that include attribution traces, attention alignment and profiling reports that justify operational integration costs and support the practical adoption of autonomous scheduling. These results are further validated on the Kaggle multi-floor smart building dataset (2018–2019), demonstrating consistent performance and confirming that the learned policies generalize across heterogeneous real-world load and tariff conditions.23,30,33. Research objectives Aligned with “Introduction”, our objectives translate data insight action assurance across forecasting, control and deployment: Interpretable multi-horizon forecasting: develop a transformer-based module (PatchTST) that accurately predicts load and price trajectories and exposes attention patterns for operator insight. Interpretable multi-horizon forecasting: develop a transformer-based module (PatchTST) that accurately predicts load and price trajectories and exposes attention patterns for operator insight. Carbon- and price-aware adaptive scheduling: implement a Soft Actor-Critic controller that turns forecasts and live telemetry into constraint-aware load shifts, optimizing cost and emissions with uncertainty-aware behavior. Carbon- and price-aware adaptive scheduling: implement a Soft Actor-Critic controller that turns forecasts and live telemetry into constraint-aware load shifts, optimizing cost and emissions with uncertainty-aware behavior. Assurance via explainability and edge-first deployment: fuse SHAP attributions with attention diagnostics for audit-ready decisions and ship ONNX/TorchScript-optimized models profiled for industrial edge latency and memory budgets. Assurance via explainability and edge-first deployment: fuse SHAP attributions with attention diagnostics for audit-ready decisions and ship ONNX/TorchScript-optimized models profiled for industrial edge latency and memory budgets. Related work Building on the introduction and the stated research objectives, related work spans four interdependent strands: demand response and scheduling, time-series forecasting, reinforcement learning for control and explainability and deployment. However, few efforts integrate all four in the context of complex industrial facilities. In 2023, Liu et al.34 reviewed the convergence of deep reinforcement learning with forecasting for energy management and highlighted the difficulty of stitching together forecasting, control and interpretability in a single workflow. In the same year, Kim et al.35 synthesized literature across industrial energy optimization and concluded that most studies optimize one module at a time, which limits real-world adoption where decisions must connect forecasts, constraints and accountability. This fragmentation motivates a system like COGEniX, which explicitly aligns multi-horizon prediction, carbon- and price-aware control and audit-ready deployment under edge constraints. Historically, demand response emerged in the 1990s through heuristic peak shaving and then matured into rule-based and mixed-integer programming formulations that depend critically on forecast quality; in 2020, Haffron et al.36 documented this trajectory and identified brittleness to forecast errors as a recurring bottleneck. As the renewable penetration rose, early statistical tools such as ARIMA and exponential smoothing have struggled with nonstationarity and multi-scale variability, prompting a wave of SVR (Support Vector Regression) , boosting and LSTM-based models; in 2023, Jabeur et al.37 showed that while these methods reduced average error, they often faltered on long sequences and provided limited interpretability and update speed for factory-grade use. The net effect is that conventional schedulers are only as good as their forecasts and conventional forecasters rarely expose actionable rationales tied to tariffs or carbon intensity, precisely the insight-to-action gap addressed by the stated objectives. From a control perspective, the mid-2010s saw the adoption of reinforcement learning for development of HVAC, storage and microgrid coordination, culminating in actor–critic variants that handle continuous actions. In 2022, Ganesh et al.38 has surveyed this line and reported that many demonstrations remains residential or in a state of testbed-centric, with limited evidence in high-stakes industrial environments where safety and process interlocks are paramount. Safe RL subsequently introduced constraints and shields; however, in 2023, Ceusters et al.39 noted that reproducible industrial case studies remain scarce and that training overhead, reward shaping and policy transparency still hinder deployment. These observations motivate embedding constraint awareness and uncertainty sensitivity directly into the RL scheduler so that actions remain stable and explainable under volatile prices and carbon signals. On the sequence modeling front, the transformer architecture have introduced by Vaswani et al. in 2017 reshaped time-series forecasting via attention mechanisms that capture long-range dependencies40. PatchTST refines thisby the idea of long-horizon forecasting by operating on patches to preserve local temporal structure at a lower cost; yet, industrial uptake remains modest due to concerns about transparency and field reliability. In parallel, explainable AI matured through Shapley-value methods and local surrogates; in 2023, Barredo et al.41 emphasized that SHAP and LIME can increase stakeholder trust but are rarely fused with RL to justify continuous control decisions. Deployment is a further obstacle: in 2023, Plathottam et al.42 described a persistent deployment gap wherein models that excel offline fail to meet SCADA-tested edge constraints and naive compression can degrade accuracy or introduce latency jitter incompatible with industrial timing. Editorial perspectives in 2023 by Ng et al.43 likewise called for methods that are simultaneously accurate, interpretable and implementation-ready for sustainable industrial systems. Recent attempts have begun to connect forecasting, control and interpretability, but gaps remain when stepping from buildings to factories. In 2023, Kohne et al.44 surveyed emerging trends that couple predictors and controllers, yet most studies still evaluate in residential or campus contexts with simplified constraints. CityLearn has been influential as a benchmark for multi-agent scheduling; in 2021, Yu et al45 cataloged deep learning strategies that perform well in this environment. However, in 2023, Weinberg et al.46 and Song et al47 2023 have argued that CityLearn abstractions overlook industrial realities such as batch-process deadlines, interlocks and quality-of-service penalties, limiting direct transfer without additional modules for constraint handling and auditability. Complementary industrial studies exist but are siloed: digital-twin RL for pulp-mill steam networks improved coordination at the cost of extensive modeling effort, while in 2023, Ferreira et al.48 reported low forecasting errors in aluminum smelting using Informer but reverted to rule-based scheduling, breaking the insight-to-action link. These patterns suggest that step-change efficiency requires an end-to-end approach that unifies multi-horizon forecasting, adaptive scheduling and explanation with explicit attention to deployment. In 2023, Yao et al.49 advocated converged AI architectures for industrial energy that avoid the handoffs and interface losses between standalone modules. Following this guidance, COGEniX integrates transformer-based forecasting, uncertainty-aware SAC control and bidirectional interpretability into a pipeline that also ships as an ONNX and TorchScript artifact profiled for edge execution. In 2023, Lu et al.50 described elements of such a direction for RL-driven industrial scheduling. Still, without the combined emphasis on SHAP–attention agreement and edge-first profiling emphasized here. Aligning with the 2022 call by Ng et al.43 for green manufacturing, the focus is not only on performance but also on transparency and operational fit, so that schedules are economically rational, carbon-aware and auditable. In summary, prior work has advanced each pillar: forecasting, control, interpretability and optimization, but the literature still lacks a cohesive system that closes the loop from data to deployment in industrial settings. The shortcomings are consistent across decades: rules that cannot adapt without robust forecasts, forecasts that lack actionable rationale, controllers that optimize without explaining and models that fail to meet the latency and memory constraints of edge devices. COGEniX is proposed to address these gaps in continuity with the stated objectives: interpretable transformer forecasts expose temporal opportunities for shifting, an uncertainty-aware SAC translates those insights into safe carbon- and price-aware actions and SHAP plus attention deliver decision narratives suitable for audit, all packaged through ONNX and TorchScript and profiled to run where industrial decisions are executed. Methodology This section presents the architecture, learning components and operational workflow of the proposed COGEniX framework for cognitive energy forecasting and carbon-aware scheduling. Dataset We use the CityLearn dataset51 which provides hourly time series for multiple building zones including load solar generation temperature carbon intensity and electricity prices as summarized in Table 1. In addition we validate on the Kaggle multifloor smart building dataset52 which offers minute level floor and zone measurements across seven floors with rich sensor coverage. Together these datasets support evaluation of multi step forecasting reinforcement learning based scheduling and carbon aware optimization. Table 1CityLearn and Kaggle multifloor smart building dataset components and short description.ComponentCityLearn51Kaggle multifloor smart building dataset52Sampling and spanHourly multi year synthetic traces with seasonalityMinute level logs across seven floorsBuilding loadsHourly electrical demand per building zone in kWMinute level floor and zone loads for AC lighting and plug in kWPV generationSimulated solar power per zone in kWNot providedWeather and sensorsAmbient temperature and solar irradiance in and W Indoor temperature humidity and luminance plus ambient where available in percent and luxStorage and HVAC specsBattery capacity charge and discharge limits and HVAC thermal parameters in kWh and kWNo battery specifications HVAC states and setpoints when present in unitless and Tariffs and emissionsTime varying electricity prices and marginal emission factors in USD and g Not intrinsic populated by external tariffs and emission factors during validation with same unitsTrain validation test splitChronological split for time series integrity for example 60% 20% 20%Chronological split with the same proportions CityLearn and Kaggle multifloor smart building dataset components and short description. Mathematical representation To close the loop from data to deployment, we couple a forecasting layer that anticipates load and price trajectories with a control layer that optimizes carbon- and cost-aware actions under uncertainty and we bind both with an attribution layer for assurance and an edge profiling layer for practicality. The formulations below follow this flow so that each component produces signals that the next can safely consume. PatchTST forecasting formulations We first require a forecaster whose errors are not only small on average but also calibrated across horizons and decision-relevant quantiles. In 1 we define a joint multi-task, multi-quantile objective that trains a single PatchTST to predict both load and price across H steps with heteroscedastic uncertainty and calibration control: Here and are true load and price at horizon h, and are q-quantile predictions with pinball loss , and are Gaussian mean–variance heads for heteroscedastic uncertainty, emphasizes near-term horizons, is empirical coverage of the qth predictive interval to encourage calibrated quantiles, is the attention map for horizon h and the total-variation term with stabilizes attention across adjacent horizons so that explanations do not flicker. Attention itself aggregates temporally local “patches” with relative position awareness in 2, which we regularize implicitly through the stability term above: are query, key, value projections; is key dimension; encodes relative positions between patches; are attended representations; and embeds the pth patch formed by concatenating raw patch with exogenous drivers (e.g., carbon intensity, weather, tariff class), passed through nonlinearity . To ensure the inputs that matter are retained but redundant ones are suppressed, we select features with a maximal relevance–minimal redundancy criterion expressed in 3: is the selected feature set of size m, is mutual information with the target Y (jointly covering load and price) and the redundancy penalty uses squared Pearson correlation with trade-off . Soft actor–critic scheduling Given probabilistic trajectories from the forecaster, the controller must hedge against uncertainty while meeting economic and environmental aims. We therefore optimize a risk-sensitive Lagrangian objective in 4 that couples cost, emissions, entropy and a tail-risk measure: is the policy; the discounted return formed by monetary cost and emissions with trade-off ; controls aversion to high-cost/high-emission tails at level ; is per-step emissions; is an emissions budget; is the dual variable enforcing the constraint; weights the policy entropy to promote exploration; is the state visitation distribution; and is the discount factor. The SAC temperature adapts to a target entropy so exploration decays in a controlled way, while the emissions constraint is enforced by dual ascent, as in 5: is the SAC temperature (not to be confused with in ); and are step sizes; and projects onto the nonnegative reals. Uncertainty from the forecaster modulates the risk taken by the policy. If denote predictive variances at horizon h, we scale near-term costs by a horizon-weighted uncertainty factor inside the critic target to downweight brittle long-horizon shifts: is a tunable sensitivity, avoids division by zero and V is the soft value. Carbon impact and device dynamics Actions translate into power flows whose net grid exchange determines emissions. We explicitly account for storage and on-site generation so that the controller can exploit low-carbon windows. In 7 we write the battery and grid coupling with efficiencies and in 8 we map net grid imports to marginal emissions: is state of charge; and are charge/discharge powers; are efficiencies; is the sampling interval; is net import (negative when exporting); is native load; is on-site generation; and is the time-varying marginal emissions factor so exports do not claim credits beyond zero import. Model explainability SHAP and attention SHAP We compute Shapley additive explanations SHAP for each input feature token and fuse these with model attention to produce an attention SHAP score Here F is the set of all features and denotes the model restricted to feature subset S and is the Shapley contribution of feature i53 In practice we compute SHAP values with the SHAP framework using the estimator that matches the model class TreeSHAP for tree ensembles or KernelSHAP for black box models and we use a fixed background sample set to approximate conditional expectations The aggregation above averages attention over all heads and layers and then normalises per sample so that the weights sum to one The Attention SHAP score is a signed importance metric that reflects both attention and Shapley contribution and the denominator makes scores comparable across samples. As a diagnostic we also report the Spearman rank correlation between absolute Shapley values and attention weights across tokens and samples to quantify alignment For reproducibility we specify the SHAP estimator used the number of background samples the model checkpoint the random seed the exact layer or head choices used in Eq. 10 and whether values were combined signed or absolute in Eq. 11 Statistical tests such as Spearman p values and permutation tests are used to assess significance Implementation details and code to reproduce figures are provided in the supplementary material Attribution alignment for assurance Because high-stakes schedules must be explainable, we align what the forecaster attends to with what post-hoc attributions say matters. Let be the attention over features and time, normalized to a probability simplex and let be the corresponding SHAP distribution. In 12 we penalize disagreement symmetrically so either view can correct the other: is Kullback–Leibler divergence, stacks attention weights and stacks absolute SHAP values. This term is added during forecaster training and used as a trust score at inference. Edge-constrained deployment Finally, to guarantee the models that explain and control can run where decisions are executed, we choose per-layer quantization bit-widths to minimize latency under accuracy and memory budgets. In 13 we cast deployment as a discrete resource-allocation problem: is the bit-width for layer , is latency contribution, is accuracy loss model, is memory footprint, is the allowable total accuracy drop, is the memory budget and is the end-to-end deadline. The solution yields an ONNX/TorchScript artifact with certified timing on target hardware. Together, 1–13 encode a coherent pipeline: calibrated forecasts with stable attention feed a risk- and constraint-aware controller grounded in physical power flows, whose decisions are cross-validated by attribution alignment and whose implementation respects edge constraints. Variables have been defined inline to preserve readability and to ensure each module exposes precisely the quantities the next requires. COGEniX framework and algorithm overview Algorithm 1 is introduced after a short explanation so the flow is clear before code. The pipeline ingests CityLearn data emission factors tariffs device specs and budgets and returns a deployed schedule an emissions report and a compressed edge model . The stages are feature preparation forecasting with calibrated uncertainty physics informed environment mapping to cost and emissions risk sensitive Soft Actor Critic scheduling alignment of attention and SHAP for trust and mixed precision export for edge readiness. COGEniX pipeline from calibrated forecasts to risk and carbon aware control. Figure 1 illustrates the operational workflow of the proposed COGEniX framework, capturing the sequential data flow from raw acquisition to deployment on edge hardware. The left panel represents the data analysis, preprocessing and feature engineering stage, where raw signals from sensors, meters and rate tables are ingested, cleaned and standardized. Temporal aggregation and encoding are performed to form a structured feature store that includes exogenous drivers such as weather, occupancy and tariff information. The resulting compact feature sequences are tokenized and shaped into inputs for the forecasting module. The upper right panel details the PatchTST forecasting process, where multi-horizon transformer blocks process the structured data to produce calibrated mean and variance estimates for both load and price. Attention layers reveal temporal dependencies, while residual and normalization layers maintain stability across horizons. A calibration monitor further refines uncertainty intervals, ensuring that the predictive distributions are consistent with observed volatility in industrial operations. The lower left panel depicts the Soft Actor–Critic (SAC) scheduler that consumes these forecasts, along with telemetry and process constraints, to generate energy scheduling actions. The agent continuously interacts with the simulated or real environment, recording states, rewards and actions in a replay memory. Training updates are triggered by drift or performance deviation, allowing adaptive policy refinement. Parallel computation of carbon impact integrates emissions factors and local grid intensity, enabling the policy to internalize both cost and carbon objectives within its reward formulation. Operational workflow detailing sequential phases from dataset analysis to deployment. The lower right panel presents the explainability and deployment modules. SHAP and attention maps are aligned to quantify trust at the interval level, flagging inconsistent or high-risk decisions. Profiling and compression routines, including pruning and quantization, are applied to the trained models to meet edge-specific memory, latency and accuracy constraints denoted by , and . These steps ensure that the exported ONNX or TorchScript artifacts preserve both interpretability and deterministic performance during real-time execution. Overall, the workflow demonstrates how COGEniX integrates data processing, calibrated forecasting, uncertainty-aware control, explainability and edge deployment into a cohesive and auditable operational loop. Figure 2 presents a seven phase left to right workflow with explicit data handoffs and decision points. Phase one ingests CityLearn time series and metadata, cleans gaps and outliers and emits a validated dataset with audit logs. Phase two engineers features, applies scaling and lags, performs relevance and redundancy screening and writes a versioned feature store that guarantees reproducibility. Phase three trains PatchTST to produce calibrated multi horizon means and variances plus attention maps and a calibration monitor issues a retry signal to feature engineering if coverage or error thresholds fail. Phase four constructs the control state from forecasts device telemetry and constraints and a Soft Actor Critic scheduler optimizes actions for cost and carbon while logging cost and emissions and storing transitions for replay. Phase five aggregates impact metrics and computes baselines versus policy deltas for cost and CO2. Phase six aligns attention with SHAP to produce per interval trust scores and flags low trust windows for operator review. Phase seven profiles latency and memory, selects mixed precision, exports ONNX or TorchScript and deploys to edge, while runtime telemetry and trust flags loop back to phases one and two for continuous improvement. COGEniX framework for data driven forecasting scheduling and carbon aware analysis. Hyperparameter tuning Table 2 lists the primary hyperparameter ranges used for reproducible searches and joint validation, where the study separated forecasting tuning from control tuning and prioritize configurations that can improve the calibrated probabilistic scores cost and emissions CVaR. PatchTST searches include patch size sequence length and learning rate. SAC searches include actor learning rate batch size and replay size. Compression searches consider per layer bit widths under memory latency and accuracy tolerance . Experiments use time series aware splits deterministic seeds and archived checkpoints. Table 2Concise hyperparameter summary.ComponentKey hyperparametersTypical rangesPatchTSTPatch size and sequence length4 to 16 and 96 to 672SACActor learning rate and batch size to and 128 to 256CompressionPer layer bit widths and edge constraints and meet Concise hyperparameter summary. Model comparison with baselines Table 3 reports consolidated results that compare PatchTST forecasting and the Soft Actor Critic controller against LSTM GRU and a rule based baseline and the table groups multi horizon forecast errors realized cost savings per zone and per zone reductions so readers can see forecasting benefits and operational impact. Table 3Consolidated performance forecasting error cost savings and reduction.Forecast errorCost savings USD reduction %HorizonMAERMSEMAPE %SavingsZone1 step0.3880.79131.3174.2Z123.43 step0.3930.91825.8208.5Z218.95 step0.4811.14620.6315.3Z321.6––––-44.9Z415.2––––265.0Z526.8 Consolidated performance forecasting error cost savings and reduction. Data move deterministically through the pipeline so that every module has explicit inputs and explicit outputs. The raw CityLearn dataset is preprocessed into a compact feature set and is provided to the PatchTST forecaster which emits calibrated means and variances and attention maps. The calibrated means and variances are concatenated with device telemetry and constraint parameters and are consumed by the Soft Actor Critic scheduler which returns actions and logs realized cost and emissions and next states. Logged trajectories populate replay memory for learning and an audit log for monitoring. Attention based maps are fused with SHAP values for the production of trust based scores that can flag intervals for operator review. The compression module profiles the trained artifacts and returns an ONNX or TorchScript export that meets memory latency and accuracy tolerance . Table 4 outlines the key modules of the COGEniX pipeline, detailing their inputs, outputs and runtime triggers across preprocessing, forecasting, scheduling, explainability and deployment stages. Table 4Module interfaces and runtime triggers.ModuleInputsOutputsNext and triggerPreprocessingCityLearn raw Compact features Forwarded to PatchTST at startPatchTST forecasting and exogenous driversCalibrated means variances and attentionConsumed by SAC and by calibration monitorSAC schedulerForecasts telemetry constraintsActions and logs and replay memoryUpdates from replay and audit log triggers retrain on driftAttribution and trustAttention maps SHAP background setPer interval trust scores and flagged intervalsOperator dashboard and forecaster retrain loopCompression and exportCheckpoints and profiling tracesONNX or TorchScript that meets Deployment and runtime telemetry collection Module interfaces and runtime triggers. The study states each component’s goal inputs outputs and data dependencies so the workflow is reproducible and practical. Preprocessing ingests CityLearn and produces a compact feature set with stored scalers and time splits that feed forecasting. PatchTST consumes and exogenous drivers and emits calibrated means variances and attention maps which flow to the controller and to a calibration monitor. The Soft Actor Critic scheduler consumes the calibrated forecasts device telemetry and constraint parameters and emits actions and logs of cost emissions and next states which populate replay memory for learning and an audit log for drift checks. Attribution fuses attention and SHAP using model checkpoints and a background set and emits per interval trust scores and flagged intervals that guide data curation and optional forecaster refresh. Compression consumes trained checkpoints and profiling traces and emits an ONNX or TorchScript artifact that satisfies memory latency and accuracy and deployment returns runtime telemetry to monitoring. This chain lowers cost and carbon in operation and defines clear module interfaces for ablation diagnosis and repeat experiments. Results The results demonstrate that PatchTST achieves accurate forecasts, enabling RL-based scheduling that cuts costs and CO2 by over 20% on average. Diagnostics confirm temporal, cross-zone and exogenous structure are preserved through preprocessing and feature design. Operational profiling shows deployment-ready efficiency with quantized models meeting latency, memory and trust requirements across devices. Dataset analysis We analyze temporal structure, zone heterogeneity and exogenous drivers to identify key statistical patterns and variability. These diagnostics guide feature selection, uncertainty modeling and carbon-aware scheduling. Temporal structure and variability Quantitative profiling establishes the regime that the forecasting and control must address as shown in Table 5 reports time and temperature correlations of hour 0.23, month 0.08, which indicates a clear diurnal and seasonal patterns which suits to time-aware encodings and patch-wise inputs. Cooling-load entropy at 5.87 signals high variability, motivating multi-quantile predictions and tail-sensitive objectives. Table 5Statistical summary, correlation and entropy metrics for selected variables.MonthHourDay typeDaylight sav.Indoor tempOutdoor tempMonth1.000.000.010.120.080.02Hour0.001.000.000.090.230.05Day type0.010.001.000.150.020.01Daylight sav.0.120.090.151.000.050.06Indoor temp0.080.230.020.051.000.47Outdoor temp0.020.050.010.060.471.00 VariableEntropyVariableEntropyEntropy (bits)Zone_1 equip. power2.29Zone_1 cooling load5.87Hour of day3.46Indoor temp4.12Outdoor temp4.65–– VariableMeanStd. dev.MinMaxRangeDescriptive statisticsIndoor temp (C)22.51.819.026.57.5Zone_1 equip. power (kW)5.42.11.111.810.7Zone_1 cooling load (kW)12.74.53.024.621.6Outdoor temp (C)16.36.2-2.032.034.0Significant values are in bold. Statistical summary, correlation and entropy metrics for selected variables. Significant values are in bold. Zone heterogeneity and exogenous drivers Seasonal components and cross-zone structure determine what the forecaster attends to and how control hedges risk. Figure 3 shows seasonal decomposition with non-negligible residuals and a similarity dendrogram that reveals heterogeneous zone clusters, informing feature selection and transfer. Left: seasonal decomposition with pronounced periodicity and residual noise. Right: zone similarity dendrogram exposing heterogeneous subpopulations. Load-shape tails and solar cycles jointly determine the flexibility window for carbon-aware control. The hourly energy distribution shown in Fig. 4 reveals strongly skewed peaks with long top tails that highlight rare but extreme load events. These justify tail-sensitive control objectives that explicitly hedge against volatility rather than relying on mean-only scheduling. Hourly equipment-power distribution showing asymmetric peaks with long upper tails that indicate rare but extreme load events. In parallel, the solar generation profile shown in Fig. 5 exhibits highly regular daily cycles that create predictable low-carbon intervals which can be exploited for shifting discretionary loads. Together, these diagnostics argue for state representations that incorporate tariff class, marginal emissions factor and PV availability, enabling the forecaster and controller to align operation with both risk-aware reliability and decarbonization opportunities. Solar generation profile showing regular daily cycles that create predictable low-carbon windows for load shifting. These diagnostics yield a compact feature set that preserves temporal and exogenous structure for PatchTST and calibrated priors on variability and PV alignment for uncertainty-aware scheduling and carbon mapping. Preprocessing and feature engineering This stage converts telemetry and exogenous drivers into decision-ready signals with emphasis on compactness, temporal structure and robustness. Signal selection and correlations Table 6 lists the descriptors and dependencies used to choose variables and remove redundant signals. Electric power has a lag-1 autocorrelation of 0.95 and cooling load has an autocorrelation of 0.91. This shows that short-horizon sequence models can capture temporal persistence. Power and carbon intensity have a positive correlation of 0.61 which means reducing demand can lower emissions. Tariff rate and battery SOC have a negative correlation of minus 0.34, which matches off-peak charging behavior. Feature importance ranks carbon intensity first, recent power usage second and tariff rate third. Outdoor temperature and solar generation follow. Together these features form a compact and informative input set for forecasting and control. Table 6Statistical, lag correlation, feature-importance and performance summary used for signal selection.ZoneMean loadStd devCVSkewnessKurtosisCross-zone statistical summaryZone 11.240.510.411.123.82Zone 21.380.470.340.953.57Zone 31.550.620.401.284.21 VariableLag-1Lag-2Lag-3Best lagPairwise corr.Lag correlations and pairwise relationshipsElec. power0.950.890.861 hrCarbon intensity: 0.61Cooling load0.910.870.831 hr–Solar gen0.750.620.582 hrTemp: 0.42Battery SOC––––Tariff rate: FeatureExtra treesPermutationSHAP valueNormalized scoreRankFeature importance (model comparison)Carbon intensity0.2100.1980.2151.001Elec. power lag-10.1880.1760.1820.872Tariff rate0.1720.1690.1580.813Outdoor temp.0.1450.1390.1420.684Solar gen0.1210.1280.1190.555 ModelRMSEMAER2MAPE (%)Runtime (s)Model performance metricsBaseline (rules)0.840.650.719.50.02LSTM0.520.390.876.31.45Transformer0.460.350.915.82.10RL-scheduler0.410.320.935.23.25 Statistical, lag correlation, feature-importance and performance summary used for signal selection. Feature importance and temporal encoding Figures 6 and 7 together illustrate how the model interprets input salience and temporal regularity. The feature-importance profile in Fig. 6 confirms that carbon intensity, recent load and tariff rate dominate model attention, indicating that both cost and emissions signals drive decision relevance. Complementarily, the hour-of-day encoding in Fig. 7 reveals pronounced diurnal cycles in energy demand and pricing, validating the inclusion of cyclic temporal features. Together, these analyses demonstrate that the model not only prioritizes environmentally and economically significant signals but also captures recurring temporal structures critical for stable forecasting and scheduling. Feature-importance profile. Polar encoding of hour-of-day. PatchTST forecasting and interpretability Table 7 reports the PatchTST forecast accuracy across all representative zones. Errors remain low, with MAE ranging from 0.28 to 0.36 and MAPE between 5% and 7% and a normalized MAE of approximately 0.24. Compared to the baseline, this represents a 13–18% improvement and demonstrates suitability for responsive scheduling, where accurate short-term load and price signals are crucial. Table 7PatchTST forecast accuracy (sample zones) compared with baseline. Lower is better for MAE and MAPE.ZonePred. load (kWh)Pred. price ($)MAE (kWh)MAPE (%)nMAEImp. vs. baseline (%)Zone_11.620.1520.346.80.21+14.7Zone_21.100.1440.285.10.25+18.3Zone_31.450.1510.367.20.25+12.9Avg.1.390.1490.336.40.24+15.3 PatchTST forecast accuracy (sample zones) compared with baseline. Lower is better for MAE and MAPE. Figure 8 have presented interpretability diagnostics which links the model reasoning to operational decisions. The left panel displays temporal attention weights that highlight which horizons and input patches most influence forecasts. These weights help debug model behavior, validate feature relevance and generate attribution-based trust signals for the scheduler. The right panel overlays calibrated forecast uncertainty bands derived from the predictive distribution which quantify confidence across horizons and identify when control should hedge risk or when more aggressive actions are appropriate. Together, the attention and uncertainty diagnostics support safer scheduling by exposing model blind spots, guiding conservative setpoints in high-uncertainty windows and by informing data collection and feature engineering to improve future forecasts. Left: temporal attention highlighting influential patches and horizons. Right: uncertainty bands conveying confidence across the window. RL-based scheduling Table 8 have summarized the reinforcement learning outcomes across all zones. While most zones have achieved a substantial cost reductions, ranging from 174 to 315, reflecting the effective alignment of load shifting with price and carbon signals. Zone 4 is a counterexample where the local constraints and price-carbon misalignment have lead to a cost increase, underscoring the need for heterogeneity-aware training. Overall, the results show that RL policies generalize across diverse operating conditions where, zone-specific dynamics can limit the benefits and must be addressed during deployment. Table 8RL performance: cost savings and training-sensitive outcomes by zone.ZoneBase costRL costBase energyRL energyCost savingsZone_11046.83872.6611.5070.69174.17Zone_21256.381047.916.5758.02208.47Zone_31310.20994.8745.0644.62315.33Zone_41226.951271.8228.4560.63-44.87Zone_51094.63829.6348.7739.61265.00 RL performance: cost savings and training-sensitive outcomes by zone. Figure 9 illustrated a reinforcement learning behavior from state and action responsiveness to scheduling patterns. The left panel overlays agent state and action trajectories and shows how control adapts to price and carbon signals and captures transitions into advantageous states. The right panel of the Figure have shown a schedule density by zone and hour and reveals systematic shifting of loads into favorable intervals while respecting operational limits and retaining loads in less flexible hours. The stacked distribution exposes coordinated yet heterogeneous adaptations with each zone contributing differently to overall reshaping. Left: state–action mapping showing price and carbon responsiveness. Right: schedule density with shifts into advantageous intervals and constraint-limited retention. As shown in Table 8, a detailed analysis was conducted to explain the negative cost saving observed in Zone 4. While most zones achieved positive cost reductions between $174.17 and $315.33, Zone 4 exhibited a negative saving of $44.87, corresponding to a 3.66% cost increase from a base cost of $1,226.95 to an RL cost of $1,271.82. Energy consumed under the RL policy increased from 28.45 to 60.63 units, an absolute rise of 32.18 units and a relative increase of 113.11%, indicating added activity rather than effective price arbitrage. This outcome reflects a failure of temporal cost optimization, where control actions were executed during mid- or high-price periods instead of exploiting low-price intervals. The result was linked to limited local flexibility and a small storage-to-load ratio that constrained shifting opportunities, compounded by localized forecast volatility that prompted conservative decisions since constraint violations were heavily penalized during training. Reward shaping that prioritized emissions reduction in certain episodes further contributed by steering the policy toward lower-emission but higher-cost energy sources. To mitigate these effects, several strategies were recommended and partially evaluated, including zone-specific reward reweighting, process-aware action masking, targeted data augmentation or transfer learning for underrepresented zones, and integration of short-horizon model predictive checks to prevent costly exploratory actions. Incorporating these diagnostics and mitigation steps enhances the interpretability of negative outcomes and supports reliable deployment of RL-based scheduling across heterogeneous industrial zones. Sustainability and carbon impact analysis Table 9 have compared the baseline and RL emissions across six zones. Reductions range from 17.6 percent in Zone 4 to 26.5 percent in Zone 2, with an average above 21 percent. Standard deviations remain modest, confirming stable zone-level performance. In addition to emissions, RL achieves consistent cost decreases between 3 and 9 percent, demonstrating that carbon and cost objectives can be jointly optimized rather than traded off. Table 9Zone-level CO2 reduction and cost trade-offs. Lower cost and higher reduction are preferred.ZoneBaseline (kg)RL (kg)Reduction (kg)Reduction (%)Std. devCost change (%)Zone 1298.2223.474.825.14.6-8.5Zone 2240.5176.763.826.53.8-7.1Zone 3251.2200.350.920.35.1-5.4Zone 4317.0261.155.917.64.0-3.2Zone 5271.9215.756.220.73.6-6.7Zone 6242.1198.643.517.94.9-4.9Avg.270.2212.657.521.44.3-6.0 Zone-level CO2 reduction and cost trade-offs. Lower cost and higher reduction are preferred. Table 10 aggregates all outcomes and also ranks explanatory drivers. Demand variability have emerged as the dominant factor and followed by solar availability along with price volatility, with occupancy load and recent usage completing the top five. Together, these features explain both the magnitude of system-wide savings and the heterogeneity across zones, linking reduction potential to flexibility and renewable alignment. Table 10Total emission savings and SHAP-based drivers of carbon outcomes. Lower is better for emissions.MetricBaseline (kg)RL (kg)Reduction (kg)Reduction (%)NotesTotal emission savingsTotal emissions1621.01276.0345.021.3System-wideMax zone emission317.0261.155.917.6Zone 4Min zone emission240.5176.763.826.5Zone 2Avg. zone reduction––57.521.4Across 6 zones FeatureMean SHAPNorm. contrib. (%)Cumulative (%)DirectionRankTop 5 SHAP features driving carbon outcomesZone demand variability0.28728.728.7+1Solar availability0.24324.353.0–2Price volatility0.19819.872.8+3Occupancy load0.16616.689.4+4Previous hour usage0.13913.9100.0+5 Total emission savings and SHAP-based drivers of carbon outcomes. Lower is better for emissions. The lower panel highlights the top SHAP features. Zone demand variability and solar availability jointly have explained over half of the observed reduction while price volatility, occupancy load and recent usage patterns further refine control responsiveness. Positive SHAP directions indicate features that amplify carbon reduction when favorable, whereas negative contributions, such as reduced solar availability, constrain potential benefits. Together, these insights explain both system-wide gains and the variability in zone-level performance. Figure 10 highlights temporal and trade off perspectives of carbon aware control. The left panel compares baseline and RL emissions over time and shows clear reductions during peak hours. This demonstrates that RL shifts demand into periods with lower marginal emissions and reduces intensity when it matters most. The right panel maps CO2 savings against the cost outcomes and also revealing a dense cluster where the emissions reductions align with cost improvements which validates the joint optimization objective. A few outliers show remaining trade offs but the dominant pattern underscores RL robustness in balancing environmental and economic goals. Left: baseline vs RL emissions highlighting peak-hour reductions. Right: CO2–cost trade-off map with favorable operating regions. Figure 11 have illustrated the emission dynamics under reinforcement learning, Where the left panel plots the cumulative reduction stream, which rises steadily and confirming that gains are persistent. The right panel overlays hourly emissions by zone and reveals synchronized daily cycles with aligned peaks and troughs. Together the panels show that RL shifts demand into lower carbon windows while preserving load diversity and that the resulting synchronization supports aggregate efficiency and fair zone level participation. Left: cumulative emission reduction over time. Right: hourly emissions by zone showing synchronized daily cycles under RL. Operational profiling, dashboard and deployment readiness Table 11 summarizes runtime operational metrics, forecast accuracy and credit allocation across industrial zones. Deviations between actual and predicted load remain within one percent on average, confirming stable closed-loop tracking between the forecaster and controller. Emissions savings are strongest in Zone 1, reflecting its higher renewable share and responsive control actions, while Zone 3 achieves a balanced outcome by combining substantial emissions reduction with the best uptime and forecast accuracy. Zone 2 shows stable operation but limited reward due to its smaller flexibility window and underperformance in emissions reduction. Credit allocation mirrors these trade-offs: Zone 1 earns the highest reward, Zone 3 receives moderate credit for balanced performance, and Zone 2 receives none despite good uptime, underscoring the incentive-compatible nature of the scoring mechanism. The aggregated row indicates that overall operation maintains high uptime at 98.2% and forecast accuracy above 94%, validating that the scheduling and forecasting modules operate consistently under real-time conditions. Table 11Zone-level operational metrics, forecast accuracy and credit allocation. Higher is better for uptime, accuracy and credits.ZoneAct. load (kW)Pred. load (kW)Deviation (kW)Deviation (%)Emis. saved (kg)Uptime (%)Forecast acc. (%)Credit awardedZone_128.327.60.72.549.298.494.685Zone_235.936.2-0.3-0.833.197.292.10Zone_331.130.80.31.042.699.195.467Avg.31.831.50.20.941.698.294.051Significant values are in bold. Zone-level operational metrics, forecast accuracy and credit allocation. Higher is better for uptime, accuracy and credits. Significant values are in bold. These indicators demonstrate that COGEniX sustains reliable multi-zone coordination while differentiating credit based on effective decarbonization rather than mere availability. The strong alignment between predicted and actual load highlights the system’s ability to handle dynamic industrial processes without oscillations or drift. Moreover, the reward assignment provides an interpretable governance layer that can inform policy retraining, resource prioritization and operator trust. Overall, the results confirm that the proposed framework not only optimizes energy and carbon metrics but also enforces fairness and accountability in autonomous scheduling across heterogeneous industrial environments. Figure 12 links the model’s interpretability and operator’s trust by comparing predictive confidence with attention entropy. The scatter have shown a high confidence paired with low entropy which indicates stable attention on key features. Intervals with high entropy correspond to low confidence and diffuse attention which signals uncertain model reasoning. This relationship permits routing low confidence high entropy intervals to human review or fallback strategies and ensures automated control remains reliable and auditable. Confidence versus attention entropy linking model certainty to operator trust. Table 12 consolidates profiling outcomes across latency, memory, compression and device benchmarks to guide deployment choices. The latency breakdown identifies postprocessing and embedding stages as dominant contributors, suggesting optimization opportunities beyond the core attention mechanism. Memory profiling highlights platform variability, with lightweight edge devices such as Jetson Nano offering reduced footprint, while high-capacity GPUs like V100 incur overhead but deliver higher trust scores. Table 12Profiling and deployment summary across components, compression and devices. Percentages show relative contribution or savings.StageTime (ms)% of TotalCumulative (ms)Cumulative (%)RankLatency breakdown (ms)Input Layer1.9713.91.9713.95Patch Embed3.1222.05.0935.92Attention1.9313.67.0249.54Pred. Head3.2522.910.2772.43Postproc4.8534.215.12100.01 DeviceMemoryRel. vs CPU (%)Peak load (MB)Efficiency (MB per kW)RankMemory usage (MB)CPU1440100150051.43GPU T49166498032.74GPU V1001891131200067.65Edge TPU126288135045.12Jetson Nano5183656018.61 ModelSize (MB)Acc.Latency (ms)Size red. (%)Acc. loss (%)Model compressionFull900.9140––Pruned650.893028-2.2Quant.300.881867-3.3 DeviceTime (ms)RAMFPSTrustRank (Trust)Cross-device benchmarkCPU54139658.60.8412GPU T415130228.30.7195GPU V10054116440.60.8631Edge TPU69189855.50.8323Jetson Nano5849349.50.7464Significant values are in bold. Profiling and deployment summary across components, compression and devices. Percentages show relative contribution or savings. Significant values are in bold. Compression results show that pruning and quantization yield significant size and latency reductions with modest accuracy trade-offs, making them suitable for resource-constrained deployments. The cross-device benchmark further contextualizes runtime, revealing that although GPU T4 minimizes latency, GPU V100 balances throughput, trust and stability, while Jetson Nano demonstrates competitive efficiency under tight resource budgets. These trade-offs illustrate how profiling data supports informed decisions for scalable, carbon-aware deployment across heterogeneous hardware. Figure 13 compares runtime performance across zones and profiling gains from optimization. The heatmap on the left disaggregates latency contributions by component, revealing that attention and actor stages dominate delays in several zones, while encoder and decoder latencies vary more moderately. This breakdown highlights opportunities for targeted acceleration where critical bottlenecks emerge. Left: latency heatmap by zone and component. Right: radar comparison showing gains from pruning and quantization. The radar chart on the right contrasts baseline and optimized models under pruning and quantization. The optimized profile demonstrates improved memory efficiency and latency without compromising accuracy or stability, while confidence remains consistent across both settings. Together, these results validate that compression strategies deliver meaningful efficiency gains while preserving operational reliability. Finally, Fig. 14 compares execution speed across targets, confirming that quantized artifacts meet end-to-end deadlines on datacenter and edge platforms while preserving trust scores. Cross-device execution speed comparison demonstrating deadline compliance on target platforms. Validation on additional dataset To provide a comprehensive validation, the COGEniX framework was tested on the Kaggle multi-floor smart building dataset52,54, which contains zone-wise air conditioning, lighting, plug load and environmental data across seven floors. The experiments used consistent hyperparameters and a 2-hour forecasting horizon. Table 13 summarizes detailed results in stacked form, covering configuration, prediction accuracy, operational benefits and computational efficiency. Table 13Stacked validation results of COGEniX framework on the Kaggle multi-floor dataset.Dataset configurationDatasetKaggle Multi-Floor Smart Building 2018–2019Floors used7 with zone wise AC lighting plug and sensor dataRecords520000 plus minute level entriesFeatures used18 including temperature humidity luminance and energy load variablesForecasting horizon2 hoursInput window24 hoursForecasting performanceLSTM baselineMAE = 0.148 kW RMSE = 0.229 kW MAPE = 5.62%GRU forecastingMAE = 0.135 kW RMSE = 0.214 kW MAPE = 5.03%PatchTST proposedMAE = 0.091 kW RMSE = 0.152 kW MAPE = 3.27%COGEniX plus SAC schedulerMAE = 0.083 kW RMSE = 0.139 kW MAPE = 2.94%Operational impactLSTM baselineEnergy savings = 6.4% reduction = 7.8%GRU forecastingEnergy savings = 7.1% reduction = 9.2%PatchTST proposedEnergy savings = 11.8% reduction = 14.5%COGEniX plus SAC schedulerEnergy savings = 15.3% reduction = 18.1%Computational analysisLSTM baselineEpochs = 50 Training time = 42 min Latency = 18.4 msGRU forecastingEpochs = 50 Training time = 46 min Latency = 19.6 msPatchTST proposedEpochs = 50 Training time = 58 min Latency = 20.1 msCOGEniX plus SAC schedulerEpochs = 50 Training time = 63 min Latency = 22.7 msAggregate improvement proposed vs baselineForecast accuracy gain44.0% lower MAE 39.3% lower RMSEEnergy efficiency gainplus 8.9% energy savings plus 10.3% reductionComputational overheadplus 21 min training plus 4.3 ms latency which is acceptableSignificant values are in bold. Stacked validation results of COGEniX framework on the Kaggle multi-floor dataset. Significant values are in bold. The vertically structured summary highlights the framework’s adaptability and robustness. Compared to baseline models, COGEniX reduces forecasting error by over 40% and improves energy-carbon efficiency by 15–18%. The slight computational overhead is offset by superior performance and real-time viability, confirming the framework’s effectiveness across diverse building zones and operational conditions. Ablation evidence for the unified pipeline To isolate the benefit of unifying forecasting and control we define a control that runs PatchTST in forecasting only mode and schedules without reinforcement learning so both variants share the same data splits scalers and telemetry while only the coordination differs. Table 14 stacks the key comparisons. Panel A confirms that PatchTST attains strong accuracy across horizons and Panel B shows that adding the Soft Actor Critic scheduler on top of the same calibrated forecasts yields higher operational gains with energy savings rising from 11.8% to 15.3% and reduction rising from 14.5% to 18.1% with a small latency increase from 20.1 to 22.7 milliseconds. Forecast accuracy relative to a baseline improves by 44.0% in MAE and 39.3% in RMSE and per zone cost deltas are mostly positive with one adverse case that signals heterogeneity and motivates zone specific tuning. These results provide direct evidence that coordination between calibrated forecasting and risk aware scheduling produces additional value beyond running the components separately, thereby supporting the claim that a unified pipeline is practically relevant and reproducible under the reported protocol. Table 14Unified pipeline ablation with a matched forecasting control and coordinated scheduling outcomes.HorizonMAE RMSE MAPE ReservedForecasting quality with PatchTST1 step0.3880.79131.3%–3 step0.3930.91825.8%–5 step0.4811.14620.6%– ConfigurationEnergy savings reduction Latency ms MAE vs baseline RMSE vs baseline CategoryScheduling outcomes and operational figuresPatchTST only11.8%14.5%20.1––ForecastingCOGEniX with SAC unified15.3%18.1%22.744.0%39.3%End to endPer zone RL cost deltas in USD positive is cost reductionZone 1+174.17Zone 2+208.47Zone 3+315.33Zone 4-44.87Zone 5+265.00 Unified pipeline ablation with a matched forecasting control and coordinated scheduling outcomes. The variation in cost deltas across the five zones in Table 14 reflects how the unified COGEniX pipeline adapts to heterogeneous energy behaviors rather than enforcing a one size fits all policy, where the Zones 1 through 3 exhibit strong positive cost reductions because their demand patterns and device parameters align well with the learned control policy, which exploits forecasted low tariff and low carbon intervals for battery charging and prioritizes discharge when grid import costs peak. These zones have typically shown a smoother load profiles and higher predictability in both consumption and environmental signals, enabling the Soft Actor Critic scheduler to act confidently on calibrated forecast variances and sustain efficient battery cycles with minimal risk penalties. Zone 5 also records a consistent gain owing to its moderate variability and sufficient storage flexibility, where the learned policy successfully co optimizes cost and emissions without frequent constraint violations. In contrast, Zone 4 reports a negative delta indicating a slight increase in cost relative to the baseline. This outcome can be attributed to higher forecast uncertainty, erratic load spikes and reduced controllable flexibility that limit the benefit of risk aware actions. The SAC controller in such a zone tends to adopt conservative behavior under elevated uncertainty, which can reduce energy savings but prevent larger instability. These discrepancies confirm that unified forecasting and control improve aggregate performance but that per-zone optimization remains necessary to capture local dynamics and constraints effectively. The results suggest that heterogeneity in building usage, thermal inertia and storage sizing affects the marginal value of reinforcement learning coordination, highlighting the importance of zone specific calibration and adaptive policy refinement in future extensions. Overall, the mix of gains and one isolated loss demonstrates that the unified pipeline is not a static optimizer but a context sensitive decision layer capable of differentiating between stable and volatile operational regimes to ensure reliability and safety in practical deployment. Conclusion and future work Industrial energy management requires intelligent, explainable and adaptive control that connects forecasting, scheduling and deployment. This study introduced COGEniX, a cohesive pipeline that integrates calibrated patch-based transformers for multi-horizon prediction, uncertainty- and constraint-aware reinforcement learning for carbon- and cost-sensitive scheduling and attribution tools that align model attention with per-decision explanations. Evaluation on CityLearn have adapted a microgrid-style industrial conditions, demonstrated that calibrated forecasts and risk-aware control translate into sustained cost and emissions reductions, while edge-ready deployment is enabled through ONNX conversion and quantization to meet latency and memory budgets. The dashboard and profiling suite close the loop from data to insight to action to assurance, providing operators with transparent KPIs and trust signals. Taken together, the pipeline advances industrial informatics by turning high-resolution telemetry into auditable schedules that align operational efficiency with decarbonization goals and are ready for field execution. Looking ahead, three research directions can extend this work. First, cross-domain transferability across sectors such as chemical processing, pulp and paper and district heating should be explored to test robustness under diverse constraints and asset mixes. Second, integration with physical models through physics-informed learning can couple first-principle equipment dynamics with data-driven modules, strengthening both safety and interpretability. Finally, multi-agent coordination offers an opportunity to extend the current policy toward distributed optimization across buildings, plants and storage resources under shared grid and carbon constraints. Together, these directions highlight pathways for scaling COGEniX into a generalizable framework for sustainable industrial energy management. Acknowledgements We gratefully acknowledge the developers of the CityLearn dataset51 and the contributors of the Kaggle multifloor smart building dataset52 for providing open and high-quality resources that enabled reproducible experimentation and validation in this study. Author contributions A.A.M. conceived the study, designed the methodology, performed the data collection and analysis, interpreted the results, and wrote the manuscript. Funding Princess Nourah bint Abdulrahman University Researchers Supporting Project number (PNURSP2025R510), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. Data availability The study uses the CityLearn51 and Kaggle multifloor smart building dataset52 datasets, both publicly available and containing time series for building-level energy management. Processed subsets and experimental configurations are available from the corresponding author upon reasonable request, dataset link are below: CityLearn dataset: CityLearn Link, Kaggle multifloor smart building dataset: Kaggle Link. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The study uses the CityLearn51 and Kaggle multifloor smart building dataset52 datasets, both publicly available and containing time series for building-level energy management. Processed subsets and experimental configurations are available from the corresponding author upon reasonable request, dataset link are below: CityLearn dataset: CityLearn Link, Kaggle multifloor smart building dataset: Kaggle Link.