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


Python Data.tag方法代码示例

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


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

示例1: evaluate_range_from_short_field

# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import tag [as 别名]
def evaluate_range_from_short_field(vehicle,mission,results):

    # unpack
    airport_short_field = mission.airport_short_field
    tofl = airport_short_field.field_lenght
    takeoff_config = vehicle.configs.takeoff

    from SUAVE.Methods.Performance import find_takeoff_weight_given_tofl

    # evaluate maximum allowable takeoff weight from a short field
    tow_short_field = find_takeoff_weight_given_tofl(vehicle,takeoff_config,airport_short_field,tofl)

    # determine maximum range based in tow short_field

    from SUAVE.Methods.Performance import size_mission_range_given_weights
    # unpack
    cruise_segment_tag = 'Cruise'
    mission_payload = vehicle.mass_properties.payload
    # call function
    distance,fuel = size_mission_range_given_weights(vehicle,mission,cruise_segment_tag,mission_payload,tow_short_field)

    # pack
    short_field = Data()
    short_field.tag            = 'short_field'
    short_field.takeoff_weight = tow_short_field
    short_field.range          = distance
    short_field.fuel           = fuel

    results.short_field = short_field

    return results
开发者ID:designToolDeveloper,项目名称:SUAVE,代码行数:33,代码来源:the_aircraft_function_EMBRAER.py

示例2: evaluate_field_length

# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import tag [as 别名]
def evaluate_field_length(vehicle,mission,results):

    # unpack
    airport = mission.airport

    takeoff_config = vehicle.configs.takeoff
    landing_config = vehicle.configs.landing

    from SUAVE.Methods.Performance import estimate_take_off_field_length
    from SUAVE.Methods.Performance import estimate_landing_field_length

    # evaluate
    TOFL = estimate_take_off_field_length(vehicle,takeoff_config,airport)
    LFL = estimate_landing_field_length(vehicle,landing_config,airport)

    # pack
    field_length = Data()
    field_length.tag = 'field_length'
    field_length.takeoff = TOFL[0]
    field_length.landing = LFL[0]

    results.field_length = field_length

    return results
开发者ID:designToolDeveloper,项目名称:SUAVE,代码行数:26,代码来源:the_aircraft_function_EMBRAER.py


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