First attempt at evaluating the quality of matchings.
[match/match.git] / program / Test.hs
index 8307e38..1530aa9 100644 (file)
@@ -13,7 +13,10 @@ module Test (
        
        -- Run randomized things.
        module System.Random,
-       module RandomizedMonad
+       module RandomizedMonad,
+       
+       -- Evaluate.
+       module Evaluation
 ) where
 import TestUtils
 import PMInstance
@@ -22,6 +25,7 @@ import ProposalMatcher
 import PMDefaults
 import System.Random
 import RandomizedMonad
+import Evaluation
 
 -- Other imports we need
 import BellmanFord
@@ -71,3 +75,8 @@ rrg2 = flowAnnotate rrg rdnFlowArray
 myMatching = doMatching pmDefaults myInst
 
 iGraph = showInstanceAsGraph myInst myMatching -- Visualize me!
+
+-- Evaluation!
+eInst = runRandom myGen $ randomInstance 20 50
+eval1 = doEvaluateMatching pmDefaults eInst
+eval2 = doEvaluateMatching pmDefaults{loadTolerance = 2} eInst