| 1 | module PMDefaults where |
| 2 | import PMInstance |
| 3 | import PMConfig |
| 4 | |
| 5 | import qualified NaiveMinCostFlow |
| 6 | import qualified CS2MinCostFlow |
| 7 | |
| 8 | pmDefaults = PMConfig { |
| 9 | |
| 10 | -- === Choose a min-cost flow implementation (timings on mattlaptop2) === |
| 11 | |
| 12 | -- A naive implementation that is slow for all but the smallest instances |
| 13 | -- (30s on a 20x50 example). |
| 14 | minCostFlow = NaiveMinCostFlow.minCostFlow, |
| 15 | |
| 16 | -- Uses CS2 (http://www.igsystems.com/cs2/), which requires a license for |
| 17 | -- non-research use but is faster (<1s on a 20x50 example, 64s on a 60x500 |
| 18 | -- example). Configure the path to cs2.exe in CS2MinCostFlow.hs. Remember to |
| 19 | -- compile CS2 with -DPRINT_ANS, or this won't work! |
| 20 | --minCostFlow = CS2MinCostFlow.minCostFlow, |
| 21 | |
| 22 | -- The number of reviews each proposal should get. |
| 23 | reviewsEachProposal = 3, |
| 24 | |
| 25 | -- === Interpretation of the preference values === |
| 26 | |
| 27 | prefIsExpert = \p -> p <= 10, |
| 28 | prefIsKnowledgeable = \p -> p <= 20, |
| 29 | |
| 30 | prefIsBoring = \p -> p > 15, |
| 31 | prefIsVeryBoring = \p -> p > 25, |
| 32 | |
| 33 | prefIsConflict = \p -> p >= 40, |
| 34 | |
| 35 | -- === Tuning parameters for the matcher === |
| 36 | |
| 37 | -- The number of reviews by which a reviewer's load may exceed his/her target |
| 38 | -- load of (relativeLoad * ceiling(numProps * reviewsEachProposal / |
| 39 | -- totalRelativeLoad)). For now this is an additive constant; perhaps it should |
| 40 | -- be proportional to the target load. |
| 41 | loadTolerance = 1, |
| 42 | |
| 43 | -- Cost to overload by one review. |
| 44 | -- tx = 0 at target load, 1 at end of tolerance. |
| 45 | marginalLoadCost = \tx -> 1000 + tx*1000, |
| 46 | |
| 47 | -- Cost to review a boring (or very boring) proposal. |
| 48 | -- lx = 0 at no load, 1 at target load. |
| 49 | marginalBoringCost = \lx -> 1000 + lx*1000, |
| 50 | -- Additional cost to review a very boring proposal. |
| 51 | marginalVeryBoringCost = \lx -> 1000 + lx*1000, |
| 52 | |
| 53 | -- Cost to make a review. Used by the evaluator too. |
| 54 | -- I'm using quadratic cost functions as a first attempt. |
| 55 | assignmentCost = \pref -> (numAsWt 10 + pref) ^ 2, |
| 56 | |
| 57 | -- Bonus for a first knowledgeable or expert review. |
| 58 | knowledgeableBonus = 1000, |
| 59 | |
| 60 | -- Bonus for an additional expert review. |
| 61 | expertBonus = 1000 |
| 62 | |
| 63 | } |