modify project name, change influxdb token, remove log simulation result
This commit is contained in:
@@ -315,7 +315,7 @@ def run_project(name: str, readable_output: bool = False) -> str:
|
||||
data['output'] = dump_output_binary(opt)
|
||||
|
||||
data['report'] = dump_report(rpt)
|
||||
logging.info(f"Report: {data['report']}")
|
||||
#logging.info(f"Report: {data['report']}")
|
||||
|
||||
return json.dumps(data)
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
# influxdb数据库连接信息
|
||||
url = "http://localhost:8086" # 替换为你的InfluxDB实例地址
|
||||
token = "Vq8F5tzxqmjH6JYPBP5xqwo6nJbzRqCnahlcoMVyZGMPm3H92swD08VX-5lTH1laN_JG1x7EZ80WOQoycanmBw==" # 替换为你的InfluxDB Token
|
||||
#token = "Vq8F5tzxqmjH6JYPBP5xqwo6nJbzRqCnahlcoMVyZGMPm3H92swD08VX-5lTH1laN_JG1x7EZ80WOQoycanmBw==" # 替换为你的InfluxDB Token
|
||||
token = "blgSuYzqnybW7nxVghtyuA7Ma45lY6raHNXPwHYB2gZaTwrE4xgxIqQoJ2xY6_kahGwai83WVb4V4juRrmfHqg=="
|
||||
# _ENCODED_TOKEN = "eEdETTVSWnFSSkF1ekFHUy1vdFhVZEMyTkZkWTc1cUpBalJMcUFCNHA1V2NJSUFsSVVwT3BUOF95QTE2QU9IbUpXZXJ3UV8wOGd3Yjg0c3k0MmpuWlE9PQ=="
|
||||
# token = base64.b64decode(_ENCODED_TOKEN).decode("utf-8")
|
||||
org = "TJWATERORG" # 替换为你的Organization名称
|
||||
|
||||
2
main.py
2
main.py
@@ -262,7 +262,7 @@ async def startup_db():
|
||||
logger.info('**********************************************************')
|
||||
|
||||
# open 'szh' by default
|
||||
open_project("szh")
|
||||
open_project("fx2026")
|
||||
|
||||
############################################################
|
||||
# auth
|
||||
|
||||
@@ -1 +1 @@
|
||||
name='szh'
|
||||
name='fx2026'
|
||||
@@ -890,7 +890,7 @@ def run_simulation(name: str, simulation_type: str, modify_pattern_start_time: s
|
||||
cs.append(valve_status)
|
||||
set_status(name_c, cs)
|
||||
# 运行并返回结果
|
||||
result = run_project(name_c)
|
||||
run_project(name_c)
|
||||
time_cost_end = time.perf_counter()
|
||||
print('{} -- Hydraulic simulation finished, cost time: {:.2f} s.'.format( datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%Y-%m-%d %H:%M:%S'), time_cost_end - time_cost_start))
|
||||
# DingZQ 下面这几句一定要这样,不然读取不了
|
||||
@@ -942,10 +942,10 @@ if __name__ == "__main__":
|
||||
globals.source_outflow_region_patterns, globals.realtime_region_pipe_flow_and_demand_patterns = get_realtime_region_patterns(project_info.name, globals.source_outflow_region_id, globals.realtime_region_pipe_flow_and_demand_id)
|
||||
|
||||
# 基础日期和时间(日期部分保持不变)
|
||||
base_date = datetime(2025, 5, 4)
|
||||
base_date = datetime(2025, 8, 12)
|
||||
|
||||
# 循环生成96个时间点(15分钟间隔)
|
||||
for i in range(96):
|
||||
for i in range(4):
|
||||
# 计算当前时间偏移
|
||||
time_offset = timedelta(minutes=15 * i)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user