read Region sections in inp

This commit is contained in:
xinzish
2024-04-08 23:23:02 +08:00
parent 5e80f35ae5
commit c1a5759220
4 changed files with 17 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
from tjnetwork import * from tjnetwork import *
read_inp("testDMA","testWDA.inp")
print(list_project()) print(list_project())

View File

@@ -0,0 +1,6 @@
from tjnetwork import *
from get_realValue import *
def get_current_total_Q():
ids=['3489']
total_q=get_realValue(ids)
return total_q

View File

@@ -4,6 +4,8 @@ create type _link_type as enum ('pipe', 'pump', 'valve');
create type _curve_type as enum ('PUMP', 'EFFICIENCY', 'VOLUME', 'HEADLOSS'); create type _curve_type as enum ('PUMP', 'EFFICIENCY', 'VOLUME', 'HEADLOSS');
create type _region_type as enum ('DISTRIBUTION', 'DMA', 'SA', 'PMA','VA');
create table _node create table _node
( (
id varchar(32) primary key id varchar(32) primary key
@@ -26,3 +28,9 @@ create table _pattern
( (
id varchar(32) primary key id varchar(32) primary key
); );
create table _region
(
id varchar(32) primary key
, type _region_type not null
);

View File

@@ -1,3 +1,5 @@
drop table if exists _region;
drop table if exists _pattern; drop table if exists _pattern;
drop table if exists _curve; drop table if exists _curve;