コード例 #1
0
    def __init__(self):
        # load network
        G, dike_list, dike_branch = funs_generate_network.get_network()
        
        # Load hydrological statistics:
        A = pd.read_excel('./data/hydrology/werklijn_params.xlsx')
        
        lowQ, highQ = werklijn_inv([0.992, 0.99992], A)
        Qpeaks = np.unique(np.asarray([np.random.uniform(lowQ, highQ)/6 for _ in range(0, 30)]))[::-1]

        # Probabiltiy of exceedence for the discharge @ Lobith (i.e. times 6)
        p_exc = 1 - werklijn_cdf(Qpeaks*6, A)
                
        self.Qpeaks = Qpeaks
        self.p_exc = p_exc
        self.A = A
        self.G = G
        self.dikelist = dike_list
        self.dike_branch = dike_branch
        
        # Accounting for the discharge reduction due to upstream dike breaches
        self.sb = False
        
        # Planning window [y]
        self.n = 50

        # Step of dike increase [cm]
        self.step = 10
        
        # Time step correction: Q is a mean daily value expressed in m3/s
        self.timestepcorr = 24*60*60
        ema_logging.info('model initialized')
コード例 #2
0
    def __init__(self):
        # planning steps
        self.num_planning_steps = 3
        self.num_events = 30

        # load network
        G, dike_list, dike_branch, planning_steps = funs_generate_network.get_network(
            self.num_planning_steps)

        # Load hydrological statistics:
        self.A = pd.read_excel('./data/hydrology/werklijn_params.xlsx')

        lowQ, highQ = werklijn_inv([0.992, 0.99992], self.A)
        self.Qpeaks = np.unique(
            np.asarray([
                np.random.uniform(lowQ, highQ) / 6
                for _ in range(0, self.num_events)
            ]))[::-1]

        # Probabiltiy of exceedence for the discharge @ Lobith (i.e. times 6)
        self.p_exc = 1 - werklijn_cdf(self.Qpeaks * 6, self.A)

        self.G = G
        self.dikelist = dike_list
        self.dike_branch = dike_branch
        self.planning_steps = planning_steps

        # Accounting for the discharge reduction due to upstream dike breaches
        self.sb = True

        # Planning window [y], reasonable for it to be a multiple of num_planning_steps
        self.n = 200
        # Years in planning step:
        self.y_step = self.n // self.num_planning_steps
        # Step of dike increase [m]
        self.dh = 0.1

        # Time step correction: Q is a mean daily value expressed in m3/s
        self.timestepcorr = 24 * 60 * 60