本文整理汇总了Python中pvlib.modelchain.ModelChain.__repr__方法的典型用法代码示例。如果您正苦于以下问题:Python ModelChain.__repr__方法的具体用法?Python ModelChain.__repr__怎么用?Python ModelChain.__repr__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pvlib.modelchain.ModelChain
的用法示例。
在下文中一共展示了ModelChain.__repr__方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_ModelChain___repr__
# 需要导入模块: from pvlib.modelchain import ModelChain [as 别名]
# 或者: from pvlib.modelchain.ModelChain import __repr__ [as 别名]
def test_ModelChain___repr__(system, location):
strategy = 'south_at_latitude_tilt'
mc = ModelChain(system, location, orientation_strategy=strategy)
assert mc.__repr__() == ('ModelChain for: PVSystem with tilt:32.2 and '+
'azimuth: 180 with Module: None and Inverter: None '+
'orientation_startegy: south_at_latitude_tilt clearsky_model: '+
'ineichen transposition_model: haydavies solar_position_method: '+
'nrel_numpy airmass_model: kastenyoung1989')
示例2: test_ModelChain___repr__
# 需要导入模块: from pvlib.modelchain import ModelChain [as 别名]
# 或者: from pvlib.modelchain.ModelChain import __repr__ [as 别名]
def test_ModelChain___repr__():
system = PVSystem()
location = Location(32.2, -111, altitude=700)
strategy = 'south_at_latitude_tilt'
mc = ModelChain(system, location, orientation_strategy=strategy)
# the || accounts for the coercion of 'None' to None
assert mc.__repr__() == ('ModelChain for: PVSystem with tilt:32.2 and '+
'azimuth: 180 with Module: None and Inverter: None '+
'orientation_startegy: south_at_latitude_tilt clearsky_model: '+
'ineichentransposition_model: haydavies solar_position_method: '+
'nrel_numpyairmass_model: kastenyoung1989')
示例3: test_ModelChain___repr__
# 需要导入模块: from pvlib.modelchain import ModelChain [as 别名]
# 或者: from pvlib.modelchain.ModelChain import __repr__ [as 别名]
def test_ModelChain___repr__(system, location, strategy, strategy_str):
mc = ModelChain(system, location, orientation_strategy=strategy,
name='my mc')
expected = '\n'.join([
'ModelChain: ',
' name: my mc',
' orientation_strategy: ' + strategy_str,
' clearsky_model: ineichen',
' transposition_model: haydavies',
' solar_position_method: nrel_numpy',
' airmass_model: kastenyoung1989',
' dc_model: sapm',
' ac_model: snlinverter',
' aoi_model: sapm_aoi_loss',
' spectral_model: sapm_spectral_loss',
' temp_model: sapm_temp',
' losses_model: no_extra_losses'
])
assert mc.__repr__() == expected