Example #1
0
def testCoDualDigraph():
    print('*---- test codual digraph -----*')
    t = RandomCBPerformanceTableau(numberOfActions=13, numberOfCriteria=7)
    g = BipolarOutrankingDigraph(t)
    g.save('testcodual')
    gasym = AsymmetricPartialDigraph(g)
    gasym.exportGraphViz('gtest')
    gcd = CoDualDigraph(g)
    gcd.exportGraphViz('gcdtest')
Example #2
0
def testExportPrincipalImage():
    print('*------- test exportRelationPCAImage --------*')
    t = RandomCBPerformanceTableau(numberOfActions=10,
                                   weightDistribution="equiobjectives")
    g = BipolarOutrankingDigraph(t)
    g.save('test')
    g = Digraph('test')
    g.showRelationTable()
    g.exportPrincipalImage('bipolar', bgcolor='lightblue')
    g.recodeValuation(0, 2)
    g.exportPrincipalImage('monopolar',
                           pictureFormat='xfig',
                           fontcolor='black',
                           fontsize='1.2')