X-Git-Url: https://mattmccutchen.net/match/match.git/blobdiff_plain/05a6f0edaacc70ab373988ec4bafdf9963551004..35ce78e3b164a71da6177f0577b598a12198d237:/program/PMDefaults.hs diff --git a/program/PMDefaults.hs b/program/PMDefaults.hs index b5ef0c7..2f4a687 100644 --- a/program/PMDefaults.hs +++ b/program/PMDefaults.hs @@ -1,13 +1,14 @@ module PMDefaults where import PMInstance -import ProposalMatcher +import PMConfig import qualified NaiveMinCostFlow import qualified CS2MinCostFlow +-- A default set of configuration values; see module PMConfig. pmDefaults = PMConfig { --- Choose a min-cost flow implementation (timings on mattlaptop2): +-- === Choose a min-cost flow implementation (timings on mattlaptop2) === -- A naive implementation that is slow for all but the smallest instances -- (30s on a 20x50 example). @@ -15,11 +16,15 @@ minCostFlow = NaiveMinCostFlow.minCostFlow, -- Uses CS2 (http://www.igsystems.com/cs2/), which requires a license for -- non-research use but is faster (<1s on a 20x50 example, 64s on a 60x500 --- example). Configure the path to cs2.exe in CS2MinCostFlow.hs. +-- example). Configure the path to cs2.exe in CS2MinCostFlow.hs. Remember to +-- compile CS2 with -DPRINT_ANS, or this won't work! --minCostFlow = CS2MinCostFlow.minCostFlow, +-- The number of reviews each proposal should get. reviewsEachProposal = 3, +-- === Interpretation of the preference values === + prefIsExpert = \p -> p <= 10, prefIsKnowledgeable = \p -> p <= 20, @@ -28,8 +33,12 @@ prefIsVeryBoring = \p -> p > 25, prefIsConflict = \p -> p >= 40, --- For now this is absolute. Later it might be proportional to a reviewer's --- target load. +-- === Tuning parameters for the matcher === + +-- The number of reviews by which a reviewer's load may exceed his/her target +-- load of (relativeLoad * ceiling(numProps * reviewsEachProposal / +-- totalRelativeLoad)). For now this is an additive constant; perhaps it should +-- be proportional to the target load. loadTolerance = 1, -- Cost to overload by one review. @@ -42,7 +51,7 @@ marginalBoringCost = \lx -> 1000 + lx*1000, -- Additional cost to review a very boring proposal. marginalVeryBoringCost = \lx -> 1000 + lx*1000, --- Cost to make a review. +-- Cost to make a review. Used by the evaluator too. -- I'm using quadratic cost functions as a first attempt. assignmentCost = \pref -> (numAsWt 10 + pref) ^ 2, @@ -50,6 +59,22 @@ assignmentCost = \pref -> (numAsWt 10 + pref) ^ 2, knowledgeableBonus = 1000, -- Bonus for an additional expert review. -expertBonus = 1000 +expertBonus = 1000, + +-- === Parameters for the random-instance generator === + +-- Number of topics. +numTopics = 20, + +-- Exponent of the Zipf distribution used to choose topics for each proposal. +topicZipfExponent = -0.5, + +-- === Parameters for the matching evaluator === + +-- The weights given to the best, ..., worst review of a proposal in evaluating +-- its "unhappiness". Default is [reviewsEachProposal, ..., 1] since it's most +-- important for the best review to be good. +reviewEvalWeights = let rep = reviewsEachProposal pmDefaults in + map numAsWt [rep, rep-1 .. 1] }