Exemple #1
0
for ct in ['Eco', 'Soc', 'Env']:
    
  printline()
  print('RUBIS Best Choice Recommendation from {} point of view'.format(ct))
  printline()

  criterias = [c for c, val in pt.criteria.items() if ct in val['name']]
  ppt = PartialPerformanceTableau(pt,criteriaSubset=criterias)

  partial_digraph = BipolarOutrankingDigraph(ppt)

  html_heatmap = ppt.htmlPerformanceHeatmap(colorLevels=5)
  fwrite(html_heatmap, make_path(ct+"_heatmap.html"))

  html_relationtable = partial_digraph.htmlRelationTable(isColored=True)
  fwrite(html_relationtable, make_path(ct+"_bipolar_adj_matrix.html"))

  condorcet_winners = partial_digraph.condorcetWinners()
  printline()
  print("Condorcet winners for {} -> {}".format(ct, condorcet_winners))
  printline()

  weak_condorcet_winners = partial_digraph.weakCondorcetWinners()
  printline()
  print("Weak Condorcet winners for {} -> {}".format(ct, weak_condorcet_winners))
  printline()

  partial_digraph.showRubisBestChoiceRecommendation()

  printline()
printline()
pt.showActions()
print('')

printline()
print('Statistics')
printline()
pt.showStatistics()
print('')

full_digraph = BipolarOutrankingDigraph(pt)

html_heatmap = pt.htmlPerformanceHeatmap(RankingRule='Kohler')
fwrite(html_heatmap, make_path("full_heatmap.html"))

html_relationtable = full_digraph.htmlRelationTable(isColored=True)
fwrite(html_relationtable, make_path("full_bipolar_adj_matrix.html"))

weak_condorcet_winners = full_digraph.weakCondorcetWinners()
printline()
print("Weak Condorcet winners from a multi-objectives point of view -> {}".
      format(weak_condorcet_winners))
printline()

condorcet_winners = full_digraph.condorcetWinners()
printline()
print("Condorcet winners from a multi-objectives point of view -> {}".format(
    condorcet_winners))
printline()

printline()
printline()
pt.showActions()
print('')

printline()
print('Statistics')
printline()
pt.showStatistics()
print('')

full_digraph = BipolarOutrankingDigraph(pt)

html_heatmap = pt.htmlPerformanceHeatmap(RankingRule='Kohler')
fwrite(html_heatmap, make_path("full_heatmap.html"))

html_relationtable = full_digraph.htmlRelationTable(isColored=True)
fwrite(html_relationtable, make_path("full_bipolar_adj_matrix.html"))

weak_condorcet_winners = full_digraph.weakCondorcetWinners()
printline()
print("Weak Condorcet winners from a multi-objectives point of view -> {}".format(weak_condorcet_winners))
printline()

condorcet_winners = full_digraph.condorcetWinners()
printline()
print("Condorcet winners from a multi-objectives point of view -> {}".format(condorcet_winners))
printline()

printline()
print('RUBIS Best Choice Recommendation from a global multi-objectives compromise point of view')
printline()