管网demo示例
一、对接密钥
apiKey:d013eb2347664cbbbe64a05f22b52667
secretKey:kY7g9K8eJZXYnBi7Jc4BpQSXiEqQA4YZaexjHfbslTwe4DkLT2ybpy1XWnZSTPiE
填入位置请参照对接demo示例
二、提交计算
POST http://cloud.keepsoft.net:30100/api/mcc/v1/app/sim
查看参数
{
"simulationConfig": {
"startTime": "2020-12-31 00:00:00",
"endTime": "2020-12-31 01:00:00",
"outputStep": "00:10:00"
}
}
三、获取结果
- 获取管网模拟结果
GET http://cloud.keepsoft.net:30100/api/results/v1/gw/getByTypeAndProperties?taskId=55434&beginFrame=0&endFrame=1&nodeps=d&pps=f&subps=rf
返回结果
{
"node": {
"d": {
"values": [
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.5000",
"0.0000",
"0.0000"
],
"ids": [
"531",
"2120",
"1761",
"2169",
"2163",
"2155",
"1628",
"1243",
"2196",
"2382",
"14",
"2183",
"2448",
"MH1",
"OTF1"
]
}
},
"pipeline": {
"f": {
"values": [
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000"
],
"ids": [
"g1",
"g2",
"g3",
"g7",
"g10",
"g11",
"g5",
"g6",
"140",
"g9",
"g8",
"g4",
"g12",
"CDT1"
]
}
},
"sub": {
"rf": {
"values": [
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000",
"0.0000"
],
"ids": [
"a",
"b",
"e",
"g",
"f",
"c",
"h",
"SCM1"
]
}
}
}
2.根据对象ID获取管网数据
GET
http://cloud.keepsoft.net:30100/api/results/v1/gw/mixQuery?taskId=55434&beginFrame=0&endFrame=1&nodeIds=1243&subIds=a&pipelineIds=g8
返回结果
[
{
"pipeline": {
"g8": "{\"vol\":0.0000,\"cap\":0.0000,\"d\":0.0000,\"idName\":\"g8\",\"f\":0.0000,\"vel\":0.0000}"
},
"sub": {
"a": "{\"inf\":0.0000,\"sd\":0.0000,\"rf\":0.0000,\"idName\":\"a\",\"sm\":0.0000,\"ep\":0.0000,\"ro\":0.0000,\"ge\":0.0000,\"gf\":0.0000}"
},
"node": {
"1243": "{\"inf\":0.0000,\"d\":0.5000,\"idName\":\"1243\",\"v\":0.0000,\"of\":0.0000,\"h\":1048.5000,\"lf\":0.0000}"
}
}
]
3.根据对象属性获取管网数据
GET
http://cloud.keepsoft.net:30100/api/results/v1/gw/getObjects?taskId=55434&beginFrame=0&endFrame=1&type=pipeline&properties=f
返回结果
[
{
"CDT1": {
"f": 0.0000
},
"g11": {
"f": 0.0000
},
"g10": {
"f": 0.0000
},
"g12": {
"f": 0.0000
},
"g1": {
"f": 0.0000
},
"g2": {
"f": 0.0000
},
"g3": {
"f": 0.0000
},
"140": {
"f": 0.0000
},
"g4": {
"f": 0.0000
},
"g5": {
"f": 0.0000
},
"g6": {
"f": 0.0000
},
"g7": {
"f": 0.0000
},
"g8": {
"f": 0.0000
},
"g9": {
"f": 0.0000
}
}
]
最后修改时间: 5 个月前