Skip to content
On this page

API参数说明

参数整体架构

json
{
    "clear_type": "clear_dayahead"/"clear_realtime"/"clear_standard",
    "config": {
        "onlyUseT1Offer": "true"/"false",
        "solverName": "cbc"/"cplex",
        "considerOutage": "true"/"false",
        "branchOutages": ["line01", "line02"],
        "nosAllCalcDA": 24,
        "nosAllCalcRT": 96,
        "nosPerCalcDA": 24,
        "nosPerCalcRT": 12,
        "nosRollingStepDA": 24,
        "nosRollingStepRT": 4,
        "timeIntervalDA": 1,
        "timeIntervalRT": 0.25,
        "resultIndexFormat": "timeIndex"/"timeNameIndex",
        "resultOutputFormat": "CSV"/"DICT",
        "dataLocation": "CSV"/"EXCEL"/"REMOTE",
        "stdOfferDivision": {
            "time":["t01","t02","t03","t04","t05","t06","t07","t08","t09","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24"],
            "ValleyOffer":["1","1","1","1","1","1","1","0","0","0","0","0","0","0","0","0","0","0","0","0","1","1","1","1",],
            "FlatOffer":["0","0","0","0","0","0","0","1","1","1","1","1","1","1","0","0","0","0","0","0","0","0","0","0"],
            "PeakOffer":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","1","1","1","1","1","0","0","0","0"],
            "BaseOffer":["1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1"]
        },
        "maxPrice": 1500,
        "minPrice": 0,
    }"",
    "caseroom_id": 100,
    "day": "D1",
    "dir_name": "xxx/三母线测试" / "xxx/三母线测试.xlsx",  
    "prepare_dayahead_result_dir": "xxx/prepare_dayahead_result.json", 
}
{
    "clear_type": "clear_dayahead"/"clear_realtime"/"clear_standard",
    "config": {
        "onlyUseT1Offer": "true"/"false",
        "solverName": "cbc"/"cplex",
        "considerOutage": "true"/"false",
        "branchOutages": ["line01", "line02"],
        "nosAllCalcDA": 24,
        "nosAllCalcRT": 96,
        "nosPerCalcDA": 24,
        "nosPerCalcRT": 12,
        "nosRollingStepDA": 24,
        "nosRollingStepRT": 4,
        "timeIntervalDA": 1,
        "timeIntervalRT": 0.25,
        "resultIndexFormat": "timeIndex"/"timeNameIndex",
        "resultOutputFormat": "CSV"/"DICT",
        "dataLocation": "CSV"/"EXCEL"/"REMOTE",
        "stdOfferDivision": {
            "time":["t01","t02","t03","t04","t05","t06","t07","t08","t09","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24"],
            "ValleyOffer":["1","1","1","1","1","1","1","0","0","0","0","0","0","0","0","0","0","0","0","0","1","1","1","1",],
            "FlatOffer":["0","0","0","0","0","0","0","1","1","1","1","1","1","1","0","0","0","0","0","0","0","0","0","0"],
            "PeakOffer":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","1","1","1","1","1","0","0","0","0"],
            "BaseOffer":["1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1"]
        },
        "maxPrice": 1500,
        "minPrice": 0,
    }"",
    "caseroom_id": 100,
    "day": "D1",
    "dir_name": "xxx/三母线测试" / "xxx/三母线测试.xlsx",  
    "prepare_dayahead_result_dir": "xxx/prepare_dayahead_result.json", 
}

参数详细说明

参数名称参数说明 参数取值是否必传
clear_type求解类型clear_dayahead 或 clear_realtime
onlyUseT1Offer读取offer信息时,是否只使用第一个时刻的报价True 或 False否, 后端默认取值是False, 但是如果每个时刻的报价不相同,必须传False
considerOutage是否考虑断线计算True 或 False否, 后端默认取值是False
branchOutages断线线路名称列表, 例如:["line01", "line02"]否, 后端默认取值是None
nosAllCalcDA日前总体统计时间戳数24否, 后端默认取值是24
nosAllCalcRT实时总体统计时间戳数96否, 后端默认取值是96
nosPerCalcDA日前每次计算使用的时间戳数需要大于nosRollingStepDA的取值否, 后端默认取值是24
nosPerCalcRT实时每次计算使用的时间戳数需要大于nosRollingStepRT的取值否, 后端默认取值是12
nosRollingStepDA日前每次计算后移动的时间戳数需要小于nosPerCalcDA的取值否, 后端默认取值是24
nosRollingStepRT实时每次计算后移动的时间戳数需要小于nosPerCalcRT的取值否, 后端默认取值是4
timeIntervalDA日前计算的时间序列间隔1否, 后端默认取值是1, 表示时间间隔为1小时
timeIntervalRT实时计算的时间序列间隔0.25否, 后端默认取值是0.25, 表示时间间隔为15分钟
resultIndexFormat结果数据的索引timeNameIndex 或 timeIndex否, 后端默认取值是timeIndex, 索引列只有time
resultOutputFormat结果数据的数据类型"CSV" 或 "DICT"否, 后端默认取值是CSV
dataLocation数据所在位置"CSV" 或 "EXCEL" 或 "REMOTE"否, 后端默认取值是REMOTE, 从远程获取数据, 结果数据也存到远程
stdOfferDivision标准合约分解包含time、ValleyOffer、FlatOffer、PeakOffer、BaseOffer五个字段, 每个字段的取值是0、1构成的列表否, 实时计算不需要传此参数, 日前计算必须传此参数
maxPrice母线的最高价格否, 后端默认取值是1500
minPrice母线的最低价格否, 后端默认取值是0
caseroom_id房间id否, 如果dataLocation为"CSV"和"EXCEL", 不需要传此参数;如果dataLocation为"REMOTE", 必须传此参数
day天数D1至D5否, 如果dataLocation为"CSV"和"EXCEL", 不需要传此参数;如果dataLocation为"REMOTE", 必须传此参数
dir_name案例信息所在的文件路径如果dataLocation为"CSV", 此参数代表csv文件所在的文件夹路径;如果dataLocation为"EXCEL", 此参数代表excel文件所在的文件路径否, 如果dataLocation为"CSV"和"EXCEL", 必须传此参数;如果dataLocation为"REMOTE", 不需要传此参数
prepare_dayahead_result_dir日前计算的结果文件的路径默认存储在案例信息所在的文件夹下否, 如果dataLocation为"CSV"和"EXCEL", 必须传此参数;如果dataLocation为"REMOTE", 不需要传此参数