Cite: R. Lyu, X. Su, E. Du, H. Guo, Q. Chen and C. Kang. "Efficient Scheduling of Discrete Industrial Processes through Continuous Modeling", IEEE Transactions on Smart Grid, in press.
Link: https://ieeexplore.ieee.org/document/11082423
Video Introduction: https://www.bilibili.com/video/BV1cdurzbEgi
This project provides research data and code for accelerating the application of RTN models in discrete industrial production processes. By using continuous modeling methods, we can improve scheduling efficiency and reduce computation time while maintaining the same accuracy as legacy RTN models.


- Decoupling from batches: Unlike legacy RTN that models each batch separately, cRTN uses continuous variables to represent resource quantities and task operations independent of batch numbers
- Unified formulation: Handles both non-flexible and flexible production processes in a unified manner
- Computational efficiency: Reduces binary variables from O(bST) to O(ST), where b is the number of batches, S is the number of stages, and T is the number of time slots
Resource Balance:
Task Execution:
Energy Consumption:
Where:
-
$N_{i, t}$ : Binary variable for task i starting at time t -
$\mu_{r, i, \theta}$ : Resource r consumed/generated by task i, θ time slots after start -
$R_{r, t}$ : Value of resource r at time t
Resource Balance:
Task Execution:
Uninterruptible Tasks:
Energy Consumption:
Where:
-
$D_{i, k, t}$ : Time duration that task i operates in state k within time slot t -
$g_{r, i, k}$ : Resource change rate for task i in state k -
$u_{i, t}$ : Binary variable for task processing state -
$P_{i, k}$ : Power consumption of task i in state k
- Solution time: 89% reduction compared to legacy RTN
- Scalability: Model size remains constant regardless of production targets
- Accuracy: Eliminates rounding errors inherent in legacy RTN models
- Energy cost: Up to 25% reduction in certain scenarios
add_crtn_cons.m
: Implements cRTN constraints including resource balance, task execution, and uninterruptible process constraintsadd_crtn_param_and_var.m
: Initializes continuous variables (D_{i,k,t}) and binary variables (u_{i,t}) for cRTNmain_flxb_crtn.m
: Main script for flexible cRTN model with power adjustment capabilitiesmain_small_case_crtn.m
: Demonstrates cRTN on small-scale cases for validationtest_crtn_gap.m
: Analyzes impact of optimality gap settings on solution qualitytest_crtn_heat.m
: Tests scalability with varying production targets (number of heats)
add_basic_rtn_cons.m
: Implements basic RTN constraints with binary task start variablesadd_flxb_rtn_cons.m
: Adds flexible power adjustment constraints to RTNadd_rtn_param_and_var.m
: Initializes binary variables (N_{i,t}) for task schedulingmain_basic_rtn.m
: Basic RTN model without power flexibilitymain_flxb_rtn.m
: Flexible RTN model with power adjustmentmain_flxb_rtn_small_case.m
: Small-scale RTN validation cases
cal_rmse_models.m
: Calculates RMSE between RTN and cRTN resultscal_rmse_models_gap.m
: Analyzes rounding error impact across different gap settingsplot_typical_load_profile_decp_crtn.m
: Generates load profile comparisons
load_parameters_zhang_rtn.xlsx
: Original steel plant parameters from Zhang et al.set_parameter_zhang_rtn.m
: Converts technical parameters to model parametersrt_hrl_lmps_202208.xlsx
: Real-time electricity prices from PJM market
% Set current directory to project root
cd('path/to/Efficient-Scheduling-of-Discrete-Industrial-Processes')
% Run main cRTN model
run('cRTN_model/main_flxb_crtn.m')
Key parameters in main_flxb_crtn.m
:
NOF_HEAT
: Number of production batches (default: 8)day_index
: Day index for electricity prices (1-15)gap
: Optimality gap for solver (default: 1e-4)
% Compare RTN vs cRTN performance
run('rtn_model/main_flxb_rtn.m') % Legacy RTN
run('cRTN_model/main_flxb_crtn.m') % Proposed cRTN
% Test with different production targets
run('cRTN_model/test_crtn_heat.m')
run('rtn_model/test_rtn_heat.m')
Model | Binary Variables | Solution Time | Energy Cost Reduction |
---|---|---|---|
Legacy RTN | O(bST) | 156.7 min | 6.9% |
cRTN | O(ST) | 17.1 min | 7.4% |
- RTN: Solution time increases exponentially with batch number
- cRTN: Solution time increases linearly and remains tractable up to 10+ batches
- RTN: 2.13% RMSE due to discrete time slot constraints
- cRTN: 0% RMSE through continuous variable formulation
- Batch-based processing: Products processed in discrete batches
- Uninterruptible tasks: Once started, tasks must complete without interruption
- Stage coupling: Sequential processing requirements between production stages
- Waiting time limits: Time constraints for intermediate product transfers
-
Continuous resource representation:
$R_{r,t}$ represents task progress (0-1) -
Duration-based task modeling:
$D_{i,k,t}$ replaces binary start variables - Unified flexible/non-flexible formulation: Single model handles both process types
- Virtual task introduction: Output/input tasks model batch completion events
- MATLAB R2024b or later
- YALMIP optimization toolbox
- Gurobi solver (V12.0.0 or later)
- Statistics and Machine Learning Toolbox
If you use this code in your research, please cite:
@article{lyu2024efficient,
title={Efficient Scheduling of Discrete Industrial Processes through Continuous Modeling},
author={Lyu, Ruike and Su, Xiangbo and Du, Ershun and Guo, Hongye and Chen, Qixin and Kang, Chongqing},
journal={IEEE Transactions on Smart Grid},
year={2025},
note={in press}
}
A: cRTN inherits RTN's graph-based modeling philosophy but introduces a fundamental innovation in variable definition. While traditional RTN uses discrete variables to represent both resource quantities and task operations, cRTN reformulates these using continuous variables while preserving the discrete nature of IPPs through carefully designed binary variables for task states.
A: There are two main reasons:
- When given sufficient computation time, both RTN and cRTN can find optimal solutions, resulting in similar energy costs. This validates that cRTN achieves better computational efficiency without compromising modeling accuracy.
- The magnitude of energy cost improvements through eliminating rounding errors depends on the time step length relative to process duration. With smaller time steps, the impact is less prominent.
A: Our analysis shows:
- RTN's solution time increases rapidly with stricter gap requirements (>1 hour when gap < 1e-2)
- cRTN maintains stable performance even with very strict gap requirements
- Given a 30-minute time limit, cRTN consistently achieves gaps < 1e-4, while RTN only reaches gaps around 1e-2
A: While clustering methods (like those used in Unit Commitment problems) could potentially help accelerate aggregated industrial demand response strategies involving multiple factories, they may not be directly applicable for individual factory scheduling. Our cRTN approach focuses on improving computational efficiency while maintaining accurate modeling of individual IPP constraints.
A: cRTN is a reformulation rather than a relaxation of the RTN model. While we model resources as continuous variables, we maintain the discrete nature of IPPs by introducing binary variables to represent task execution states. Our carefully designed constraints mathematically ensure that the model maintains strict feasibility without compromising the original problem's discrete characteristics.
本项目提供了加速RTN模型在离散工业生产过程中的应用的研究数据和代码。通过连续建模的方法,我们能够在保证精度的前提下减小模型复杂度,从而提高调度效率,减少计算时间。
- 与批次解耦: 与传统的按批次分别建模不同,cRTN使用连续变量表示资源数量和任务操作,与批次数量无关
- 统一表述: 以统一方式处理非灵活和灵活生产过程
- 计算效率: 将二进制变量从O(bST)减少到O(ST),其中b是批次数量,S是阶段数量,T是时间槽数量
资源平衡:
任务执行:
能耗:
资源平衡:
任务执行:
不可中断任务:
add_crtn_cons.m
: 实现cRTN约束条件,包括资源平衡、任务执行和不可中断过程约束add_crtn_param_and_var.m
: 初始化cRTN的连续变量(D_{i,k,t})和二进制变量(u_{i,t})main_flxb_crtn.m
: 具有功率调节能力的灵活cRTN模型主脚本main_small_case_crtn.m
: 在小规模案例上演示cRTN以进行验证test_crtn_gap.m
: 分析最优性间隙设置对解质量的影响test_crtn_heat.m
: 测试不同生产目标(炉次数量)的可扩展性
add_basic_rtn_cons.m
: 实现具有二进制任务开始变量的基本RTN约束add_flxb_rtn_cons.m
: 为RTN添加灵活功率调节约束add_rtn_param_and_var.m
: 初始化任务调度的二进制变量(N_{i,t})main_basic_rtn.m
: 无功率灵活性的基本RTN模型main_flxb_rtn.m
: 具有功率调节的灵活RTN模型
- 确保MATLAB已安装并配置正确。
- 将项目克隆到本地计算机。
- 在MATLAB中,将当前文件夹设置为项目的根目录。
- 运行
cRTN_model/main_flxb_crtn.m
脚本以开始调度计算。
- 参数设置:在
main_flxb_crtn.m
中,用户可以根据需要调整NOF_HEAT
、day_index
和gap
等参数。 - 结果保存:运行结束后,结果将保存在
results/
文件夹中,文件名中包含day_index
、NOF_HEAT
和gap
信息。 - 可视化:使用
visualize/plot_typical_load_profile_decp_crtn.m
脚本可以生成负荷曲线图,帮助分析结果。
A: cRTN继承了RTN的图形化建模理念,但在变量定义上进行了根本性的创新。传统的RTN使用离散变量来表示资源数量和任务操作,而cRTN通过精心设计的二进制变量来表示任务状态,将这些变量重新定义为连续变量,同时保留了IPP的离散特性。
A: 主要有两个原因:
- 在给予足够计算时间的情况下,RTN和cRTN都能找到最优解,导致相似的能源成本。这验证了cRTN在不影响建模精度的前提下,实现了更好的计算效率。
- 通过消除舍入误差来改善能源成本的幅度取决于时间步长相对于过程持续时间的长短。时间步长越小,影响越不明显。
A: 我们的分析显示:
- RTN的求解时间随着更严格的间隙要求迅速增加(当间隙<1e-2时,超过1小时)
- 即使在非常严格的间隙要求下,cRTN也能保持稳定的性能
- 在30分钟的时间限制下,cRTN始终能达到间隙<1e-4,而RTN只能达到约1e-2的间隙
A: 虽然聚类方法(如在单元承诺问题中使用的那些)可能有助于加速涉及多个工厂的工业需求响应策略,但它们可能不直接适用于单个工厂的调度。我们的cRTN方法专注于在保持单个IPP约束的准确建模的同时,提高计算效率。
A: cRTN是RTN模型的重新表述,而不是放松。虽然我们将资源建模为连续变量,但通过引入二进制变量来表示任务执行状态,保持了IPP的离散特性。我们精心设计的约束条件在数学上确保了模型在不影响原问题离散特性的情况下,严格保持可行性。