3.0 KiB
搭建服务器
git clone https://e.coding.net/tjwater/tjwatercloud/TJWaterServer.git- 控制台进入
TJWaterServer - 运行
python install.py准备Python环境 3.1 Python 3.12 需要手动的安装(拷贝) PyMetis 库 - 解压
pg14.zip到上一层文件夹 - 控制台进入
../pg14/bin5.1 将pg14/bin 加到系统PATH中,这步一定需要做,CopyProjectEx里需要这个 - 执行
initdb -D ../data -E UTF-8创建数据库 - 执行
pg_ctl -D ../data -l logfile start启动数据库服务pg_ctl -D ../data -l logfile stop关闭数据库服务
- 进入
TJWaterServer,执行python create_template.py创建模板 - 执行
python online_Analysis.py - 执行
python influxdb_api.py - 搭建FastAPI环境...
- 进入
TJWaterServer,执行startserber.bat
NOTE: 版本问题 pip uninstall scipy numpy -y pip install numpy==1.26.2 scipy==1.15.2
pg 信息 腾讯Windows服务器 Host: localhost (默认) Port: 5432 (默认) User: 就是Windows的用户名,这台机器也就是 Administrator Password: 密码为空
redis 信息
1. 进到redis安装目录
2. 执行 redis-server.exe
influx db 信息 1. 运行 influxd.exe 2. 打开网页看下列的信息 http://localhost:8086
# influxdb数据库连接信息
influx_url = "http://localhost:8086" # 替换为你的InfluxDB实例地址
influx_token = "Vq8F5tzxqmjH6JYPBP5xqwo6nJbzRqCnahlcoMVyZGMPm3H92swD08VX-5lTH1laN_JG1x7EZ80WOQoycanmBw==" # 替换为你的InfluxDB Token
influx_org_name = "TJWATERORG" # 替换为你的Organization名称
influx_client = InfluxDBClient(url=influx_url, token=influx_token, org=influx_org_name)
UserName tjwater Password Tjwater@123456 Organizatio TJWATEORG Bucket TJWATERBUCKET
API Token : LsqvuqtBqtBv44z_CWh5bWfn9hs1QKcYu5kWahF_cdF6JyqtwuUxU5CK7HWP7BOtP5_2f5mjx76qXyuPLOHWdw==
influx config create --config-name onboarding --host-url "http://localhost:8086"
--org "TJWATERORG" `
--token "LsqvuqtBqtBv44z_CWh5bWfn9hs1QKcYu5kWahF_cdF6JyqtwuUxU5CK7HWP7BOtP5_2f5mjx76qXyuPLOHWdw=="
--active
Setup instructions for WMH's work
-
import scada_info.csv run python online_Analysis.py
-
import history_pattern_flow.csv run python online_Analysis.py Should manually change code
-
run create_template.py
-
run influxdb_api.py
在InfluxDB数据库中创建好我们需要的bucket create buckets -
run online_Analysis.py 有几个步骤 (1)创建用户名密码 (2)network_update 从 inp 文件创建 szh这个project (3)upload_shp_to_pg (4)submit_risk_probability_result (5)pressure_sensor_placement_sensitivity
-
In times table, all time values should be the format "hh:mm::ss"
NOTES: 1. SCADA设备的时候,单位要转换,现在模拟算出来的单位是L/s,SCADA数据是m3/h,L/s要乘3.6才是m3/h 2. 之前的SCADA压力应该转过了,SCADA数据的单位是MPa,要乘以100才是m