重构现代化 FastAPI 后端项目框架
This commit is contained in:
79974
resources/20250309beibei_v2.inp
Normal file
79974
resources/20250309beibei_v2.inp
Normal file
File diff suppressed because it is too large
Load Diff
339615
resources/fx0217-mass injection.inp
Normal file
339615
resources/fx0217-mass injection.inp
Normal file
File diff suppressed because it is too large
Load Diff
43684
resources/history_pattern_flow.csv
Normal file
43684
resources/history_pattern_flow.csv
Normal file
File diff suppressed because it is too large
Load Diff
40289
resources/model22_1223.inp
Normal file
40289
resources/model22_1223.inp
Normal file
File diff suppressed because it is too large
Load Diff
168
resources/requirements2.txt
Normal file
168
resources/requirements2.txt
Normal file
@@ -0,0 +1,168 @@
|
||||
annotated-doc==0.0.4
|
||||
annotated-types==0.7.0
|
||||
anyio==4.8.0
|
||||
attrs==25.4.0
|
||||
Authlib==1.6.6
|
||||
beartype==0.22.9
|
||||
beautifulsoup4==4.13.4
|
||||
cachetools==6.2.4
|
||||
certifi==2024.8.30
|
||||
cffi==2.0.0
|
||||
chardet==5.2.0
|
||||
charset-normalizer==3.4.0
|
||||
click==8.1.8
|
||||
cloudpickle==3.1.2
|
||||
colorama==0.4.6
|
||||
contourpy==1.3.2
|
||||
cryptography==46.0.3
|
||||
cycler==0.12.1
|
||||
cyclopts==4.5.0
|
||||
Cython==3.0.12
|
||||
diskcache==5.6.3
|
||||
distro==1.9.0
|
||||
dnspython==2.8.0
|
||||
docstring_parser==0.17.0
|
||||
docutils==0.21.2
|
||||
dotenv==0.9.9
|
||||
ecos==2.0.14
|
||||
email-validator==2.3.0
|
||||
esda==2.7.0
|
||||
et_xmlfile==2.0.0
|
||||
exceptiongroup==1.3.1
|
||||
fakeredis==2.33.0
|
||||
fastapi==0.128.0
|
||||
fastmcp==2.9.2
|
||||
fonttools==4.58.0
|
||||
future==0.18.3
|
||||
GeoAlchemy2==0.17.1
|
||||
geopandas==1.0.1
|
||||
greenlet==3.1.1
|
||||
h11==0.14.0
|
||||
httpcore==1.0.7
|
||||
httpx==0.28.1
|
||||
httpx-sse==0.4.3
|
||||
idna==3.10
|
||||
importlib_metadata==8.7.1
|
||||
influxdb-client==1.48.0
|
||||
iniconfig==2.0.0
|
||||
jaraco.classes==3.4.0
|
||||
jaraco.context==6.1.0
|
||||
jaraco.functools==4.4.0
|
||||
jeepney==0.9.0
|
||||
Jinja2==3.1.6
|
||||
jiter==0.8.2
|
||||
joblib==1.5.0
|
||||
jsonschema==4.26.0
|
||||
jsonschema-path==0.3.4
|
||||
jsonschema-specifications==2025.9.1
|
||||
keyring==25.7.0
|
||||
Kivy==2.3.0
|
||||
Kivy-Garden==0.1.5
|
||||
kiwisolver==1.4.8
|
||||
libpysal==4.13.0
|
||||
lupa==2.6
|
||||
mapclassify==2.8.1
|
||||
markdown-it-py==3.0.0
|
||||
MarkupSafe==3.0.3
|
||||
matplotlib==3.10.3
|
||||
mcp==1.9.4
|
||||
mdurl==0.1.2
|
||||
more-itertools==10.8.0
|
||||
msgpack==1.1.0
|
||||
networkx==3.4.2
|
||||
numexpr==2.14.1
|
||||
numpy==1.26.2
|
||||
openai==1.63.0
|
||||
openapi-pydantic==0.5.1
|
||||
openpyxl==3.1.5
|
||||
opentelemetry-api==1.39.1
|
||||
opentelemetry-exporter-prometheus==0.60b1
|
||||
opentelemetry-instrumentation==0.60b1
|
||||
opentelemetry-sdk==1.39.1
|
||||
opentelemetry-semantic-conventions==0.60b1
|
||||
osqp==1.0.5
|
||||
packaging==25.0
|
||||
pandas==2.2.3
|
||||
pathable==0.4.4
|
||||
pathvalidate==3.3.1
|
||||
pillow==11.2.1
|
||||
pipdeptree==2.30.0
|
||||
platformdirs==4.3.8
|
||||
pluggy==1.5.0
|
||||
pointpats==2.5.1
|
||||
prometheus_client==0.24.1
|
||||
psycopg==3.2.5
|
||||
psycopg-binary==3.2.5
|
||||
psycopg-pool==3.3.0
|
||||
psycopg2==2.9.10
|
||||
PuLP==3.1.1
|
||||
py-key-value-aio==0.3.0
|
||||
py-key-value-shared==0.3.0
|
||||
py-linq==1.4.0
|
||||
pyarmor==9.0.7
|
||||
pyarmor.cli.core==7.6.4
|
||||
pybind11-stubgen==2.5.1
|
||||
pycparser==2.23
|
||||
pydantic==2.10.6
|
||||
pydantic-settings==2.12.0
|
||||
pydantic_core==2.27.2
|
||||
pydevd-pycharm==243.16718.36
|
||||
pydocket==0.16.6
|
||||
Pygments==2.18.0
|
||||
PyJWT==2.10.1
|
||||
pykalman==0.10.2
|
||||
# pymetis @ file:///D:/bld/pymetis_1762455149640/work 通过 conda 安装 pymetis,避免编译问题 conda install -c conda-forge pymetis
|
||||
pynvim==0.5.0
|
||||
pyogrio==0.11.0
|
||||
pyparsing==3.2.3
|
||||
pyperclip==1.11.0
|
||||
pyproj==3.7.1
|
||||
pytest==8.3.5
|
||||
python-dateutil==2.9.0.post0
|
||||
python-dotenv==1.2.1
|
||||
python-json-logger==4.0.0
|
||||
python-multipart==0.0.20
|
||||
pytz==2025.2
|
||||
PyYAML==6.0.3
|
||||
pyzmq==26.2.1
|
||||
reactivex==4.0.4
|
||||
redis==5.2.1
|
||||
referencing==0.36.2
|
||||
requests==2.32.3
|
||||
rich==14.2.0
|
||||
rich-rst==1.3.2
|
||||
rpds-py==0.30.0
|
||||
rtree==1.4.0
|
||||
schedule==1.2.2
|
||||
scikit-base==0.12.6
|
||||
scikit-fuzzy==0.5.0
|
||||
scikit-learn==1.6.1
|
||||
scikit-survival==0.26.0
|
||||
scipy==1.15.2
|
||||
SecretStorage==3.5.0
|
||||
setuptools==80.7.1
|
||||
shapely==2.1.0
|
||||
shellingham==1.5.4
|
||||
six==1.17.0
|
||||
sniffio==1.3.1
|
||||
sortedcontainers==2.4.0
|
||||
soupsieve==2.7
|
||||
spaghetti==1.7.6
|
||||
spopt==0.6.1
|
||||
SQLAlchemy==2.0.41
|
||||
sse-starlette==3.0.4
|
||||
starlette==0.50.0
|
||||
threadpoolctl==3.6.0
|
||||
tqdm==4.67.1
|
||||
typer==0.21.1
|
||||
typing-inspection==0.4.0
|
||||
typing_extensions==4.12.2
|
||||
tzdata==2025.2
|
||||
urllib3==2.2.3
|
||||
uvicorn==0.34.0
|
||||
websockets==16.0
|
||||
wheel==0.45.1
|
||||
wntr==1.3.2
|
||||
wrapt==1.17.3
|
||||
zipp==3.23.0
|
||||
zmq==0.0.0
|
||||
138
resources/scada_info.csv
Normal file
138
resources/scada_info.csv
Normal file
@@ -0,0 +1,138 @@
|
||||
id,type,associated_element_id,associated_pattern,associated_pipe_flow_id,associated_source_outflow_id1,associated_source_outflow_id2,associated_source_outflow_id3,associated_source_outflow_id4,associated_source_outflow_id5,API_query_id,transmission_mode,transmission_frequency,reliability,X_coor,Y_coor
|
||||
ZBBDJSCP000002,reservoir_liquid_level,ZBBDJSCP000002,HighPressure,,,,,,,2497,realtime,0:01:00,1,106.414403,29.83252977
|
||||
R00003,reservoir_liquid_level,R00003,LowPressure,,,,,,,2571,realtime,0:01:00,1,106.414403,29.83252977
|
||||
ZBBDTJSC000002,tank_liquid_level,ZBBDTJSC000002,,,,,,,,4780,realtime,0:01:00,1,106.377934,29.80097177
|
||||
ZBBDTJSC000001,tank_liquid_level,ZBBDTJSC000001,,,,,,,,9774,realtime,0:01:00,1,106.414257,29.82031872
|
||||
PU00000,fixed_pump,PU00000,1#,,,,,,,2747,realtime,0:01:00,1,106.414403,29.83252977
|
||||
PU00001,fixed_pump,PU00001,2#,,,,,,,2776,realtime,0:01:00,1,106.414403,29.83252977
|
||||
PU00002,fixed_pump,PU00002,3#,,,,,,,2730,realtime,0:01:00,1,106.414403,29.83252977
|
||||
PU00003,fixed_pump,PU00003,4#,,,,,,,2787,realtime,0:01:00,1,106.414403,29.83252977
|
||||
PU00004,variable_pump,PU00004,5#,,,,,,,2500,realtime,0:01:00,1,106.414403,29.83252977
|
||||
PU00005,variable_pump,PU00005,6#,,,,,,,2502,realtime,0:01:00,1,106.414403,29.83252977
|
||||
PU00006,variable_pump,PU00006,7#,,,,,,,2504,realtime,0:01:00,1,106.414403,29.83252977
|
||||
ZBBGXSZW000377,source_outflow,ZBBGXSZW000377,DN900,,ZBBGXSZW000377,,,,,2498,realtime,0:01:00,1,106.4194993,29.83772834
|
||||
P17021,source_outflow,P17021,DN500,,P17021,,,,,3854,realtime,0:01:00,1,106.4194939,29.83810336
|
||||
P16504,source_outflow,P16504,DN1000,,P16504,,,,,3853,realtime,0:01:00,1,106.4195338,29.83781925
|
||||
ZBBGXSZK001071,pipe_flow,ZBBGXSZK001071,BianDianZhan,,ZBBGXSZW000377,P17021,,,,9521,non_realtime,6:00:00,1,106.4003826,29.81743895
|
||||
ZBBGXSZK001163,pipe_flow,ZBBGXSZK001163,BeiNanDaDao,,ZBBGXSZW000377,P17021,,,,9478,non_realtime,6:00:00,1,106.3994217,29.80947624
|
||||
ZBBGXSZK001105,pipe_flow,ZBBGXSZK001105,TianShengLiJie,,ZBBGXSZW000377,P17021,,,,9506,non_realtime,6:00:00,1,106.4180443,29.81625954
|
||||
P10755,pipe_flow,P10755,XueYuanXiaoQu,,ZBBGXSZW000377,P17021,,,,9497,non_realtime,6:00:00,1,106.4131703,29.81316079
|
||||
ZBBGXSZK001128,pipe_flow,ZBBGXSZK001128,YunHuaLu,,ZBBGXSZW000377,P17021,,,,9480,non_realtime,6:00:00,1,106.3948247,29.80702128
|
||||
P10839,pipe_flow,P10839,GaoJiaQiao,,ZBBGXSZW000377,P17021,,,,9507,non_realtime,6:00:00,1,106.4079379,29.82356299
|
||||
ZBBGXSZK001079,pipe_flow,ZBBGXSZK001079,LuZuoFuLuXiaDuan,,ZBBGXSZW000377,P17021,,,,9487,non_realtime,6:00:00,1,106.3922472,29.80343211
|
||||
ZBBGXSZK001096(L),pipe_flow,ZBBGXSZK001096(L),TianRunCheng,,ZBBGXSZW000377,P17021,,,,9485,non_realtime,6:00:00,1,106.3907546,29.80015062
|
||||
P15959,pipe_flow,P15959,CaoJiaBa,,ZBBGXSZW000377,P17021,,,,9505,non_realtime,6:00:00,1,106.3664514,29.76674381
|
||||
ZBBGXSZK001031,pipe_flow,ZBBGXSZK001031,PuLingChang,,ZBBGXSZW000377,P17021,,,,9481,non_realtime,6:00:00,1,106.3807941,29.75983691
|
||||
P12544,pipe_flow,P12544,QiLongXiaoQu,,ZBBGXSZW000377,P17021,,,,9524,non_realtime,6:00:00,1,106.367557,29.76592301
|
||||
ZBBGXTYK003616,pipe_flow,ZBBGXTYK003616,TuanXiao,,ZBBGXSZW000377,P17021,,,,9498,non_realtime,6:00:00,1,106.3741092,29.77647684
|
||||
ZBBGXTYK003427,pipe_flow,ZBBGXTYK003427,ChengBeiCaiShiKou,,P16504,,,,,9488,non_realtime,6:00:00,1,106.4211904,29.8337277
|
||||
ZBBGXSZK001775,pipe_flow,ZBBGXSZK001775,WenXingShe,,P16504,,,,,9482,non_realtime,6:00:00,1,106.4296384,29.83322552
|
||||
ZBBGXTYK003392,pipe_flow,ZBBGXTYK003392,YueLiangTianBBGJCZ,,P16504,,,,,9510,non_realtime,6:00:00,1,106.4338386,29.82316156
|
||||
ZBBGXSZK001166,pipe_flow,ZBBGXSZK001166,YueLiangTian,,P16504,,,,,9486,non_realtime,6:00:00,1,106.4324165,29.82465186
|
||||
P13961,pipe_flow,P13961,YueLiangTian200,,P16504,,,,,9520,non_realtime,6:00:00,1,106.4256,29.8222
|
||||
ZBBGXTYK003069,pipe_flow,ZBBGXTYK003069,ChengTaoChang,,P16504,,,,,9479,non_realtime,6:00:00,1,106.431,29.8153
|
||||
ZBBGXTYK003355,pipe_flow,ZBBGXTYK003355,HuoCheZhan,,P16504,,,,,9518,non_realtime,6:00:00,1,106.4284178,29.80932951
|
||||
ZBBGXSZW000335,pipe_flow,ZBBGXSZW000335,LiangKu,,P16504,,,,,9512,non_realtime,6:00:00,1,106.4241088,29.80023184
|
||||
ZBBGXSZK001957,pipe_flow,ZBBGXSZK001957,QunXingLu,,P16504,,,,,9489,non_realtime,6:00:00,1,106.4302597,29.81089267
|
||||
P05940,pipe_flow,P05940,TuanShanBaoZhongShiHua,,ZBBGXSZW000377,P17021,,,,9535,non_realtime,6:00:00,1,106.4168586,29.83510228
|
||||
ZBBGXSZK002419,pipe_flow,ZBBGXSZK002419,XieMa,,ZBBGXSZW000377,P17021,,,,7423,non_realtime,6:00:00,1,106.3893687,29.79893615
|
||||
P16512,pipe_flow,P16512,BeiWenQuanJiuHaoErQi,,ZBBGXSZW000377,P17021,,,,,non_realtime,6:00:00,1,106.4077965,29.82305305
|
||||
GSD230117133902A0620C9E4A2F,pipe_flow,GSD230117133902A0620C9E4A2F,LaiYinHuSiQi,,ZBBGXSZW000377,P17021,,,,,non_realtime,6:00:00,1,106.3793446,29.80116239
|
||||
ZBBGXSZK000647,pipe_flow,ZBBGXSZK000647,JiuYuanErTongYiYuan,,P16504,,,,,,non_realtime,6:00:00,1,106.4256984,29.82186294
|
||||
ZBBGXSZK000247,pipe_flow,ZBBGXSZK000247,TangDouHua,,P16504,,,,,,non_realtime,6:00:00,1,106.4351488,29.83505307
|
||||
P16773,pipe_flow,P16773,TaiJiBinJiangErQi(SanJi),,P16504,,,,,9531,non_realtime,6:00:00,1,106.4453773,29.82620736
|
||||
ZBBGXSZK002373,pipe_flow,ZBBGXSZK002373,ZhangDouHua,,P16504,,,,,,non_realtime,6:00:00,1,106.4404323,29.82998935
|
||||
P12942,pipe_flow,P12942,JinYunXiaoQuDN400,,P16504,,,,,,non_realtime,6:00:00,1,106.3865726,29.80903033
|
||||
P16769,pipe_flow,P16769,ShiYanCun,,P16504,,,,,9492,non_realtime,6:00:00,1,106.4307834,29.82932991
|
||||
ZBBDTZDP004690,demand,ZBBDTZDP004690,ChuanYiJiXiao,,ZBBGXSZW000377,P17021,,,,9501,non_realtime,6:00:00,1,106.4092,29.8601
|
||||
ZBBDFQJL000025,demand,ZBBDFQJL000025,BeiQuanHuaYuan,,ZBBGXSZW000377,P17021,,,,9405,non_realtime,6:00:00,1,106.4121,29.8275
|
||||
ZBBDFQJL000030,demand,ZBBDFQJL000030,ZhuangYuanFuDi,,ZBBGXSZW000377,P17021,,,,9509,non_realtime,6:00:00,1,106.4021,29.8021
|
||||
ZBBDFQJL000036,demand,ZBBDFQJL000036,JingNingJiaYuan,,ZBBGXSZW000377,P17021,,,,9494,non_realtime,6:00:00,1,106.3987,29.8095
|
||||
ZBBDFQJL000034,demand,ZBBDFQJL000034,308,,ZBBGXSZW000377,P17021,,,,9504,non_realtime,6:00:00,1,106.4008,29.8166
|
||||
ZBBDFQJL000032,demand,ZBBDFQJL000032,JiaYinYuan,,ZBBGXSZW000377,P17021,,,,9513,non_realtime,6:00:00,1,106.3889,29.8048
|
||||
ZBBDFQJL000031,demand,ZBBDFQJL000031,XinChengGuoJi,,ZBBGXSZW000377,P17021,,,,9517,non_realtime,6:00:00,1,106.389,29.805
|
||||
ZBBDFQJL000033,demand,ZBBDFQJL000033,YiJingBeiChen,,ZBBGXSZW000377,P17021,,,,9519,non_realtime,6:00:00,1,106.3906,29.8041
|
||||
ZBBDFQJL000035,demand,ZBBDFQJL000035,ZhongYangXinDu,,ZBBGXSZW000377,P17021,,,,9522,non_realtime,6:00:00,1,106.3937,29.8044
|
||||
J06186,demand,J06186,XinHaiJiaYuan,,ZBBGXSZW000377,P17021,,,,9525,non_realtime,6:00:00,1,106.4067,29.8278
|
||||
ZBBDFQJL000052,demand,ZBBDFQJL000052,DongFengJie,,ZBBGXSZW000377,P17021,,,,9526,non_realtime,6:00:00,1,106.3678,29.766
|
||||
ZBBDFQJL000049,demand,ZBBDFQJL000049,DingYaXinYu,,ZBBGXSZW000377,P17021,,,,9500,non_realtime,6:00:00,1,106.3674,29.7654
|
||||
GSD2302160925534D50CD17540D_E,demand,GSD2302160925534D50CD17540D_End,ZiYunTai,,ZBBGXSZW000377,P17021,,,,9529,non_realtime,6:00:00,1,106.387,29.7884
|
||||
ZBBDFQJL000050,demand,ZBBDFQJL000050,XieMaGuangChang,,ZBBGXSZW000377,P17021,,,,9477,non_realtime,6:00:00,1,106.3652,29.7657
|
||||
GSD2307192058578BCE265C6EA8,demand,GSD2307192058578BCE265C6EA8,YongJinFu,,ZBBGXSZW000377,P17021,,,,9534,non_realtime,6:00:00,1,106.3831,29.781
|
||||
ZBBDFQJL000028,demand,ZBBDFQJL000028,PanXiMingDu,,P16504,,,,,9514,non_realtime,6:00:00,1,106.4223,29.821
|
||||
GSD230113095617514F4A2066D7_E,demand,GSD230113095617514F4A2066D7_End,WanKeJinYuHuaFuGaoCeng,,P16504,,,,,9528,non_realtime,6:00:00,1,106.4228,29.8113
|
||||
ZBBDFQJL000014,demand,ZBBDFQJL000014,KeJiXiao,,P16504,,,,,9503,non_realtime,6:00:00,1,106.4332,29.8258
|
||||
ZBBDFQJL000016,demand,ZBBDFQJL000016,LuGouQiao,,P16504,,,,,9527,non_realtime,6:00:00,1,106.437,29.8285
|
||||
ZBBDFQJL000057,demand,ZBBDFQJL000057,LongJiangHuaYuan,,P16504,,,,,9495,non_realtime,6:00:00,1,106.4316,29.8309
|
||||
ZBBDFQJL000012,demand,ZBBDFQJL000012,LaoQiZhongDui,,P16504,,,,,9496,non_realtime,6:00:00,1,106.433,29.8239
|
||||
ZBBDFQJL000007,demand,ZBBDFQJL000007,TianQiDaSha,,P16504,,,,,9502,non_realtime,6:00:00,1,106.4346,29.8319
|
||||
ZBBDFQJL000013,demand,ZBBDFQJL000013,TianShengPaiChuSuo,,P16504,,,,,9499,non_realtime,6:00:00,1,106.4253,29.8222
|
||||
ZBBDFQJL000037,demand,ZBBDFQJL000037,TianShengShangPin,,P16504,,,,,9493,non_realtime,6:00:00,1,106.4305,29.8264
|
||||
ZBBDFQJL000009,demand,ZBBDFQJL000009,JiaoTang,,P16504,,,,,9511,non_realtime,6:00:00,1,106.4402,29.826
|
||||
ZBBDFQJL000011,demand,ZBBDFQJL000011,RenMinHuaYuan,,P16504,,,,,9508,non_realtime,6:00:00,1,106.4359,29.8238
|
||||
ZBBDFQJL000005,demand,ZBBDFQJL000005,TaiJiBinJiangYiQi,,P16504,,,,,9484,non_realtime,6:00:00,1,106.4443,29.8245
|
||||
ZBBDFQJL000006,demand,ZBBDFQJL000006,TianQiHuaYuan,,P16504,,,,,9523,non_realtime,6:00:00,1,106.4361,29.8189
|
||||
ZBBDFQJL000004,demand,ZBBDFQJL000004,TaiJiBinJiangErQi,,P16504,,,,,9515,non_realtime,6:00:00,1,106.4443,29.8297
|
||||
ZBBDFQJL000039,demand,ZBBDFQJL000039,122Zhong,,P16504,,,,,9516,non_realtime,6:00:00,1,106.4284,29.8109
|
||||
GSD230112144241F42EF6065148_E,demand,GSD230112144241F42EF6065148_End,WanKeJinYuHuaFuYangFang,,P16504,,,,,9530,non_realtime,6:00:00,1,106.4263,29.8154
|
||||
J06194,pressure,J06194,,,,,,,,2514,realtime,0:01:00,1,106.4195183,29.83782213
|
||||
J06190,pressure,J06190,,,,,,,,2510,realtime,0:01:00,1,106.4194644,29.83781489
|
||||
ZBBDFQJL000025_p,pressure,ZBBDFQJL000025,,,,,,,,9536,non_realtime,6:00:00,1,106.4120554,29.82753087
|
||||
ZBBDFQJL000050_p,pressure,ZBBDFQJL000050,,,,,,,,9537,non_realtime,6:00:00,1,106.3651228,29.76558811
|
||||
ZBBDFQJL000018_p,pressure,ZBBDFQJL000018,,,,,,,,9538,non_realtime,6:00:00,1,106.3994298,29.809484
|
||||
ZBBDFQJL000002_p,pressure,ZBBDFQJL000002,,,,,,,,9539,non_realtime,6:00:00,1,106.4309932,29.81534215
|
||||
ZBBDFQJL000019_p,pressure,ZBBDFQJL000019,,,,,,,,9540,non_realtime,6:00:00,1,106.3948196,29.80700511
|
||||
ZBBDFQJL000047_p,pressure,ZBBDFQJL000047,,,,,,,,9541,non_realtime,6:00:00,1,106.3807979,29.75983831
|
||||
ZBBDFQJL000001_p,pressure,ZBBDFQJL000001,,,,,,,,9542,non_realtime,6:00:00,1,106.4296304,29.83324097
|
||||
ZBBDTZDP006510_p,pressure,ZBBDTZDP006510,,,,,,,,9543,non_realtime,6:00:00,1,106.4143,29.8204
|
||||
ZBBDFQJL000005_p,pressure,ZBBDFQJL000005,,,,,,,,9544,non_realtime,6:00:00,1,106.4442613,29.824473
|
||||
ZBBDFQJL000023_p,pressure,ZBBDFQJL000023,,,,,,,,9545,non_realtime,6:00:00,1,106.3907545,29.80014626
|
||||
ZBBDPQFM000144_p,pressure,ZBBDPQFM000144,,,,,,,,9546,non_realtime,6:00:00,1,106.4324087,29.82466081
|
||||
ZBBDFQJL000022_p,pressure,ZBBDFQJL000022,,,,,,,,9547,non_realtime,6:00:00,1,106.3922466,29.80343116
|
||||
ZBBDFQJL000026_p,pressure,ZBBDFQJL000026,,,,,,,,9548,non_realtime,6:00:00,1,106.4211902,29.83372698
|
||||
ZBBDFQJL000027_p,pressure,ZBBDFQJL000027,,,,,,,,9549,non_realtime,6:00:00,1,106.4302659,29.81087884
|
||||
ZBBDFQJL000020_p,pressure,ZBBDFQJL000020,,,,,,,,9551,non_realtime,6:00:00,1,106.4069939,29.81230584
|
||||
ZBBDFQJL000015_p,pressure,ZBBDFQJL000015,,,,,,,,9552,non_realtime,6:00:00,1,106.4307918,29.82933519
|
||||
ZBBDFQJL000037_p,pressure,ZBBDFQJL000037,,,,,,,,9553,non_realtime,6:00:00,1,106.4305041,29.82636702
|
||||
ZBBDFQJL000036_p,pressure,ZBBDFQJL000036,,,,,,,,9554,non_realtime,6:00:00,1,106.3987322,29.80947672
|
||||
ZBBDFQJL000057_p,pressure,ZBBDFQJL000057,,,,,,,,9555,non_realtime,6:00:00,1,106.4315801,29.83086849
|
||||
ZBBDFQJL000012_p,pressure,ZBBDFQJL000012,,,,,,,,9556,non_realtime,6:00:00,1,106.4330174,29.82386587
|
||||
ZBBDFQJL000021_p,pressure,ZBBDFQJL000021,,,,,,,,9557,non_realtime,6:00:00,1,106.413164,29.81315876
|
||||
ZBBDFQJL000045_p,pressure,ZBBDFQJL000045,,,,,,,,9558,non_realtime,6:00:00,1,106.3741065,29.77646525
|
||||
ZBBDFQJL000013_p,pressure,ZBBDFQJL000013,,,,,,,,9559,non_realtime,6:00:00,1,106.4253422,29.82216074
|
||||
ZBBDFQJL000049_p,pressure,ZBBDFQJL000049,,,,,,,,9560,non_realtime,6:00:00,1,106.3673675,29.76535923
|
||||
ZBBDFQJL000053_p,pressure,ZBBDFQJL000053,,,,,,,,9561,non_realtime,6:00:00,1,106.4091385,29.86001467
|
||||
ZBBDFQJL000007_p,pressure,ZBBDFQJL000007,,,,,,,,9562,non_realtime,6:00:00,1,106.4345765,29.83187159
|
||||
ZBBDFQJL000014_p,pressure,ZBBDFQJL000014,,,,,,,,9563,non_realtime,6:00:00,1,106.4332467,29.82578845
|
||||
ZBBDFQJL000034_p,pressure,ZBBDFQJL000034,,,,,,,,9564,non_realtime,6:00:00,1,106.4008362,29.81662925
|
||||
ZBBDFQJL000051_p,pressure,ZBBDFQJL000051,,,,,,,,9565,non_realtime,6:00:00,1,106.3664647,29.76674002
|
||||
ZBBDFQJL000029_p,pressure,ZBBDFQJL000029,,,,,,,,9566,non_realtime,6:00:00,1,106.4180536,29.81625021
|
||||
ZBBDFQJL000038_p,pressure,ZBBDFQJL000038,,,,,,,,9567,non_realtime,6:00:00,1,106.4079197,29.82356534
|
||||
ZBBDFQJL000011_p,pressure,ZBBDFQJL000011,,,,,,,,9568,non_realtime,6:00:00,1,106.4359412,29.82375869
|
||||
ZBBDFQJL000030_p,pressure,ZBBDFQJL000030,,,,,,,,9569,non_realtime,6:00:00,1,106.4021179,29.80210907
|
||||
ZBBDFQJL000024_p,pressure,ZBBDFQJL000024,,,,,,,,9570,non_realtime,6:00:00,1,106.4338355,29.82316474
|
||||
ZBBDFQJL000009_p,pressure,ZBBDFQJL000009,,,,,,,,9571,non_realtime,6:00:00,1,106.4402264,29.825971
|
||||
ZBBDFQJL000042_p,pressure,ZBBDFQJL000042,,,,,,,,9572,non_realtime,6:00:00,1,106.4241609,29.80026986
|
||||
ZBBDFQJL000032_p,pressure,ZBBDFQJL000032,,,,,,,,9573,non_realtime,6:00:00,1,106.3889269,29.80481683
|
||||
ZBBDFQJL000028_p,pressure,ZBBDFQJL000028,,,,,,,,9574,non_realtime,6:00:00,1,106.4222702,29.82103146
|
||||
ZBBDFQJL000004_p,pressure,ZBBDFQJL000004,,,,,,,,9575,non_realtime,6:00:00,1,106.4442663,29.82966834
|
||||
ZBBDFQJL000039_p,pressure,ZBBDFQJL000039,,,,,,,,9576,non_realtime,6:00:00,1,106.4284664,29.81088051
|
||||
ZBBDFQJL000031_p,pressure,ZBBDFQJL000031,,,,,,,,9577,non_realtime,6:00:00,1,106.3890122,29.80504763
|
||||
ZBBDFQJL000043_p,pressure,ZBBDFQJL000043,,,,,,,,9578,non_realtime,6:00:00,1,106.4284118,29.80929921
|
||||
ZBBDFQJL000033_p,pressure,ZBBDFQJL000033,,,,,,,,9579,non_realtime,6:00:00,1,106.3906102,29.80408746
|
||||
ZBBDFQJL000010_p,pressure,ZBBDFQJL000010,,,,,,,,9580,non_realtime,6:00:00,1,106.4256312,29.82218279
|
||||
ZBBDFQJL000041_p,pressure,ZBBDFQJL000041,,,,,,,,9581,non_realtime,6:00:00,1,106.4003806,29.81743804
|
||||
ZBBDFQJL000035_p,pressure,ZBBDFQJL000035,,,,,,,,9582,non_realtime,6:00:00,1,106.3937231,29.80441954
|
||||
ZBBDFQJL000006_p,pressure,ZBBDFQJL000006,,,,,,,,9583,non_realtime,6:00:00,1,106.4361409,29.81886211
|
||||
ZBBDFQJL000048_p,pressure,ZBBDFQJL000048,,,,,,,,9584,non_realtime,6:00:00,1,106.367557,29.76592299
|
||||
J06186_p,pressure,J06186,,,,,,,,9585,non_realtime,6:00:00,1,106.4069218,29.82794812
|
||||
ZBBDFQJL000052_p,pressure,ZBBDFQJL000052,,,,,,,,9586,non_realtime,6:00:00,1,106.3678407,29.76602511
|
||||
ZBBDFQJL000016_p,pressure,ZBBDFQJL000016,,,,,,,,9587,non_realtime,6:00:00,1,106.4369887,29.82851071
|
||||
GSD230113095617514F4A2066D7_E_p,pressure,GSD230113095617514F4A2066D7_End,,,,,,,,9588,non_realtime,6:00:00,1,106.4227365,29.811344
|
||||
GSD2302160925534D50CD17540D_E_p,pressure,GSD2302160925534D50CD17540D_End,,,,,,,,9589,non_realtime,6:00:00,1,106.3870281,29.78840589
|
||||
GSD230112144241F42EF6065148_E_p,pressure,GSD230112144241F42EF6065148_End,,,,,,,,9590,non_realtime,6:00:00,1,106.4262502,29.81534482
|
||||
J06198_p,pressure,J06198,,,,,,,,9591,non_realtime,6:00:00,1,106.4454034,29.82619719
|
||||
J06197_p,pressure,J06197,,,,,,,,9592,non_realtime,6:00:00,1,106.4380272,29.82741219
|
||||
ZBBDYJGP000127_p,pressure,ZBBDYJGP000127,,,,,,,,9593,non_realtime,6:00:00,1,106.4006775,29.81822706
|
||||
GSD2307192058578BCE265C6EA8_p,pressure,GSD2307192058578BCE265C6EA8,,,,,,,,9594,non_realtime,6:00:00,1,106.383014,29.78097074
|
||||
ZBBDTZDP008185_p,pressure,ZBBDTZDP008185,,,,,,,,9595,non_realtime,6:00:00,1,106.4168547,29.83510138
|
||||
|
36
resources/sql/create/0.base.sql
Normal file
36
resources/sql/create/0.base.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
create type _node_type as enum ('junction', 'reservoir', 'tank');
|
||||
|
||||
create type _link_type as enum ('pipe', 'pump', 'valve');
|
||||
|
||||
create type _curve_type as enum ('PUMP', 'EFFICIENCY', 'VOLUME', 'HEADLOSS');
|
||||
|
||||
create type _region_type as enum ('NONE', 'DMA', 'SA', 'VD', 'WDA');
|
||||
|
||||
create table _node
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _node_type not null
|
||||
);
|
||||
|
||||
create table _link
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _link_type not null
|
||||
);
|
||||
|
||||
create table _curve
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _curve_type not null
|
||||
);
|
||||
|
||||
create table _pattern
|
||||
(
|
||||
id varchar(32) primary key
|
||||
);
|
||||
|
||||
create table _region
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _region_type not null
|
||||
);
|
||||
8
resources/sql/create/1.title.sql
Normal file
8
resources/sql/create/1.title.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- [TITLE]
|
||||
|
||||
create table title
|
||||
(
|
||||
value text
|
||||
);
|
||||
|
||||
insert into title (value) values ('');
|
||||
13
resources/sql/create/10.status.sql
Normal file
13
resources/sql/create/10.status.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [STATUS]
|
||||
|
||||
create type link_status as enum ('OPEN', 'CLOSED', 'ACTIVE');
|
||||
|
||||
create table status
|
||||
(
|
||||
link varchar(32) primary key references _link(id)
|
||||
, status link_status
|
||||
, setting float8
|
||||
, check (status is not null or setting is not null)
|
||||
);
|
||||
|
||||
-- ddelete when delete link
|
||||
8
resources/sql/create/11.patterns.sql
Normal file
8
resources/sql/create/11.patterns.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- [PATTERNS]
|
||||
|
||||
create table patterns
|
||||
(
|
||||
_order serial primary key
|
||||
, id varchar(32) references _pattern(id) not null
|
||||
, factor float8 not null
|
||||
);
|
||||
9
resources/sql/create/12.curves.sql
Normal file
9
resources/sql/create/12.curves.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [CURVES]
|
||||
|
||||
create table curves
|
||||
(
|
||||
_order serial primary key
|
||||
, id varchar(32) references _curve(id) not null
|
||||
, x float8 not null
|
||||
, y float8 not null
|
||||
);
|
||||
7
resources/sql/create/13.controls.sql
Normal file
7
resources/sql/create/13.controls.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- [CONTROLS]
|
||||
|
||||
create table controls
|
||||
(
|
||||
_order serial primary key
|
||||
, line text not null
|
||||
);
|
||||
7
resources/sql/create/14.rules.sql
Normal file
7
resources/sql/create/14.rules.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- [RULES]
|
||||
|
||||
create table rules
|
||||
(
|
||||
_order serial primary key
|
||||
, line text not null
|
||||
);
|
||||
40
resources/sql/create/15.energy.sql
Normal file
40
resources/sql/create/15.energy.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
-- [ENERGY]
|
||||
|
||||
create table energy
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into energy (key, value) values
|
||||
('GLOBAL PRICE', '0')
|
||||
, ('GLOBAL PATTERN', '')
|
||||
, ('GLOBAL EFFIC', '75')
|
||||
, ('DEMAND CHARGE', '0')
|
||||
;
|
||||
|
||||
create table energy_pump_price
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, price float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
|
||||
create table energy_pump_pattern
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, pattern varchar(32) references _pattern(id) not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
-- delete when delete pattern
|
||||
|
||||
create table energy_pump_effic
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, effic varchar(32) references _curve(id) not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
-- delete when delete curve
|
||||
9
resources/sql/create/16.emitters.sql
Normal file
9
resources/sql/create/16.emitters.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [EMITTERS]
|
||||
|
||||
create table emitters
|
||||
(
|
||||
junction varchar(32) primary key references junctions(id)
|
||||
, coefficient float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete junction
|
||||
9
resources/sql/create/17.quality.sql
Normal file
9
resources/sql/create/17.quality.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [QUALITY]
|
||||
|
||||
create table quality
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
, quality float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete ndoe
|
||||
14
resources/sql/create/18.sources.sql
Normal file
14
resources/sql/create/18.sources.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- [SOURCES]
|
||||
|
||||
create type sources_type as enum ('CONCEN', 'MASS', 'FLOWPACED', 'SETPOINT');
|
||||
|
||||
create table sources
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
, s_type sources_type not null
|
||||
, strength float8 not null
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
);
|
||||
|
||||
-- delete when delete node
|
||||
-- unset pattern when delete pattern
|
||||
41
resources/sql/create/19.reactions.sql
Normal file
41
resources/sql/create/19.reactions.sql
Normal file
@@ -0,0 +1,41 @@
|
||||
-- [REACTIONS]
|
||||
|
||||
create table reactions
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into reactions (key, value) values
|
||||
('ORDER BULK', '1')
|
||||
, ('ORDER WALL', '1')
|
||||
, ('ORDER TANK', '1')
|
||||
, ('GLOBAL BULK', '0')
|
||||
, ('GLOBAL WALL', '0')
|
||||
, ('LIMITING POTENTIAL', '0')
|
||||
, ('ROUGHNESS CORRELATION', '0')
|
||||
;
|
||||
|
||||
create table reactions_pipe_bulk
|
||||
(
|
||||
pipe varchar(32) primary key references pipes(id) not null
|
||||
, value float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete pipe
|
||||
|
||||
create table reactions_pipe_wall
|
||||
(
|
||||
pipe varchar(32) primary key references pipes(id) not null
|
||||
, value float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete pipe
|
||||
|
||||
create table reactions_tank
|
||||
(
|
||||
tank varchar(32) primary key references tanks(id) not null
|
||||
, value float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete tank
|
||||
7
resources/sql/create/2.junctions.sql
Normal file
7
resources/sql/create/2.junctions.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- [JUNCTIONS]
|
||||
|
||||
create table junctions
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, elevation float8 not null
|
||||
);
|
||||
12
resources/sql/create/20.mixing.sql
Normal file
12
resources/sql/create/20.mixing.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- [MIXING]
|
||||
|
||||
create type mixing_model as enum ('MIXED', '2COMP', 'FIFO', 'LIFO');
|
||||
|
||||
create table mixing
|
||||
(
|
||||
tank varchar(32) primary key references tanks(id)
|
||||
, model mixing_model not null
|
||||
, value float8
|
||||
);
|
||||
|
||||
-- delete when delete tank
|
||||
20
resources/sql/create/21.times.sql
Normal file
20
resources/sql/create/21.times.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
-- [TIMES]
|
||||
|
||||
create table times
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into times (key, value) values
|
||||
('DURATION', '0:00')
|
||||
, ('HYDRAULIC TIMESTEP', '1:00')
|
||||
, ('QUALITY TIMESTEP', '0:05')
|
||||
, ('RULE TIMESTEP', '0:05')
|
||||
, ('PATTERN TIMESTEP', '1:00')
|
||||
, ('PATTERN START', '0:00')
|
||||
, ('REPORT TIMESTEP', '1:00')
|
||||
, ('REPORT START', '0:00')
|
||||
, ('START CLOCKTIME', '12:00 AM')
|
||||
, ('STATISTIC', 'NONE') -- NONE / AVERAGED / MINIMUM / MAXIMUM / RANGE
|
||||
;
|
||||
18
resources/sql/create/22.report.sql
Normal file
18
resources/sql/create/22.report.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- [REPORT]
|
||||
|
||||
create table report
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into report (key, value) values
|
||||
('PAGESIZE', '0')
|
||||
--, ('FILE', '')
|
||||
, ('STATUS', 'FULL')
|
||||
, ('SUMMARY', 'YES')
|
||||
, ('MESSAGES', 'YES')
|
||||
, ('ENERGY', 'YES')
|
||||
, ('NODES', 'ALL')
|
||||
, ('LINKS', 'ALL')
|
||||
;
|
||||
77
resources/sql/create/23.options.sql
Normal file
77
resources/sql/create/23.options.sql
Normal file
@@ -0,0 +1,77 @@
|
||||
-- [OPTIONS]
|
||||
|
||||
-- TODO: constraint
|
||||
|
||||
create table options
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into options (key, value) values
|
||||
('UNITS', 'LPS')
|
||||
, ('PRESSURE', 'METERS')
|
||||
, ('HEADLOSS', 'H-W')
|
||||
, ('QUALITY', 'NONE')
|
||||
, ('UNBALANCED', 'STOP')
|
||||
, ('PATTERN', '1')
|
||||
, ('DEMAND MODEL', 'DDA')
|
||||
, ('DEMAND MULTIPLIER', '1.0')
|
||||
, ('EMITTER EXPONENT', '0.5')
|
||||
, ('VISCOSITY', '1.0')
|
||||
, ('DIFFUSIVITY', '1.0')
|
||||
, ('SPECIFIC GRAVITY', '1.0')
|
||||
, ('TRIALS', '40')
|
||||
, ('ACCURACY', '0.001')
|
||||
, ('HEADERROR', '0.0001')
|
||||
, ('FLOWCHANGE', '0.0001')
|
||||
, ('MINIMUM PRESSURE', '0.0001')
|
||||
, ('REQUIRED PRESSURE', '20.0')
|
||||
, ('PRESSURE EXPONENT', '0.5')
|
||||
, ('TOLERANCE', '0.01')
|
||||
, ('HTOL', '0.0005')
|
||||
, ('QTOL', '0.0001')
|
||||
, ('RQTOL', '0.0000001')
|
||||
, ('CHECKFREQ', '2')
|
||||
, ('MAXCHECK', '10')
|
||||
, ('DAMPLIMIT', '0')
|
||||
;
|
||||
|
||||
|
||||
create table options_v3
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into options_v3 (key, value) values
|
||||
('FLOW_UNITS', 'LPS')
|
||||
, ('PRESSURE_UNITS', 'METERS')
|
||||
, ('HEADLOSS_MODEL', 'H-W')
|
||||
, ('SPECIFIC_GRAVITY', '1.0')
|
||||
, ('SPECIFIC_VISCOSITY', '1.0')
|
||||
, ('MAXIMUM_TRIALS', '40')
|
||||
, ('HEAD_TOLERANCE', '0.0005')
|
||||
, ('FLOW_TOLERANCE', '0.0001')
|
||||
, ('FLOW_CHANGE_LIMIT', '0.0001')
|
||||
, ('RELATIVE_ACCURACY', '0.001')
|
||||
, ('TIME_WEIGHT', '0.0')
|
||||
, ('STEP_SIZING', 'FULL')
|
||||
, ('IF_UNBALANCED', 'STOP')
|
||||
, ('DEMAND_MODEL', 'FIXED')
|
||||
, ('DEMAND_PATTERN', '1')
|
||||
, ('DEMAND_MULTIPLIER', '1.0')
|
||||
, ('MINIMUM_PRESSURE', '0.0001')
|
||||
, ('SERVICE_PRESSURE', '20.0')
|
||||
, ('PRESSURE_EXPONENT', '0.5')
|
||||
, ('LEAKAGE_MODEL', 'NONE')
|
||||
, ('LEAKAGE_COEFF1', '0.0')
|
||||
, ('LEAKAGE_COEFF2', '0.0')
|
||||
, ('EMITTER_EXPONENT', '0.5')
|
||||
, ('QUALITY_MODEL', 'NONE')
|
||||
, ('QUALITY_NAME', 'CHEMICAL')
|
||||
, ('QUALITY_UNITS', 'MG/L')
|
||||
, ('TRACE_NODE', '')
|
||||
, ('SPECIFIC_DIFFUSIVITY', '1.0')
|
||||
, ('QUALITY_TOLERANCE', '0.01')
|
||||
;
|
||||
11
resources/sql/create/24.coordinates.sql
Normal file
11
resources/sql/create/24.coordinates.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- [COORDINATES]
|
||||
|
||||
create table coordinates
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
, coord geometry
|
||||
);
|
||||
|
||||
-- delete when delete node
|
||||
|
||||
create index coordinates_gist on coordinates using gist(coord);
|
||||
11
resources/sql/create/25.vertices.sql
Normal file
11
resources/sql/create/25.vertices.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- [VERTICES]
|
||||
|
||||
create table vertices
|
||||
(
|
||||
_order serial primary key
|
||||
, link varchar(32) references _link(id) not null
|
||||
, x float8 not null
|
||||
, y float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete link
|
||||
12
resources/sql/create/26.labels.sql
Normal file
12
resources/sql/create/26.labels.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- [LABELS]
|
||||
|
||||
create table labels
|
||||
(
|
||||
x float8 not null
|
||||
, y float8 not null
|
||||
, label text not null
|
||||
, node varchar(32) references _node(id)
|
||||
, primary key (x, y)
|
||||
);
|
||||
|
||||
-- unset node when delete node
|
||||
8
resources/sql/create/27.backdrop.sql
Normal file
8
resources/sql/create/27.backdrop.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- [BACKDROP]
|
||||
|
||||
create table backdrop
|
||||
(
|
||||
content text primary key
|
||||
);
|
||||
|
||||
insert into backdrop (content) values ('');
|
||||
1
resources/sql/create/28.end.sql
Normal file
1
resources/sql/create/28.end.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- [END]
|
||||
9
resources/sql/create/29.scada_device.sql
Normal file
9
resources/sql/create/29.scada_device.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
create type scada_device_type as enum ('PRESSURE', 'DEMAND', 'QUALITY', 'LEVEL', 'FLOW', 'UNKNOWN');
|
||||
|
||||
create table scada_device
|
||||
(
|
||||
id text primary key
|
||||
, name text
|
||||
, address text
|
||||
, sd_type scada_device_type
|
||||
);
|
||||
10
resources/sql/create/3.reservoirs.sql
Normal file
10
resources/sql/create/3.reservoirs.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- [RESERVOIRS]
|
||||
|
||||
create table reservoirs
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, head float8 not null
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
);
|
||||
|
||||
-- unset pattern when delete pattern
|
||||
7
resources/sql/create/30.scada_device_data.sql
Normal file
7
resources/sql/create/30.scada_device_data.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
create table scada_device_data
|
||||
(
|
||||
device_id text not null references scada_device(id)
|
||||
, time timestamp not null
|
||||
, value float8 not null
|
||||
, primary key (device_id, time)
|
||||
);
|
||||
14
resources/sql/create/31.scada_element.sql
Normal file
14
resources/sql/create/31.scada_element.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
create type scada_model_type as enum ('JUNCTION', 'RESERVOIR', 'TANK', 'PIPE', 'PUMP', 'VALVE');
|
||||
|
||||
create type scada_element_status as enum ('OFF', 'ON');
|
||||
|
||||
create table scada_element
|
||||
(
|
||||
id text primary key
|
||||
, x float8 not null
|
||||
, y float8 not null
|
||||
, device_id text references scada_device(id)
|
||||
, model_id varchar(32) -- add constraint in API
|
||||
, model_type scada_model_type
|
||||
, status scada_element_status not null default 'OFF'
|
||||
);
|
||||
48
resources/sql/create/32.region.sql
Normal file
48
resources/sql/create/32.region.sql
Normal file
@@ -0,0 +1,48 @@
|
||||
create type region_type as enum ('NONE', 'DMA', 'SA', 'VD', 'WDA');
|
||||
|
||||
create table region
|
||||
(
|
||||
id text primary key
|
||||
, boundary geometry not null --unique
|
||||
, r_type region_type not null default 'NONE'
|
||||
);
|
||||
|
||||
create index region_gist on region using gist(boundary);
|
||||
|
||||
|
||||
create table temp_region
|
||||
(
|
||||
id text primary key
|
||||
, boundary geometry not null unique
|
||||
);
|
||||
|
||||
create index temp_region_gist on temp_region using gist(boundary);
|
||||
|
||||
|
||||
create table temp_node
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
);
|
||||
|
||||
|
||||
create table temp_link_1
|
||||
(
|
||||
link varchar(32) primary key references _link(id)
|
||||
, geom geometry not null unique
|
||||
);
|
||||
|
||||
|
||||
create table temp_link_2
|
||||
(
|
||||
link varchar(32) primary key references _link(id)
|
||||
, geom geometry not null unique
|
||||
);
|
||||
|
||||
|
||||
create table temp_vd_topology
|
||||
(
|
||||
id serial
|
||||
, source integer
|
||||
, target integer
|
||||
, cost float8
|
||||
);
|
||||
6
resources/sql/create/33.dma.sql
Normal file
6
resources/sql/create/33.dma.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
create table region_dma
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, parent text --references region_dma(id)
|
||||
, nodes text not null
|
||||
);
|
||||
7
resources/sql/create/34.sa.sql
Normal file
7
resources/sql/create/34.sa.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
create table region_sa
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, time_index integer not null
|
||||
, source varchar(32) not null -- references _node(id)
|
||||
, nodes text not null
|
||||
);
|
||||
6
resources/sql/create/35.vd.sql
Normal file
6
resources/sql/create/35.vd.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
create table region_vd
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, center varchar(32) not null -- references _node(id)
|
||||
, nodes text not null
|
||||
);
|
||||
5
resources/sql/create/36.wda.sql
Normal file
5
resources/sql/create/36.wda.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
create table region_wda
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, demand float8 not null default 0.0
|
||||
);
|
||||
11
resources/sql/create/37.history_patterns_flows.sql
Normal file
11
resources/sql/create/37.history_patterns_flows.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- [HISTORY_PATTERNS_FLOWS]
|
||||
-- WMH
|
||||
-- 2025/01/12
|
||||
-- Save pattern and pattern based history flow data. Use it for flow update pattern
|
||||
create table history_patterns_flows
|
||||
(
|
||||
_order serial primary key
|
||||
, id varchar(32) references _pattern(id) not null
|
||||
, factor float8 not null
|
||||
, flow float8 not null
|
||||
);
|
||||
44
resources/sql/create/38.scada_info.sql
Normal file
44
resources/sql/create/38.scada_info.sql
Normal file
@@ -0,0 +1,44 @@
|
||||
-- [SCADA_INFO]
|
||||
-- 王名豪
|
||||
-- 2025/01/12
|
||||
-- 存储水厂提供的SCADA设备相关数据,包括设备ID、类型(reservoir_liquid_level/tank_liquid_level/fixed_pump/variable_pump/source_outflow/pipe_flow/pressure/demand/quality、关联的模型元素ID、关联的模式、
|
||||
-- 关联的干管流量计对应的模型元素ID(即demand(大用户)处于某个pipe_flow(干管流量计)之下,demand不是根据水量大小来确定的,而是根据设备情况和是否单独设置pattern决定
|
||||
-- 关联的出厂流量计对应的模型元素ID若干个(即确认该设备的水源是哪几个,根据水源不同,设置为不同的分区)
|
||||
-- SCADA设备通过数据接口查询的ID、传输模式(实时/非实时)、传输频率(多久传回一次数据)
|
||||
-- X坐标、Y坐标、基于X坐标和Y坐标生成geometry类型的数据
|
||||
|
||||
create table scada_info
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type varchar(32) not null
|
||||
, associated_element_id varchar(32) not null
|
||||
, associated_pattern varchar(32)
|
||||
, associated_pipe_flow_id varchar(32)
|
||||
, associated_source_outflow_id1 varchar(32)
|
||||
, associated_source_outflow_id2 varchar(32)
|
||||
, associated_source_outflow_id3 varchar(32)
|
||||
, associated_source_outflow_id4 varchar(32)
|
||||
, associated_source_outflow_id5 varchar(32)
|
||||
, associated_source_outflow_id6 varchar(32)
|
||||
, associated_source_outflow_id7 varchar(32)
|
||||
, associated_source_outflow_id8 varchar(32)
|
||||
, associated_source_outflow_id9 varchar(32)
|
||||
, associated_source_outflow_id10 varchar(32)
|
||||
, associated_source_outflow_id11 varchar(32)
|
||||
, associated_source_outflow_id12 varchar(32)
|
||||
, associated_source_outflow_id13 varchar(32)
|
||||
, associated_source_outflow_id14 varchar(32)
|
||||
, associated_source_outflow_id15 varchar(32)
|
||||
, associated_source_outflow_id16 varchar(32)
|
||||
, associated_source_outflow_id17 varchar(32)
|
||||
, associated_source_outflow_id18 varchar(32)
|
||||
, associated_source_outflow_id19 varchar(32)
|
||||
, associated_source_outflow_id20 varchar(32)
|
||||
, API_query_id varchar(32)
|
||||
, transmission_mode varchar(32) not null
|
||||
, transmission_frequency text not null
|
||||
, reliability int not null
|
||||
, X_coor float8 not null
|
||||
, Y_coor float8 not null
|
||||
, coord geometry
|
||||
)
|
||||
10
resources/sql/create/39.users.sql
Normal file
10
resources/sql/create/39.users.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- [USERS]
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 存储系统的用户信息,如用户名,密码
|
||||
|
||||
create table users (
|
||||
user_id SERIAL PRIMARY KEY,
|
||||
username varchar(32) not null unique,
|
||||
password varchar(32) not null
|
||||
)
|
||||
18
resources/sql/create/4.tanks.sql
Normal file
18
resources/sql/create/4.tanks.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- [TANKS]
|
||||
|
||||
create type tanks_overflow as enum ('YES', 'NO');
|
||||
|
||||
create table tanks
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, elevation float8 not null
|
||||
, init_level float8 not null
|
||||
, min_level float8 not null
|
||||
, max_level float8 not null
|
||||
, diameter float8 not null
|
||||
, min_vol float8 not null
|
||||
, vol_curve varchar(32) references _curve(id)
|
||||
, overflow tanks_overflow
|
||||
);
|
||||
|
||||
-- unset vol_curve when delete curve
|
||||
14
resources/sql/create/40.scheme_list.sql
Normal file
14
resources/sql/create/40.scheme_list.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- [SCHEME_LIST]
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 存储进行手动模拟后的方案列表
|
||||
|
||||
create table scheme_list (
|
||||
scheme_id SERIAL PRIMARY KEY,
|
||||
scheme_name varchar(32) not null,
|
||||
scheme_type varchar(32) not null,
|
||||
username varchar(32) not null REFERENCES "users"(username) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
create_time TIMESTAMP WITH TIME ZONE not null DEFAULT date_trunc('minute', CURRENT_TIMESTAMP),
|
||||
scheme_start_time varchar(50) not null,
|
||||
scheme_detail JSON
|
||||
)
|
||||
13
resources/sql/create/41.pipe_risk_probability.sql
Normal file
13
resources/sql/create/41.pipe_risk_probability.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [PIPE_RISK_PROBABILITY]
|
||||
-- 王名豪
|
||||
-- 2025/04/16
|
||||
-- 存储管道风险评价结果
|
||||
|
||||
CREATE TABLE pipe_risk_probability (
|
||||
id SERIAL PRIMARY KEY,
|
||||
pipeID VARCHAR(255),
|
||||
pipeage FLOAT,
|
||||
risk_probability_now FLOAT,
|
||||
x FLOAT[], -- Since x is a list, it's stored as text (stringified list)
|
||||
y FLOAT[] -- Similarly, y will be stored as text (stringified list)
|
||||
);
|
||||
14
resources/sql/create/42.sensor_placement.sql
Normal file
14
resources/sql/create/42.sensor_placement.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- [SENSOR_PLACEMENT]
|
||||
-- 王名豪
|
||||
-- 2025/04/18
|
||||
-- 存储测压点的布置方案
|
||||
|
||||
CREATE TABLE sensor_placement (
|
||||
id SERIAL PRIMARY KEY,
|
||||
scheme_name varchar(32) not null,
|
||||
sensor_number int,
|
||||
min_diameter int,
|
||||
username varchar(32) not null REFERENCES "users"(username) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
create_time TIMESTAMP WITH TIME ZONE not null DEFAULT date_trunc('minute', CURRENT_TIMESTAMP),
|
||||
sensor_location TEXT[]
|
||||
);
|
||||
13
resources/sql/create/43.burst_locate_result.sql
Normal file
13
resources/sql/create/43.burst_locate_result.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [BURST_LOCATE_RESULT]
|
||||
-- 王名豪
|
||||
-- 2025/04/19
|
||||
-- 存储爆管侦测定位结果
|
||||
|
||||
CREATE TABLE burst_locate_result (
|
||||
id SERIAL PRIMARY KEY,
|
||||
type varchar(32) not null,
|
||||
burst_incident varchar(32) not null,
|
||||
leakage float,
|
||||
detect_time TIMESTAMP WITH TIME ZONE not null DEFAULT date_trunc('minute', CURRENT_TIMESTAMP),
|
||||
locate_result JSON
|
||||
)
|
||||
19
resources/sql/create/5.pipes.sql
Normal file
19
resources/sql/create/5.pipes.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- [PIPES]
|
||||
|
||||
create type pipes_status as enum ('OPEN', 'CLOSED', 'CV');
|
||||
|
||||
create table pipes
|
||||
(
|
||||
id varchar(32) primary key references _link(id)
|
||||
, node1 varchar(32) references _node(id) not null
|
||||
, node2 varchar(32) references _node(id) not null
|
||||
, length float8 not null
|
||||
, diameter float8 not null
|
||||
, roughness float8 not null
|
||||
, minor_loss float8 not null
|
||||
, status pipes_status not null
|
||||
, check (node1 <> node2)
|
||||
);
|
||||
|
||||
-- delete when delete node1
|
||||
-- delete when delete node2
|
||||
19
resources/sql/create/6.pumps.sql
Normal file
19
resources/sql/create/6.pumps.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- [PUMPS]
|
||||
|
||||
create table pumps
|
||||
(
|
||||
id varchar(32) primary key references _link(id)
|
||||
, node1 varchar(32) references _node(id) not null
|
||||
, node2 varchar(32) references _node(id) not null
|
||||
, power float8
|
||||
, head varchar(32) references _curve(id)
|
||||
, speed float8
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
, check (power is not null or head is not null)
|
||||
, check ((power is not null and head is not null) is false)
|
||||
);
|
||||
|
||||
-- delete when delete node1
|
||||
-- delete when delete node2
|
||||
-- unset head when delete curve
|
||||
-- unset pattern when delete pattern
|
||||
17
resources/sql/create/7.valves.sql
Normal file
17
resources/sql/create/7.valves.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- [VALVES]
|
||||
|
||||
create type valves_type as enum ('PRV', 'PSV', 'PBV', 'FCV', 'TCV', 'GPV');
|
||||
|
||||
create table valves
|
||||
(
|
||||
id varchar(32) primary key references _link(id)
|
||||
, node1 varchar(32) references _node(id) not null
|
||||
, node2 varchar(32) references _node(id) not null
|
||||
, diameter float8 not null
|
||||
, v_type valves_type not null
|
||||
, setting text not null
|
||||
, minor_loss float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete node1
|
||||
-- delete when delete node2
|
||||
17
resources/sql/create/8.tags.sql
Normal file
17
resources/sql/create/8.tags.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- [TAGS]
|
||||
|
||||
create table tags_node
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, tag text not null
|
||||
);
|
||||
|
||||
-- delete when delete node
|
||||
|
||||
create table tags_link
|
||||
(
|
||||
id varchar(32) primary key references _link(id)
|
||||
, tag text not null
|
||||
);
|
||||
|
||||
-- delete when delete link
|
||||
13
resources/sql/create/9.demands.sql
Normal file
13
resources/sql/create/9.demands.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [DEMANDS]
|
||||
|
||||
create table demands
|
||||
(
|
||||
_order serial primary key
|
||||
, junction varchar(32) references junctions(id) not null
|
||||
, demand float8 not null
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
, category text
|
||||
);
|
||||
|
||||
-- delete when delete junction
|
||||
-- unset pattern when delete pattern
|
||||
5
resources/sql/create/extension_data.sql
Normal file
5
resources/sql/create/extension_data.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
create table extension_data
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
55
resources/sql/create/operation.sql
Normal file
55
resources/sql/create/operation.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
create table operation
|
||||
(
|
||||
id bigserial primary key
|
||||
, redo text not null
|
||||
, undo text not null
|
||||
, parent integer references operation(id) on delete cascade
|
||||
, redo_child integer references operation(id) -- must update before delete
|
||||
, redo_cs text not null
|
||||
, undo_cs text not null
|
||||
);
|
||||
|
||||
insert into operation (id, redo, undo, redo_cs, undo_cs) values (0, '', '', '', '');
|
||||
|
||||
create table current_operation
|
||||
(
|
||||
id bigint primary key references operation(id) -- must update before delete
|
||||
);
|
||||
|
||||
insert into current_operation (id) values (0);
|
||||
|
||||
create table snapshot_operation
|
||||
(
|
||||
id bigint primary key references operation(id) on delete cascade
|
||||
, tag text not null unique
|
||||
);
|
||||
|
||||
create table restore_operation
|
||||
(
|
||||
id bigint primary key references operation(id) -- set after reading inp
|
||||
);
|
||||
|
||||
insert into restore_operation (id) values (0);
|
||||
|
||||
|
||||
create table batch_operation
|
||||
(
|
||||
id bigserial primary key
|
||||
, redo text not null
|
||||
, undo text not null
|
||||
, parent integer references operation(id) on delete cascade
|
||||
, redo_child integer references operation(id) -- must update before delete
|
||||
, redo_cs text not null
|
||||
, undo_cs text not null
|
||||
);
|
||||
|
||||
insert into batch_operation (id, redo, undo, redo_cs, undo_cs) values (0, '', '', '', '');
|
||||
|
||||
create type operation_table_option as enum ('operation', 'batch_operation');
|
||||
|
||||
create table operation_table
|
||||
(
|
||||
option operation_table_option primary key
|
||||
);
|
||||
|
||||
insert into operation_table (option) values ('operation');
|
||||
15
resources/sql/drop/0.base.sql
Normal file
15
resources/sql/drop/0.base.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
drop table if exists _region;
|
||||
|
||||
drop table if exists _pattern;
|
||||
|
||||
drop table if exists _curve;
|
||||
|
||||
drop table if exists _link;
|
||||
|
||||
drop table if exists _node;
|
||||
|
||||
drop type if exists _curve_type;
|
||||
|
||||
drop type if exists _link_type;
|
||||
|
||||
drop type if exists _node_type;
|
||||
3
resources/sql/drop/1.title.sql
Normal file
3
resources/sql/drop/1.title.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [TITLE]
|
||||
|
||||
drop table if exists title;
|
||||
5
resources/sql/drop/10.status.sql
Normal file
5
resources/sql/drop/10.status.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [STATUS]
|
||||
|
||||
drop table if exists status;
|
||||
|
||||
drop type if exists link_status;
|
||||
3
resources/sql/drop/11.patterns.sql
Normal file
3
resources/sql/drop/11.patterns.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [PATTERNS]
|
||||
|
||||
drop table if exists patterns;
|
||||
3
resources/sql/drop/12.curves.sql
Normal file
3
resources/sql/drop/12.curves.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [CURVES]
|
||||
|
||||
drop table if exists curves;
|
||||
3
resources/sql/drop/13.controls.sql
Normal file
3
resources/sql/drop/13.controls.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [CONTROLS]
|
||||
|
||||
drop table if exists controls;
|
||||
3
resources/sql/drop/14.rules.sql
Normal file
3
resources/sql/drop/14.rules.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [RULES]
|
||||
|
||||
drop table if exists rules;
|
||||
9
resources/sql/drop/15.energy.sql
Normal file
9
resources/sql/drop/15.energy.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [ENERGY]
|
||||
|
||||
drop table if exists energy_pump_effic;
|
||||
|
||||
drop table if exists energy_pump_pattern;
|
||||
|
||||
drop table if exists energy_pump_price;
|
||||
|
||||
drop table if exists energy;
|
||||
3
resources/sql/drop/16.emitters.sql
Normal file
3
resources/sql/drop/16.emitters.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [EMITTERS]
|
||||
|
||||
drop table if exists emitters;
|
||||
3
resources/sql/drop/17.quality.sql
Normal file
3
resources/sql/drop/17.quality.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [QUALITY]
|
||||
|
||||
drop table if exists quality;
|
||||
5
resources/sql/drop/18.sources.sql
Normal file
5
resources/sql/drop/18.sources.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [SOURCES]
|
||||
|
||||
drop table if exists sources;
|
||||
|
||||
drop type if exists sources_type;
|
||||
9
resources/sql/drop/19.reactions.sql
Normal file
9
resources/sql/drop/19.reactions.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [REACTIONS]
|
||||
|
||||
drop table if exists reactions_tank;
|
||||
|
||||
drop table if exists reactions_pipe_wall;
|
||||
|
||||
drop table if exists reactions_pipe_bulk;
|
||||
|
||||
drop table if exists reactions;
|
||||
3
resources/sql/drop/2.junctions.sql
Normal file
3
resources/sql/drop/2.junctions.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [JUNCTIONS]
|
||||
|
||||
drop table if exists junctions;
|
||||
5
resources/sql/drop/20.mixing.sql
Normal file
5
resources/sql/drop/20.mixing.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [MIXING]
|
||||
|
||||
drop table if exists mixing;
|
||||
|
||||
drop type if exists mixing_model;
|
||||
3
resources/sql/drop/21.times.sql
Normal file
3
resources/sql/drop/21.times.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [TIMES]
|
||||
|
||||
drop table if exists times;
|
||||
3
resources/sql/drop/22.report.sql
Normal file
3
resources/sql/drop/22.report.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [REPORT]
|
||||
|
||||
drop table if exists report;
|
||||
5
resources/sql/drop/23.options.sql
Normal file
5
resources/sql/drop/23.options.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [OPTIONS]
|
||||
|
||||
drop table if exists options_v3;
|
||||
|
||||
drop table if exists options;
|
||||
5
resources/sql/drop/24.coordinates.sql
Normal file
5
resources/sql/drop/24.coordinates.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [COORDINATES]
|
||||
|
||||
drop index if exists coordinates_gist;
|
||||
|
||||
drop table if exists coordinates;
|
||||
3
resources/sql/drop/25.vertices.sql
Normal file
3
resources/sql/drop/25.vertices.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [VERTICES]
|
||||
|
||||
drop table if exists vertices;
|
||||
3
resources/sql/drop/26.labels.sql
Normal file
3
resources/sql/drop/26.labels.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [LABELS]
|
||||
|
||||
drop table if exists labels;
|
||||
3
resources/sql/drop/27.backdrop.sql
Normal file
3
resources/sql/drop/27.backdrop.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [BACKDROP]
|
||||
|
||||
drop table if exists backdrop;
|
||||
1
resources/sql/drop/28.end.sql
Normal file
1
resources/sql/drop/28.end.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- [END]
|
||||
3
resources/sql/drop/29.scada_device.sql
Normal file
3
resources/sql/drop/29.scada_device.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
drop table if exists scada_device;
|
||||
|
||||
drop type if exists scada_device_type;
|
||||
3
resources/sql/drop/3.reservoirs.sql
Normal file
3
resources/sql/drop/3.reservoirs.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [RESERVOIRS]
|
||||
|
||||
drop table if exists reservoirs;
|
||||
1
resources/sql/drop/30.scada_device_data.sql
Normal file
1
resources/sql/drop/30.scada_device_data.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists scada_device_data;
|
||||
5
resources/sql/drop/31.scada_element.sql
Normal file
5
resources/sql/drop/31.scada_element.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
drop table if exists scada_element;
|
||||
|
||||
drop type if exists scada_element_status;
|
||||
|
||||
drop type if exists scada_model_type;
|
||||
17
resources/sql/drop/32.region.sql
Normal file
17
resources/sql/drop/32.region.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
drop table if exists temp_vd_topology;
|
||||
|
||||
drop table if exists temp_link_2;
|
||||
|
||||
drop table if exists temp_link_1;
|
||||
|
||||
drop table if exists temp_node;
|
||||
|
||||
drop index if exists temp_region_gist;
|
||||
|
||||
drop table if exists temp_region;
|
||||
|
||||
drop index if exists region_gist;
|
||||
|
||||
drop table if exists region;
|
||||
|
||||
drop type if exists region_type;
|
||||
1
resources/sql/drop/33.dma.sql
Normal file
1
resources/sql/drop/33.dma.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_dma;
|
||||
1
resources/sql/drop/34.sa.sql
Normal file
1
resources/sql/drop/34.sa.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_sa;
|
||||
1
resources/sql/drop/35.vd.sql
Normal file
1
resources/sql/drop/35.vd.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_vd;
|
||||
1
resources/sql/drop/36.wda.sql
Normal file
1
resources/sql/drop/36.wda.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_wda;
|
||||
3
resources/sql/drop/37.history_patterns_flows.sql
Normal file
3
resources/sql/drop/37.history_patterns_flows.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- WMH
|
||||
-- 2025/01/12
|
||||
drop table if exists history_patterns_flows;
|
||||
3
resources/sql/drop/38.scada_info.sql
Normal file
3
resources/sql/drop/38.scada_info.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- WMH
|
||||
-- 2025/01/12
|
||||
drop table if exists scada_info;
|
||||
5
resources/sql/drop/39.users.sql
Normal file
5
resources/sql/drop/39.users.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 删除user这张表
|
||||
|
||||
drop table if exists users;
|
||||
5
resources/sql/drop/4.tanks.sql
Normal file
5
resources/sql/drop/4.tanks.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [TANKS]
|
||||
|
||||
drop table if exists tanks;
|
||||
|
||||
drop type if exists tanks_overflow;
|
||||
6
resources/sql/drop/40.scheme_list.sql
Normal file
6
resources/sql/drop/40.scheme_list.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [SCHEME_LIST]
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 删除scheme_list这张表
|
||||
|
||||
drop table if exists scheme_list;
|
||||
6
resources/sql/drop/41.pipe_risk_probability.sql
Normal file
6
resources/sql/drop/41.pipe_risk_probability.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [PIPE_RISK_PROBABILITY]
|
||||
-- 王名豪
|
||||
-- 2025/04/16
|
||||
-- 删除pipe_risk_probability这张表
|
||||
|
||||
drop table if exists pipe_risk_probability;
|
||||
6
resources/sql/drop/42.sensor_placement.sql
Normal file
6
resources/sql/drop/42.sensor_placement.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [SENSOR_PLACEMENT]
|
||||
-- 王名豪
|
||||
-- 2025/04/18
|
||||
-- 删除sensor_placement这张表
|
||||
|
||||
drop table if exists sensor_placement;
|
||||
6
resources/sql/drop/43.burst_locate_result.sql
Normal file
6
resources/sql/drop/43.burst_locate_result.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [BURST_LOCATE_RESULT]
|
||||
-- 王名豪
|
||||
-- 2025/04/19
|
||||
-- 删除burst_locate_result这张表
|
||||
|
||||
drop table if exists burst_locate_result;
|
||||
5
resources/sql/drop/5.pipes.sql
Normal file
5
resources/sql/drop/5.pipes.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [PIPES]
|
||||
|
||||
drop table if exists pipes;
|
||||
|
||||
drop type if exists pipes_status;
|
||||
3
resources/sql/drop/6.pumps.sql
Normal file
3
resources/sql/drop/6.pumps.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [PUMPS]
|
||||
|
||||
drop table if exists pumps;
|
||||
5
resources/sql/drop/7.valves.sql
Normal file
5
resources/sql/drop/7.valves.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [VALVES]
|
||||
|
||||
drop table if exists valves;
|
||||
|
||||
drop type if exists valves_type;
|
||||
5
resources/sql/drop/8.tags.sql
Normal file
5
resources/sql/drop/8.tags.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [TAGS]
|
||||
|
||||
drop table if exists tags_link;
|
||||
|
||||
drop table if exists tags_node;
|
||||
3
resources/sql/drop/9.demands.sql
Normal file
3
resources/sql/drop/9.demands.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [DEMANDS]
|
||||
|
||||
drop table if exists demands;
|
||||
1
resources/sql/drop/extension_data.sql
Normal file
1
resources/sql/drop/extension_data.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists extension_data;
|
||||
13
resources/sql/drop/operation.sql
Normal file
13
resources/sql/drop/operation.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
drop table if exists operation_table;
|
||||
|
||||
drop type if exists operation_table_option;
|
||||
|
||||
drop table if exists batch_operation;
|
||||
|
||||
drop table if exists restore_operation;
|
||||
|
||||
drop table if exists snapshot_operation;
|
||||
|
||||
drop table if exists current_operation;
|
||||
|
||||
drop table if exists operation;
|
||||
12591
resources/temp.rpt
Normal file
12591
resources/temp.rpt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/北碚市政管线风险评价结果.xlsx
Normal file
BIN
resources/北碚市政管线风险评价结果.xlsx
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user