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


Python Data.range方法代码示例

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


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

示例1: short_field

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import range [as 别名]
def short_field(interface):

    # unpack data
    results_field   = interface.results.takeoff_field_length
    results_fuel    = interface.results.fuel_for_missions
    available_tofl  = interface.analyses.missions.short_field.mission.airport.available_tofl
 
    tofl_vec        = results_field.takeoff_field_length
    weight_vec_tofl = results_field.takeoff_weights
    
    range_vec       = results_fuel.distances
    weight_vec_fuel = results_fuel.weights
    fuel_vec        = results_fuel.fuels
        
    # evaluate maximum allowable takeoff weight from a given airfield
    tow_short_field = np.interp(available_tofl,tofl_vec,weight_vec_tofl)

    # determine maximum range/fuel based in tow short_field
    range_short_field = np.interp(tow_short_field,weight_vec_fuel,range_vec)
    fuel_short_field  = np.interp(tow_short_field,weight_vec_fuel,fuel_vec)

    # pack 
    results = Data()
    results.tag            = 'short_field'
    results.takeoff_weight = tow_short_field
    results.range          = range_short_field
    results.fuel           = fuel_short_field

    return results
开发者ID:aerialhedgehog,项目名称:SUAVE,代码行数:31,代码来源:optimization_interface.py

示例2: evaluate_range_from_short_field

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import range [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:aerialhedgehog,项目名称:SUAVE,代码行数:33,代码来源:the_aircraft_function_EMBRAER.py

示例3: mission_fuel

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import range [as 别名]
def mission_fuel(interface):

    # unpack data
    design_range  = interface.analyses.missions.fuel.range  
    range_vec     = interface.results.fuel_for_missions.distances
    fuel_vec      = interface.results.fuel_for_missions.fuels
        
    # determine maximum range/fuel based in tow short_field
    fuel_design_mission  = np.interp(design_range,range_vec,fuel_vec)

    # pack results
    results = Data()
    results.tag            = 'design_mission'
    results.range          = design_range
    results.fuel           = fuel_design_mission

    return results
开发者ID:aerialhedgehog,项目名称:SUAVE,代码行数:19,代码来源:optimization_interface.py

示例4: max_range

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import range [as 别名]
def max_range(interface):

    # unpack data
    max_takeoff_weight  = interface.configs.base.mass_properties.max_takeoff
    range_vec           = interface.results.fuel_for_missions.distances
    weight_vec_fuel     = interface.results.fuel_for_missions.weights
    fuel_vec            = interface.results.fuel_for_missions.fuels
        
    # determine maximum range/fuel based in max_tow
    range = np.interp(max_takeoff_weight,weight_vec_fuel,range_vec)
    fuel  = np.interp(max_takeoff_weight,weight_vec_fuel,fuel_vec)

    # pack results
    results = Data()
    results.tag            = 'short_field'
    results.takeoff_weight = max_takeoff_weight
    results.range          = range
    results.fuel           = fuel

    return results
开发者ID:aerialhedgehog,项目名称:SUAVE,代码行数:22,代码来源:optimization_interface.py


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