def server_bound(self, param_list: List[float]) -> float:
        theta = param_list[0]

        a_2 = self.arr_list[1]
        a_3 = self.arr_list[2]
        a_4 = self.arr_list[3]
        s_1 = self.ser_list[0]
        s_2 = self.ser_list[1]
        s_3 = self.ser_list[2]
        s_4 = self.ser_list[3]

        try:
            d_3_3 = DetermTokenBucket(sigma_single=0.0,
                                      rho_single=s_3.rate,
                                      m=1)
            d_4_4 = Deconvolve(arr=a_4,
                               ser=LeftoverARB(ser=s_4,
                                               cross_arr=Deconvolve(arr=a_2,
                                                                    ser=s_3)))

            s_1_lo = LeftoverARB(ser=s_1, cross_arr=d_3_3)
            s_2_lo = LeftoverARB(ser=s_2, cross_arr=d_4_4)

            s_net_1 = Convolve(ser1=s_1_lo, ser2=s_2_lo)

            res_1 = single_hop_bound(foi=self.arr_list[0],
                                     s_e2e=s_net_1,
                                     theta=theta,
                                     perform_param=self.perform_param)

        except ParameterOutOfBounds:
            res_1 = inf

        try:
            d_3_3 = Deconvolve(arr=a_3,
                               ser=LeftoverARB(ser=s_3, cross_arr=a_2))
            d_4_4 = DetermTokenBucket(sigma_single=0.0,
                                      rho_single=s_4.rate,
                                      m=1)

            s_1_lo = LeftoverARB(ser=s_1, cross_arr=d_3_3)
            s_2_lo = LeftoverARB(ser=s_2, cross_arr=d_4_4)

            s_net_2 = Convolve(ser1=s_1_lo, ser2=s_2_lo)

            res_2 = single_hop_bound(foi=self.arr_list[0],
                                     s_e2e=s_net_2,
                                     theta=theta,
                                     perform_param=self.perform_param)

        except ParameterOutOfBounds:
            res_2 = inf

        return min(res_1, res_2)
예제 #2
0
def sfa_bound_old(param_list: [float, float,
                               float], arr_list: List[ArrivalDistribution],
                  ser_list: List[ConstantRateServer],
                  perform_param: PerformParameter) -> float:
    theta = param_list[0]

    foi = arr_list[0]
    a_2 = arr_list[1]
    a_3 = arr_list[2]

    s_1 = ser_list[0]
    s_2 = ser_list[1]
    s_3 = ser_list[2]

    s1_lo = LeftoverARB(ser=s_1, cross_arr=a_2)

    d_2_1 = Deconvolve(arr=a_2, ser=s_1)
    s2_lo = LeftoverARB(ser=s_2, cross_arr=AggregateTwo(arr1=d_2_1, arr2=a_3))

    d_3_2 = Deconvolve(arr=a_3, ser=s_2)
    # d_3_2 = Deconvolve(arr=a_3, ser=Leftover(ser=s_2, arr=a_2))
    s3_lo = LeftoverARB(ser=s_3, cross_arr=d_3_2)

    s_23_lo = Convolve(ser1=s2_lo, ser2=s3_lo, indep=False, p=param_list[1])

    s_e2e = Convolve(ser1=s1_lo, ser2=s_23_lo, indep=False, p=param_list[2])

    return single_hop_bound(foi=foi,
                            s_e2e=s_e2e,
                            theta=theta,
                            perform_param=perform_param,
                            indep=True)
    def standard_bound(self, param_list: List[float]) -> float:
        theta = param_list[0]
        p = param_list[1]

        a_2 = self.arr_list[1]
        a_3 = self.arr_list[2]
        a_4 = self.arr_list[3]
        s_1 = self.ser_list[0]
        s_2 = self.ser_list[1]
        s_3 = self.ser_list[2]
        s_4 = self.ser_list[3]

        d_3_3 = Deconvolve(arr=a_3, ser=LeftoverARB(ser=s_3, cross_arr=a_2))
        d_4_4 = Deconvolve(arr=a_4,
                           ser=LeftoverARB(ser=s_4,
                                           cross_arr=Deconvolve(arr=a_2,
                                                                ser=s_3)))

        s_1_lo = LeftoverARB(ser=s_1, cross_arr=d_3_3)
        s_2_lo = LeftoverARB(ser=s_2, cross_arr=d_4_4)

        s_e2e = Convolve(ser1=s_1_lo, ser2=s_2_lo, indep=False, p=p)

        return single_hop_bound(foi=self.arr_list[0],
                                s_e2e=s_e2e,
                                theta=theta,
                                perform_param=self.perform_param,
                                indep=True)
