def __init__(self, name, F=None, FY=None, S=None, SY=None, M=None,
                 D_cba=None, D_pba=None, D_imp=None, D_exp=None,
                 unit=None, **kwargs):
        """ Init function - see docstring class """
        self.name = name
        self.F = F
        self.FY = FY
        self.S = S
        self.SY = SY
        self.M = M
        self.D_cba = D_cba
        self.D_pba = D_pba
        self.D_imp = D_imp
        self.D_exp = D_exp
        self.unit = unit

        for ext in kwargs:
            setattr(self, ext, kwargs[ext])

        # Internal attributes

        # minimal necessary to calc the rest excluding FY since this might be
        # not necessarily present
        self.__basic__ = ['F']
        self.__D_accounts__ = ['D_cba', 'D_pba', 'D_imp', 'D_exp',
                               'D_cba_reg', 'D_pba_reg',
                               'D_imp_reg', 'D_exp_reg',
                               'D_cba_cap', 'D_pba_cap',
                               'D_imp_cap', 'D_exp_cap']
        self.__non_agg_attributes__ = ['S', 'SY', 'M',
                                       'D_cba_reg', 'D_pba_reg',
                                       'D_imp_reg', 'D_exp_reg',
                                       'D_cba_cap', 'D_pba_cap',
                                       'D_imp_cap', 'D_exp_cap']

        self.__coefficients__ = ['S', 'SY', 'M']

        # check if all accounts are available
        for acc in self.__D_accounts__:
            if acc not in self.__dict__:
                setattr(self, acc, None)
def __init__ ( self , name , F = None , FY = None , S = None , SY = None , M = None , D_cba = None , D_pba = None , D_imp = None , D_exp = None , unit = None , ** kwargs ) : self . name = name self . F = F self . FY = FY self . S = S self . SY = SY self . M = M self . D_cba = D_cba self . D_pba = D_pba self . D_imp = D_imp self . D_exp = D_exp self . unit = unit for ext in kwargs : setattr ( self , ext , kwargs [ ext ] ) self . __basic__ = [ 'F' ] self . __D_accounts__ = [ 'D_cba' , 'D_pba' , 'D_imp' , 'D_exp' , 'D_cba_reg' , 'D_pba_reg' , 'D_imp_reg' , 'D_exp_reg' , 'D_cba_cap' , 'D_pba_cap' , 'D_imp_cap' , 'D_exp_cap' ] self . __non_agg_attributes__ = [ 'S' , 'SY' , 'M' , 'D_cba_reg' , 'D_pba_reg' , 'D_imp_reg' , 'D_exp_reg' , 'D_cba_cap' , 'D_pba_cap' , 'D_imp_cap' , 'D_exp_cap' ] self . __coefficients__ = [ 'S' , 'SY' , 'M' ] for acc in self . __D_accounts__ : if acc not in self . __dict__ : setattr ( self , acc , None )
Init function - see docstring class