本文整理汇总了Python中PyXMCDA.getAlternativeValue方法的典型用法代码示例。如果您正苦于以下问题:Python PyXMCDA.getAlternativeValue方法的具体用法?Python PyXMCDA.getAlternativeValue怎么用?Python PyXMCDA.getAlternativeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyXMCDA
的用法示例。
在下文中一共展示了PyXMCDA.getAlternativeValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_input_data
# 需要导入模块: import PyXMCDA [as 别名]
# 或者: from PyXMCDA import getAlternativeValue [as 别名]
#.........这里部分代码省略.........
comparison_with = kwargs.get("comparison_with")
if trees.has_key("methos_parameters"):
comparison_with = px.getParameterByName(trees["method_parameters"], "comparison_with")
if kwargs.get("use_partials") is not None:
use_partials = kwargs.get("use_partials")
else:
if trees.has_key("methos_parameters"):
parameter = px.getParameterByName(trees["method_parameters"], "use_partials")
use_partials = True if parameter == "true" else False
categories_profiles = None
profiles = None
if comparison_with in ("boundary_profiles", "central_profiles"):
categories_profiles = _get_categories_profiles(trees["categories_profiles"], comparison_with)
if comparison_with == "profiles":
profiles = px.getProfilesID(trees["profiles"])
d.discordance = _get_alternatives_comparisons(
trees["discordance"],
alternatives,
profiles=profiles,
categories_profiles=categories_profiles,
use_partials=use_partials,
use_value=False,
)
elif p == "preorder":
if trees.has_key("preorder"):
alternatives = px.getAlternativesID(trees["alternatives"])
d.preorder = px.getAlternativeValue(trees["preorder"], alternatives, None)
elif p == "downwards":
alternatives = px.getAlternativesID(trees["alternatives"])
d.downwards = px.getAlternativeValue(trees["downwards"], alternatives, None)
elif p == "upwards":
alternatives = px.getAlternativesID(trees["alternatives"])
d.upwards = px.getAlternativeValue(trees["upwards"], alternatives, None)
elif p == "eliminate_cycles_method":
d.eliminate_cycles_method = px.getParameterByName(trees["method_parameters"], "eliminate_cycles_method")
elif p == "interactions":
criteria = px.getCriteriaID(trees["criteria"])
d.interactions = _get_criteria_interactions(trees["interactions"], criteria)
elif p == "outranking":
alternatives = px.getAlternativesID(trees["alternatives"])
outranking = _get_intersection_distillation(trees["outranking"], alternatives)
if outranking == None:
outranking = px.getAlternativesComparisons(trees["outranking"], alternatives)
if outranking == {}:
outranking = _get_outranking(trees["outranking"])
d.outranking = outranking
elif p == "nonoutranking":
if trees.has_key("nonoutranking"):
alternatives = px.getAlternativesID(trees["alternatives"])
nonoutranking = _get_intersection_distillation(trees["nonoutranking"], alternatives)
if nonoutranking == None:
nonoutranking = px.getAlternativesComparisons(trees["nonoutranking"], alternatives)