1 module ProposalMatcherConfig
2 (module ProposalMatcherConfig, minCostFlow) where
4 -- Choose a min-cost flow implementation (timings on mattlaptop2):
6 -- A naive implementation that is slow for all but the smallest instances
7 -- (30s on a 20x50 example).
8 import NaiveMinCostFlow
10 -- Uses CS2 (http://www.igsystems.com/cs2/), which requires a license for
11 -- non-research use but is faster (<1s on a 20x50 example, 64s on a 60x500
12 -- example). Configure the path to cs2.exe in CS2MinCostFlow.hs.
13 --import CS2MinCostFlow
15 type Wt = Double -- Can be any RealFrac.
19 numAsWt x = fromInteger (toInteger x) :: Wt
21 reviewsEachProposal = 3 :: Int
23 prefIsExpert p = p <= 10
24 prefIsKnowledgeable p = p <= 20
26 prefIsBoring p = p > 15
27 prefIsVeryBoring p = p > 25
29 prefIsConflict p = p >= 40
31 -- For now this is absolute. Later it might be proportional to a reviewer's
33 loadTolerance = 1 :: Int
35 -- Cost to overload by one review.
36 -- tx = 0 at target load, 1 at end of tolerance.
37 marginalLoadCost tx = 1000 + tx*1000 :: Wt
39 -- Cost to review a boring (or very boring) proposal.
40 -- lx = 0 at no load, 1 at target load.
41 marginalBoringCost lx = 1000 + lx*1000 :: Wt
42 -- Additional cost to review a very boring proposal.
43 marginalVeryBoringCost lx = 1000 + lx*1000 :: Wt
45 -- Cost to make a review.
46 -- I'm using quadratic cost functions as a first attempt.
47 assignmentCost pref = (numAsWt 10 + pref) ^ 2 :: Wt
49 -- Bonus for a first knowledgeable or expert review.
50 knowledgeableBonus = 1000 :: Wt
52 -- Bonus for an additional expert review.
53 expertBonus = 1000 :: Wt