예제 #4
0
    def standard_bound(self, param_list: List[float]) -> float:
        # conducts a PMOO analysis -> case distinction necessary
        theta = param_list[0]
        p = param_list[1]

        foi = self.arr_list[0]
        a_2 = self.arr_list[1]
        a_3 = self.arr_list[2]

        s_1 = self.ser_list[0]
        s_2 = self.ser_list[1]
        s_3 = self.ser_list[2]

        conv_s1_s2_lo = LeftoverARB(ser=Convolve(ser1=s_1,
                                                 ser2=LeftoverARB(
                                                     ser=s_2, cross_arr=a_3)),
                                    cross_arr=a_2)
        d_3_2 = Deconvolve(arr=a_3, ser=s_2)
        s3_lo = LeftoverARB(ser=s_3, cross_arr=d_3_2)

        s_e2e_1 = Convolve(ser1=conv_s1_s2_lo, ser2=s3_lo, indep=False, p=p)

        res_1 = single_hop_bound(foi=foi,
                                 s_e2e=s_e2e_1,
                                 theta=theta,
                                 perform_param=self.perform_param,
                                 indep=True)

        d_2_1 = Deconvolve(arr=a_2, ser=s_1)
        conv_s2_s3_lo = LeftoverARB(ser=Convolve(ser1=LeftoverARB(
            ser=s_2, cross_arr=d_2_1),
                                                 ser2=s_3),
                                    cross_arr=a_3)
        s1_lo = LeftoverARB(ser=s_1, cross_arr=a_2)

        s_e2e_2 = Convolve(ser1=s1_lo, ser2=conv_s2_s3_lo, indep=False, p=p)

        res_2 = single_hop_bound(foi=foi,
                                 s_e2e=s_e2e_2,
                                 theta=theta,
                                 perform_param=self.perform_param,
                                 indep=True)

        return min(res_1, res_2)
예제 #5
0
    def server_bound(self, param_list: List[float]) -> float:
        theta = param_list[0]

        foi = self.arr_list[0]
        a_2 = self.arr_list[1]
        a_3 = self.arr_list[2]

        s_1 = self.ser_list[0]
        s_2 = self.ser_list[1]
        s_3 = self.ser_list[2]

        conv_s1_s2_lo = LeftoverARB(ser=Convolve(ser1=s_1,
                                                 ser2=LeftoverARB(
                                                     ser=s_2, cross_arr=a_3)),
                                    cross_arr=a_2)
        d_3_2 = DetermTokenBucket(sigma_single=0.0, rho_single=s_2.rate, m=1)
        s3_lo = LeftoverARB(ser=s_3, cross_arr=d_3_2)

        s_e2e_1 = Convolve(ser1=conv_s1_s2_lo, ser2=s3_lo)

        res_1 = single_hop_bound(foi=foi,
                                 s_e2e=s_e2e_1,
                                 theta=theta,
                                 perform_param=self.perform_param,
                                 indep=True)

        d_2_1 = DetermTokenBucket(sigma_single=0.0, rho_single=s_1.rate, m=1)
        conv_s2_s3_lo = LeftoverARB(ser=Convolve(ser1=LeftoverARB(
            ser=s_2, cross_arr=d_2_1),
                                                 ser2=s_3),
                                    cross_arr=a_3)
        s1_lo = LeftoverARB(ser=s_1, cross_arr=a_2)

        s_e2e_2 = Convolve(ser1=s1_lo, ser2=conv_s2_s3_lo)

        res_2 = single_hop_bound(foi=self.arr_list[0],
                                 s_e2e=s_e2e_2,
                                 theta=theta,
                                 perform_param=self.perform_param,
                                 indep=True)

        return min(res_1, res_2)
    def standard_bound(self, param_list: List[float]) -> float:
        theta = param_list[0]

        if self.indep:
            p = 1.0
        else:
            p = param_list[1]

        return single_hop_bound(foi=self.arr_list[0],
                                s_e2e=self.server,
                                theta=theta,
                                perform_param=self.perform_param,
                                indep=self.indep,
                                p=p)
    def h_mit_bound(self, param_l_list: List[float]) -> float:
        output_list: List[Arrival] = [
            DeconvolvePowerMit(arr=self.arr_list[i],
                               ser=self.ser_list[i],
                               l_power=param_l_list[i])
            for i in range(1, self.number_servers)
        ]
        # we use i + 1, since i = 0 is the foi

        aggregated_cross: Arrival = AggregateList(arr_list=output_list,
                                                  indep=True,
                                                  p_list=[])
        s_e2e: Server = LeftoverARB(ser=self.ser_list[0],
                                    cross_arr=aggregated_cross)

        return single_hop_bound(foi=self.arr_list[0],
                                s_e2e=s_e2e,
                                theta=param_l_list[0],
                                perform_param=self.perform_param)
예제 #8
0
    def fp_bound(self, param_list: List[float]) -> float:
        theta = param_list[0]

        foi = self.arr_list[0]
        a_2 = self.arr_list[1]
        a_3 = self.arr_list[2]

        s_1 = self.ser_list[0]
        s_2 = self.ser_list[1]
        s_3 = self.ser_list[2]

        s_23_conv = Convolve(ser1=s_2, ser2=s_3)
        s_23_lo = LeftoverARB(ser=s_23_conv, cross_arr=a_3)
        s_123_conv = Convolve(ser1=s_1, ser2=s_23_lo)
        s_e2e = LeftoverARB(ser=s_123_conv, cross_arr=a_2)

        return single_hop_bound(foi=foi,
                                s_e2e=s_e2e,
                                theta=theta,
                                perform_param=self.perform_param,
                                indep=True)