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


Python Component.setResistanceCov方法代码示例

本文整理汇总了Python中component.Component.setResistanceCov方法的典型用法代码示例。如果您正苦于以下问题:Python Component.setResistanceCov方法的具体用法?Python Component.setResistanceCov怎么用?Python Component.setResistanceCov使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在component.Component的用法示例。


在下文中一共展示了Component.setResistanceCov方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: zip

# 需要导入模块: from component import Component [as 别名]
# 或者: from component.Component import setResistanceCov [as 别名]
    # Structural age
    service_time = np.arange(START_AGE+TIME_INTERVAL,END_AGE+TIME_INTERVAL,TIME_INTERVAL)
    comp_type_list = ['flexure', 'shear', 'deck']
    icorr_mean_list = [1, 1, 1]

    # construct virgin component
    str_yr_list = [0, 0, 0]
    cost_list = []
    virgin_component_list = []
    for comp_type,str_yr,icorr_mean in zip(comp_type_list, str_yr_list, icorr_mean_list):
        virgin_component = Component(comp_type, maintain_tag=False, str_yr=str_yr)
        resistance_mean,resistance_cov,cost = simpleCorrosionLHS(comp_type, service_time, icorr_mean, str_yr)
        virgin_component.setServiceTime(service_time)
        virgin_component.setResistanceMean(resistance_mean)
        virgin_component.setResistanceCov(resistance_cov)
        virgin_component.setCESampling(NUM_COMPONENT, NUM_ADAPTATION, NUM_PRE_SMP, NUM_MAIN_SMP)
        virgin_component_list.append(virgin_component)
        cost_list.append(cost)

    # strengthened component
    str_yr_list = [0, 50, 0]
    cost_list = []
    component_list = []
    for comp_type,str_yr,icorr_mean in zip(comp_type_list, str_yr_list, icorr_mean_list):
        component = Component(comp_type, maintain_tag=False, str_yr=str_yr)
        resistance_mean,resistance_cov,cost = simpleCorrosionLHS(comp_type, service_time, icorr_mean, str_yr)
        component.setServiceTime(service_time)
        component.setResistanceMean(resistance_mean)
        component.setResistanceCov(resistance_cov)
        component.setCESampling(NUM_COMPONENT, NUM_ADAPTATION, NUM_PRE_SMP, NUM_MAIN_SMP)
开发者ID:cedavidyang,项目名称:Life_Cycle_Management_Optimization,代码行数:32,代码来源:system.py


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