Merge branch 'master' into popl2012
[match/match.git] / program / PMDefaults.hs
1 module PMDefaults where
2 import PMInstance
3 import PMConfig
4
5 import qualified NaiveMinCostFlow
6 import qualified CS2MinCostFlow
7
8 -- A default set of configuration values; see module PMConfig.
9 pmDefaults = PMConfig {
10
11 -- === Choose a min-cost flow implementation (timings on mattlaptop2) ===
12
13 -- A naive implementation that is slow for all but the smallest instances
14 -- (30s on a 20x50 example).
15 --minCostFlow = NaiveMinCostFlow.minCostFlow,
16
17 -- Uses CS2 (http://www.igsystems.com/cs2/), which requires a license for
18 -- non-research use but is faster (<1s on a 20x50 example, 64s on a 60x500
19 -- example).  Configure the path to cs2.exe in CS2MinCostFlow.hs.  Remember to
20 -- compile CS2 with -DPRINT_ANS, or this won't work!
21 minCostFlow = CS2MinCostFlow.minCostFlow,
22
23 -- The number of reviews each proposal should get.
24 reviewsEachProposal = 4,
25
26 -- Applies to non-PC papers
27 pcReviewsEachProposal = 3,
28
29 -- === Interpretation of the preference values ===
30
31 expIsExpert = \x -> x >= 3,
32 expIsKnowledgeable = \x -> x >= 2,
33
34 prefIsBoring = \p -> p < 50,
35 prefIsVeryBoring = \p -> p < 0,
36
37 prefIsConflict = \p -> p <= -100,
38
39 -- === Tuning parameters for the matcher ===
40
41 -- The number of reviews by which a reviewer's load may exceed his/her target
42 -- load of (relativeLoad * ceiling(numProps * reviewsEachProposal /
43 -- totalRelativeLoad)).  For now this is an additive constant; perhaps it should
44 -- be proportional to the target load.
45 loadTolerance = 2,
46
47 ercLoadTolerance = 3,
48
49 -- Cost to overload by one review.
50 -- tx = 0 at target load, 1 at end of tolerance.
51 marginalLoadCost = \tx -> 1000 + tx*1000,
52
53 -- Cost to review a boring (or very boring) proposal.
54 -- lx = 0 at no load, 1 at target load.
55 marginalBoringCost = \lx -> 1000 + lx*1000,
56 -- Additional cost to review a very boring proposal.
57 marginalVeryBoringCost = \lx -> 1000 + lx*1000,
58
59 -- Cost to make a review.  Used by the evaluator too.
60 -- I'm using quadratic cost functions as a first attempt.
61 assignmentCost = \pref -> (widenInteger 10 + prefNewToOld pref) ^ 2,
62
63 -- Bonus for a first knowledgeable or expert review.
64 knowledgeableBonus = 3000,
65
66 -- Bonus for an additional expert review.
67 expertBonus = 3000,
68
69 -- === Parameters for the random-instance generator ===
70
71 -- Number of topics.
72 numTopics = 20,
73
74 -- Exponent of the Zipf distribution used to choose topics for each proposal.
75 topicZipfExponent = -0.5,
76
77 -- === Parameters for the matching evaluator ===
78
79 -- The weights given to the best, ..., worst review of a proposal in evaluating
80 -- its "unhappiness".  Default is [reviewsEachProposal, ..., 1] since it's most
81 -- important for the best review to be good.
82 reviewEvalWeights = let rep = reviewsEachProposal pmDefaults in
83         map widenInteger [rep, rep-1 .. 1]
84
85 }