a68d18291f026a4f33ceb30f8ef9a43aec36d1f0
[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 = 3,
25
26 -- === Interpretation of the preference values ===
27
28 prefIsExpert = \p -> p <= 10,
29 prefIsKnowledgeable = \p -> p <= 20,
30
31 prefIsBoring = \p -> p > 15,
32 prefIsVeryBoring = \p -> p > 25,
33
34 prefIsConflict = \p -> p >= 40,
35
36 -- === Tuning parameters for the matcher ===
37
38 -- The number of reviews by which a reviewer's load may exceed his/her target
39 -- load of (relativeLoad * ceiling(numProps * reviewsEachProposal /
40 -- totalRelativeLoad)).  For now this is an additive constant; perhaps it should
41 -- be proportional to the target load.
42 loadTolerance = 1,
43
44 -- Cost to overload by one review.
45 -- tx = 0 at target load, 1 at end of tolerance.
46 marginalLoadCost = \tx -> 1000 + tx*1000,
47
48 -- Cost to review a boring (or very boring) proposal.
49 -- lx = 0 at no load, 1 at target load.
50 marginalBoringCost = \lx -> 1000 + lx*1000,
51 -- Additional cost to review a very boring proposal.
52 marginalVeryBoringCost = \lx -> 1000 + lx*1000,
53
54 -- Cost to make a review.  Used by the evaluator too.
55 -- I'm using quadratic cost functions as a first attempt.
56 assignmentCost = \pref -> (numAsWt 10 + pref) ^ 2,
57
58 -- Bonus for a first knowledgeable or expert review.
59 knowledgeableBonus = 1000,
60
61 -- Bonus for an additional expert review.
62 expertBonus = 1000,
63
64 -- === Parameters for the random-instance generator ===
65
66 -- Number of topics.
67 numTopics = 20,
68
69 -- Exponent of the Zipf distribution used to choose topics for each proposal.
70 topicZipfExponent = -0.5
71
72 }