本文整理汇总了Python中datamapfunctions.Abstract.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Abstract.__init__方法的具体用法?Python Abstract.__init__怎么用?Python Abstract.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datamapfunctions.Abstract
的用法示例。
在下文中一共展示了Abstract.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, service_demand_unit, **kwargs):
self.id = id
self.service_demand_unit = service_demand_unit
self.sql_id_table = 'DemandServiceEfficiency'
self.sql_data_table = 'DemandServiceEfficiencyData'
self.input_type = 'intensity'
Abstract.__init__(self, self.id, 'subsector_id')
示例2: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, tech, sql_id_table, sql_data_table, **kwargs):
self.id = tech.id
self.service_demand_unit = tech.service_demand_unit
self.input_type = 'intensity'
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
Abstract.__init__(self, self.id, 'demand_tech_id')
示例3: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, tech, sql_id_table, sql_data_table, scenario=None, **kwargs):
self.id = tech.id
self.scenario = scenario
self.input_type = 'intensity'
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
Abstract.__init__(self, self.id, 'demand_technology_id')
示例4: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, sql_id_table, sql_data_table):
self.id = id
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
self.mapped = False
Abstract.__init__(self, self.id, data_id_key='parent_id')
self.input_type='total'
示例5: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id,**kwargs):
self.id = id
self.sql_id_table = 'DispatchFeedersAllocation'
self.sql_data_table = 'DispatchFeedersAllocationData'
Abstract.__init__(self, self.id, primary_key='id', data_id_key='parent_id')
self.remap()
self.values.sort_index(inplace=True)
示例6: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, scenario, **kwargs):
self.id = id
self.input_type = 'intensity'
self.sql_id_table = 'SupplyTechsCO2Capture'
self.sql_data_table = 'SupplyTechsCO2CaptureData'
self.scenario = scenario
Abstract.__init__(self, id, 'supply_tech_id')
示例7: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, service_link_id, id, sql_id_table, sql_data_table, **kwargs):
self.service_link_id = service_link_id
self.id = id
self.input_type = 'intensity'
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
Abstract.__init__(self, self.id)
示例8: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, subsector_id, sql_id_table, sql_data_table):
self.id = id
self.subsector_id = subsector_id
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
self.mapped = False
Abstract.__init__(self, self.id)
示例9: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, sql_id_table, sql_data_table, book_life=None, **kwargs):
self.id = id
self.name = sql_data_table
self.input_type = 'intensity'
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
self.book_life = book_life
Abstract.__init__(self, id, primary_key='supply_tech_id', data_id_key='supply_tech_id')
示例10: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id):
self.id = id
self.sql_id_table = 'DemandFlexibleLoadMeasures'
self.sql_data_table = 'DemandFlexibleLoadMeasuresData'
Abstract.__init__(self, self.id, primary_key='id', data_id_key='parent_id')
self.input_type = 'intensity'
self.remap()
self.values.sort_index(inplace=True)
示例11: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, cost_of_capital, **kwargs):
self.id = id
self.sql_id_table = 'DemandEnergyEfficiencyMeasures'
self.sql_data_table = 'DemandEnergyEfficiencyMeasuresData'
Abstract.__init__(self, self.id, primary_key='id', data_id_key='parent_id')
DemandMeasure.__init__(self)
self.calculate_book_life()
self.cost_of_capital = cost_of_capital
self.cost = DemandMeasureCost(id, self.cost_of_capital, self.book_life, 'DemandEnergyEfficiencyMeasuresCost', 'DemandEnergyEfficiencyMeasuresCostData')
示例12: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, cost_of_capital, service_demand_unit, **kwargs):
self.id = id
self.service_demand_unit = service_demand_unit
self.sql_id_table = 'DemandServiceDemandMeasures'
self.sql_data_table = 'DemandServiceDemandMeasuresData'
Abstract.__init__(self, self.id)
DemandMeasure.__init__(self)
self.cost_of_capital = cost_of_capital
self.calculate_book_life()
self.cost = DemandMeasureCost(id, self.cost_of_capital, self.book_life, 'DemandServiceDemandMeasuresCost',
'DemandServiceDemandMeasuresCostData')
示例13: _setup_and_validate
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def _setup_and_validate(self):
Abstract.__init__(self, self.id, primary_key='id', data_id_key='parent_id')
if self.raw_values is None:
self._setup_zero_constraints()
return
self._validate_gaus()
self.values = self.clean_timeseries(attr='raw_values', inplace=False, time_index=cfg.supply_years, time_index_name='year', interpolation_method=self.interpolation_method, extrapolation_method=self.extrapolation_method)
# fill in any missing combinations of geographies
self.values = util.reindex_df_level_with_new_elements(self.values, 'geography_from', cfg.dispatch_geographies)
self.values = util.reindex_df_level_with_new_elements(self.values, 'geography_to', cfg.dispatch_geographies)
self.values = self.values.fillna(0)
self.values = self.values.sort()
示例14: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, supply_node_id, sql_id_table, sql_data_table, primary_key, data_id_key, reference=False):
self.id = id
self.input_type = 'total'
self.supply_node_id = supply_node_id
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
self.mapped = False
if reference:
for col, att in util.object_att_from_table(self.sql_id_table, self.supply_node_id, primary_key):
setattr(self, col, att)
DataMapFunctions.__init__(self, data_id_key)
self.read_timeseries_data(supply_node_id=self.supply_node_id)
self.raw_values = util.remove_df_levels(self.raw_values, 'supply_technology')
else:
# measure specific sales does not require technology filtering
Abstract.__init__(self, self.id, primary_key=primary_key, data_id_key=data_id_key)
示例15: __init__
# 需要导入模块: from datamapfunctions import Abstract [as 别名]
# 或者: from datamapfunctions.Abstract import __init__ [as 别名]
def __init__(self, id, supply_node_id, sql_id_table, sql_data_table, reference=False):
self.id = id
self.supply_node_id = supply_node_id
self.sql_id_table = sql_id_table
self.sql_data_table = sql_data_table
self.mapped = False
self.input_type = 'intensity'
if reference:
for col, att in util.object_att_from_table(self.sql_id_table, self.supply_node_id, 'supply_node_id'):
if att is not None:
setattr(self, col, att)
DataMapFunctions.__init__(self, 'supply_technology')
self.read_timeseries_data()
self.raw_values = util.remove_df_levels(self.raw_values, ['supply_node','supply_technology'])
else:
# measure specific sales share does not require technology filtering
Abstract.__init__(self, self.id)