3 Created on Tue May 19 07:25:09 2020
11 from efo.time
import TimeBase, TimeFcst
12 from efo.junction
import ReservoirJunction
13 import concurrent.futures
24 if issubclass(type(time), TimeBase):
36 if cls
is NetworkBase:
38 if set(cls.__abstractmethods__) <= attrs:
46 super().
__init__(name, time, junctions)
49 qOutReturn = np.empty(self.
nJunctionsnJunctions)
50 storReturn = np.empty(self.
nJunctionsnJunctions)
51 storReturn[:] = np.nan
52 for i, curJnc
in enumerate(self.
junctionsjunctions):
53 qOutReturn[i] = curJnc.calc_qout()
54 if issubclass(type(curJnc), ReservoirJunction):
55 storReturn[i] = curJnc.stor[self.
TT.step]
61 def __init__(self, name, timeFcst, junctions, fcstJunctions):
65 super().
__init__(name, timeFcst, junctions)
83 for i
in range(len(self.fcstNetwork.junctions)):
84 self.fcstNetwork.junctions[i].qOut[0] = self.junctions[i].qOut[max(0, self.T.Tcont.step-1)]
86 if issubclass(type(self.fcstNetwork.junctions[i]), ReservoirJunction):
87 self.fcstNetwork.junctions[i].stor[0] = \
88 self.junctions[i].stor[max(0, self.T.Tcont.step-1)]
89 self.fcstNetwork.junctions[i].rlsCtrl[0] = \
90 self.junctions[i].rlsCtrl[max(0, self.T.Tcont.step-1)]
91 if self.fcstNetwork.junctions[i].outletUnCtrl:
92 self.fcstNetwork.junctions[i].rlsUnCtrl[0] = \
93 self.junctions[i].rlsUnCtrl[max(0, self.T.Tcont.step-1)]
def __subclasshook__(cls, C)
def __init__(self, name, time, junctions)
def process_junctions(self)
def __init__(self, name, timeFcst, junctions, fcstJunctions)
def process_fcst_junctions(self)
def build_fcst_junctions(self)
def __init__(self, name, time, junctions)
def process_junctions(self)