def testbigOutrankingDigraph(): print("==>> Testing bigOutrankingDigraph instantiation") # from outrankingDigraphs import BipolarOutrankingDigraph MP = True t0 = time() ctp = cR3ObjPT(numberOfActions=100, seed=100) # tp = R3ObjPT(numberOfActions=100,seed=100) print(time() - t0) print(total_size(ctp.evaluation)) bg1 = BigIntegerOutrankingDigraph( ctp, quantiles=10, quantilesOrderingStrategy="average", LowerClosed=True, CopyPerfTab=True, minimalComponentSize=1, Threading=MP, Debug=False, ) print(bg1.computeDecompositionSummaryStatistics()) bg1.showDecomposition() print(bg1) t0 = time() gi = IntegerBipolarOutrankingDigraph(ctp, Threading=MP) # g = BipolarOutrankingDigraph(tp,Normalized=True,Threading=MP) print(time() - t0) print(total_size(gi)) t0 = time() print("Big outranking digraph's correlation with standard outranking digraph") print(bg1.computeOrdinalCorrelation(gi, Debug=False)) print(time() - t0)
def testCopelandOrdering(): print('==>> Testing Copeland order computation') t = cR3ObjPT(numberOfActions=10, seed=1) print(t) t.showPerformanceTableau() g = IntegerBipolarOutrankingDigraph(t, Threading=True, nbrCores=4) print(g.computeCopelandRanking()) print(g.computeCopelandOrder()) g.showRelationMap()
def testStandardConversion(): print('==>> Testing 2 Standard conversion') t = cR3ObjPT(numberOfActions=10, seed=1) print(t) gi = IntegerBipolarOutrankingDigraph(t, Threading=True, nbrCores=4) print(gi) gi.showRelationTable() tstd = t.convert2Standard() g = BipolarOutrankingDigraph(tstd) print(g) g.showRelationTable()
def testcIntegerOutrankingDigraph(): print('==>> Testing IntegerBipolarOutrankingDigraph instantiation') tc = cR3ObjPT(seed=1) print(tc) gi = IntegerBipolarOutrankingDigraph(tc, Threading=True, nbrCores=4) print(gi) gi.showRelationTable() tcstd = tc.convert2Standard() g = BipolarOutrankingDigraph(tcstd) print(g) g.showRelationTable()
def testSaveCPerformanceTableau(): print('==>> Testing CPerformanceTableau saving and loading') t = cR3ObjPT(numberOfActions=5, seed=1) print(t) t.showPerformanceTableau() t.save('voir') g = IntegerBipolarOutrankingDigraph(t, Threading=True, nbrCores=4) g.showRelationTable() t1 = cPerformanceTableau('voir') print(t) t1.showPerformanceTableau() g1 = IntegerBipolarOutrankingDigraph(t, Threading=True, nbrCores=4) g1.showRelationTable()
def testconvert2DecimalValuation(): t = cR3ObjPT(numberOfActions=13,numberOfCriteria=7,seed=2) g = IntegerBipolarOutrankingDigraph(t) print(g) g.convertValuation2Decimal() print(g) print(g.valuationdomain) g.recodeValuation(-1,1) print(g.valuationdomain) g.showRelationMap() t.showPerformanceTableau() g.convertEvaluationFloatToDecimal() t.showHTMLPerformanceTableau()
## minimalComponentSize=minimalSize, ## LowerClosed=False, ## Threading=MP, ## nbrOfCPUs=nbrOfCPUs, ## nbrOfThreads=nbrOfThreads, ## CopyPerfTab=False, ## Comments=True, ## Debug=False) ## ## print(bg1) t0 = time() tp2 = cR3ObjPT(numberOfActions=nbrActions, numberOfCriteria=nbrCriteria, weightDistribution='equiobjectives', # commonPercentiles={'ind':0.01,'pref':0.025,'veto':0.975}, commonMode=commonPar, # Threading=MP, #BigData=True, # nbrCores=nbrOfCPUs, seed=seed) print(tp2.name) print(time()-t0) bg2 = iBg.BigIntegerOutrankingDigraph(tp2,quantiles=qtiles, quantilesOrderingStrategy='average', minimalComponentSize=minimalSize, LowerClosed=False, Threading=MP, CopyPerfTab=False, nbrOfCPUs=nbrOfCPUs, nbrOfThreads=nbrOfCPUs, nbrOfSubProcesses=nbrOfSubProcesses,
def testcIntegerOutrankingDigraph(): t = cR3ObjPT(seed=1) gi = IntegerBipolarOutrankingDigraph(t) gi.showShort() print(gi) gi.showRelationTable()