本文整理汇总了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)