diff --git a/epanet/epanet.py b/epanet/epanet.py index 8d67e59..603e947 100644 --- a/epanet/epanet.py +++ b/epanet/epanet.py @@ -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) diff --git a/influxdb_info.py b/influxdb_info.py index 186a11b..55c0378 100644 --- a/influxdb_info.py +++ b/influxdb_info.py @@ -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名称 diff --git a/main.py b/main.py index 4997ace..2df1aa1 100644 --- a/main.py +++ b/main.py @@ -262,7 +262,7 @@ async def startup_db(): logger.info('**********************************************************') # open 'szh' by default - open_project("szh") + open_project("fx2026") ############################################################ # auth diff --git a/project_info.py b/project_info.py index a5555d1..808f915 100644 --- a/project_info.py +++ b/project_info.py @@ -1 +1 @@ -name='szh' \ No newline at end of file +name='fx2026' \ No newline at end of file diff --git a/simulation.py b/simulation.py index 88847b7..785c0d7 100644 --- a/simulation.py +++ b/simulation.py @@ -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)