def __init__(self, config): self.config = config Serializable.__init__(self, "") self.output_folder = join(config.folders.run, "results") self.print_measures = self.config.measures self.print_aggregations = self.config.iter_aggregations if self.print_aggregations is None: self.print_aggregations = ("mean", "std")
def __init__(self, consumes=None): """Generic learning constructor """ # initialize evaluation Serializable.__init__(self, "") self.models = [] self.predictions = [] self.prediction_roles = [] self.prediction_model_indexes = []
def __init__(self, skip_init=False): """Dataset constructor Arguments: skip_init {bool} -- Wether to initialize the serializable superclass mechanism """ random.seed(self.config.misc.seed) if skip_init or self.config is None: return Serializable.__init__(self, self.dir_name) self.config.full_name = self.name self.filter_stopwords = self.config.filter_stopwords self.remove_digits = self.config.remove_digits
def __init__(self, timestep, power_nominal, input_link, file_path=None): # Read component parameters from json file if file_path: self.load(file_path) else: print( 'Attention: No json file for power component efficiency specified' ) self.specification = "MPPT_HQST_40A_12V_34V" # [-] Specification of power component self.efficiency_nominal = 0.951 # [1] Nominal power component efficeincy self.voltage_loss = 0.009737 # [-] Dimensionless parameter for component model self.resistance_loss = 0.031432 # [-] Dimensionless parameter for component model self.power_self_consumption = 0.002671 # [-] Dimensionless parameter for component model self.end_of_life_power_components = 315360000 # [s] End of life time in seconds self.investment_costs_specific = 0.036 # [$/Wp] Specific investment costs # Integrate Serializable for serialization of component parameters Serializable.__init__(self) # not needed !? # Integrate Simulatable class for time indexing Simulatable.__init__(self) # not needed !? # Integrate input power self.input_link = input_link # [s] Timestep self.timestep = timestep #Calculate star parameters of efficeincy curve self.voltage_loss_star = self.voltage_loss self.resistance_loss_star = self.resistance_loss / self.efficiency_nominal self.power_self_consumption_star = self.power_self_consumption * self.efficiency_nominal ## Power model # Initialize power self.power = 0 # set nominal power of power component self.power_nominal = power_nominal ## Economic model # Nominal installed component size for economic calculation self.size_nominal = power_nominal
def __init__(self, timestep, power_nominal, input_link, file_path=None): ''' Parameters ---------- timestep: int. Simulation timestep in seconds power_nominal : int. Nominal power of power component in watt [W] input_link : class. Class of component which supplies input power file_path : json file to load power component parameters ''' # Read component parameters from json file if file_path: self.load(file_path) else: print( 'Attention: No json file for power component efficiency specified' ) self.specification = "Generic system controller" # [-] Specification of power component self.end_of_life_power_components = 315360000 # [s] End of life time in seconds self.investment_costs_specific = 0.036 # [$/Wp] Specific investment costs # Integrate Serializable for serialization of component parameters Serializable.__init__(self) # not needed !? # Integrate Simulatable class for time indexing Simulatable.__init__(self) # not needed !? # Integrate input power self.input_link = input_link # [s] Timestep self.timestep = timestep ## Power model # Initialize power self.power = 0 # set nominal power of power component self.power_nominal = power_nominal ## Economic model # Nominal installed component size for economic calculation self.size_nominal = power_nominal
def populate(self): Serializable.__init__(self, self.dir_name) self.set_serialization_params() self.acquire_data()