Make the evaluator's review weights configurable.
[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).
8c5ee850 15minCostFlow = 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!
8c5ee850 21--minCostFlow = CS2MinCostFlow.minCostFlow,
d7d9561e 22
93082682 23-- The number of reviews each proposal should get.
8c5ee850 24reviewsEachProposal = 3,
2e7d5426 25
93082682
MM
26-- === Interpretation of the preference values ===
27
8c5ee850
MM
28prefIsExpert = \p -> p <= 10,
29prefIsKnowledgeable = \p -> p <= 20,
2e7d5426 30
8c5ee850
MM
31prefIsBoring = \p -> p > 15,
32prefIsVeryBoring = \p -> p > 25,
2e7d5426 33
8c5ee850 34prefIsConflict = \p -> p >= 40,
d7d9561e 35
93082682
MM
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.
8c5ee850 42loadTolerance = 1,
d7d9561e 43
2e7d5426
MM
44-- Cost to overload by one review.
45-- tx = 0 at target load, 1 at end of tolerance.
8c5ee850 46marginalLoadCost = \tx -> 1000 + tx*1000,
2e7d5426
MM
47
48-- Cost to review a boring (or very boring) proposal.
49-- lx = 0 at no load, 1 at target load.
8c5ee850 50marginalBoringCost = \lx -> 1000 + lx*1000,
2e7d5426 51-- Additional cost to review a very boring proposal.
8c5ee850 52marginalVeryBoringCost = \lx -> 1000 + lx*1000,
2e7d5426 53
93082682 54-- Cost to make a review. Used by the evaluator too.
d7d9561e 55-- I'm using quadratic cost functions as a first attempt.
8c5ee850 56assignmentCost = \pref -> (numAsWt 10 + pref) ^ 2,
2e7d5426
MM
57
58-- Bonus for a first knowledgeable or expert review.
8c5ee850 59knowledgeableBonus = 1000,
2e7d5426
MM
60
61-- Bonus for an additional expert review.
8723ed6a
MM
62expertBonus = 1000,
63
64-- === Parameters for the random-instance generator ===
65
66-- Number of topics.
67numTopics = 20,
68
69-- Exponent of the Zipf distribution used to choose topics for each proposal.
35ce78e3
MM
70topicZipfExponent = -0.5,
71
72-- === Parameters for the matching evaluator ===
73
74-- The weights given to the best, ..., worst review of a proposal in evaluating
75-- its "unhappiness". Default is [reviewsEachProposal, ..., 1] since it's most
76-- important for the best review to be good.
77reviewEvalWeights = let rep = reviewsEachProposal pmDefaults in
78 map numAsWt [rep, rep-1 .. 1]
8c5ee850
MM
79
80}