Commit | Line | Data |
---|---|---|
8c5ee850 | 1 | module PMDefaults where |
05a6f0ed | 2 | import PMInstance |
bc14b3b3 | 3 | import PMConfig |
8c5ee850 MM |
4 | |
5 | import qualified NaiveMinCostFlow | |
6 | import qualified CS2MinCostFlow | |
7 | ||
8723ed6a | 8 | -- A default set of configuration values; see module PMConfig. |
8c5ee850 | 9 | pmDefaults = 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 | 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! | |
8c5ee850 | 21 | --minCostFlow = CS2MinCostFlow.minCostFlow, |
d7d9561e | 22 | |
93082682 | 23 | -- The number of reviews each proposal should get. |
8c5ee850 | 24 | reviewsEachProposal = 3, |
2e7d5426 | 25 | |
93082682 MM |
26 | -- === Interpretation of the preference values === |
27 | ||
8c5ee850 MM |
28 | prefIsExpert = \p -> p <= 10, |
29 | prefIsKnowledgeable = \p -> p <= 20, | |
2e7d5426 | 30 | |
8c5ee850 MM |
31 | prefIsBoring = \p -> p > 15, |
32 | prefIsVeryBoring = \p -> p > 25, | |
2e7d5426 | 33 | |
8c5ee850 | 34 | prefIsConflict = \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 | 42 | loadTolerance = 1, |
d7d9561e | 43 | |
2e7d5426 MM |
44 | -- Cost to overload by one review. |
45 | -- tx = 0 at target load, 1 at end of tolerance. | |
8c5ee850 | 46 | marginalLoadCost = \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 | 50 | marginalBoringCost = \lx -> 1000 + lx*1000, |
2e7d5426 | 51 | -- Additional cost to review a very boring proposal. |
8c5ee850 | 52 | marginalVeryBoringCost = \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 | 56 | assignmentCost = \pref -> (numAsWt 10 + pref) ^ 2, |
2e7d5426 MM |
57 | |
58 | -- Bonus for a first knowledgeable or expert review. | |
8c5ee850 | 59 | knowledgeableBonus = 1000, |
2e7d5426 MM |
60 | |
61 | -- Bonus for an additional expert review. | |
8723ed6a MM |
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. | |
35ce78e3 MM |
70 | topicZipfExponent = -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. | |
77 | reviewEvalWeights = let rep = reviewsEachProposal pmDefaults in | |
78 | map numAsWt [rep, rep-1 .. 1] | |
8c5ee850 MM |
79 | |
80 | } |