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