当前位置: 首页>>代码示例>>Python>>正文


Python ModelChain.__repr__方法代码示例

本文整理汇总了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')
开发者ID:dpete2008,项目名称:Sandia,代码行数:13,代码来源:test_modelchain.py

示例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')
开发者ID:JohannesOos,项目名称:pvlib-python,代码行数:15,代码来源:test_modelchain.py

示例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
开发者ID:mikofski,项目名称:pvlib-python,代码行数:24,代码来源:test_modelchain.py


注:本文中的pvlib.modelchain.ModelChain.__repr__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。