Merge branch 'master' into popl2012
[match/match.git] / program / PMDefaults.hs
CommitLineData
8c5ee850 1module PMDefaults where
05a6f0ed 2import PMInstance
bc14b3b3 3import PMConfig
8c5ee850
MM
4
5import qualified NaiveMinCostFlow
6import qualified CS2MinCostFlow
7
8723ed6a 8-- A default set of configuration values; see module PMConfig.
8c5ee850 9pmDefaults = PMConfig {
fd0d2377 10
93082682 11-- === Choose a min-cost flow implementation (timings on mattlaptop2) ===
fd0d2377
MM
12
13-- A naive implementation that is slow for all but the smallest instances
14-- (30s on a 20x50 example).
41f15608 15--minCostFlow = NaiveMinCostFlow.minCostFlow,
fd0d2377
MM
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
59fcd59d
MM
19-- example). Configure the path to cs2.exe in CS2MinCostFlow.hs. Remember to
20-- compile CS2 with -DPRINT_ANS, or this won't work!
41f15608 21minCostFlow = CS2MinCostFlow.minCostFlow,
d7d9561e 22
93082682 23-- The number of reviews each proposal should get.
d3852a83 24reviewsEachProposal = 4,
2e7d5426 25
578d7d98
MM
26-- Applies to non-PC papers
27pcReviewsEachProposal = 3,
28
93082682
MM
29-- === Interpretation of the preference values ===
30
56b565b1
MM
31expIsExpert = \x -> x >= 3,
32expIsKnowledgeable = \x -> x >= 2,
2e7d5426 33
56b565b1
MM
34prefIsBoring = \p -> p < 50,
35prefIsVeryBoring = \p -> p < 0,
2e7d5426 36
56b565b1 37prefIsConflict = \p -> p <= -100,
d7d9561e 38
93082682
MM
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.
578d7d98
MM
45loadTolerance = 2,
46
47ercLoadTolerance = 3,
d7d9561e 48
2e7d5426
MM
49-- Cost to overload by one review.
50-- tx = 0 at target load, 1 at end of tolerance.
8c5ee850 51marginalLoadCost = \tx -> 1000 + tx*1000,
2e7d5426
MM
52
53-- Cost to review a boring (or very boring) proposal.
54-- lx = 0 at no load, 1 at target load.
8c5ee850 55marginalBoringCost = \lx -> 1000 + lx*1000,
2e7d5426 56-- Additional cost to review a very boring proposal.
8c5ee850 57marginalVeryBoringCost = \lx -> 1000 + lx*1000,
2e7d5426 58
93082682 59-- Cost to make a review. Used by the evaluator too.
d7d9561e 60-- I'm using quadratic cost functions as a first attempt.
56b565b1 61assignmentCost = \pref -> (widenInteger 10 + prefNewToOld pref) ^ 2,
2e7d5426
MM
62
63-- Bonus for a first knowledgeable or expert review.
41f15608 64knowledgeableBonus = 3000,
2e7d5426
MM
65
66-- Bonus for an additional expert review.
41f15608 67expertBonus = 3000,
8723ed6a
MM
68
69-- === Parameters for the random-instance generator ===
70
71-- Number of topics.
72numTopics = 20,
73
74-- Exponent of the Zipf distribution used to choose topics for each proposal.
35ce78e3
MM
75topicZipfExponent = -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.
82reviewEvalWeights = let rep = reviewsEachProposal pmDefaults in
96fe6497 83 map widenInteger [rep, rep-1 .. 1]
8c5ee850
MM
84
85}