úÎfa·O      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN(c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNoneB ENote that values of this type, when used to represent indices for a O9, may not be directly usable with access functions from  Data.MatrixI. This is due to the possibility of some conversion between indices for Os and []* having taken place in their construction.5Represents the number of copies to make of some item.$Represents the capacity of some bin.This function creates a (P) g value, holding both lower and upper bounds for an interval, after verifying that they are consistent. Some itemSome binAn optional quality  Lower bound Upper bound     0Core functions to solve the distribution problem(c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNone À is based on Martello & Toth 1990 s linear integer programming formulation of the Generalized Assignment Problem (GAP). This function, in addition, excludes all combinations whose profit is 0.  interfaces with the  "https://www.gnu.org/software/glpk/GLPK toolkit through glpk-hs.In  profitM caps bounds, profitM/ is a profit matrix (which can be computed by  , using a ), caps8 stands for a list of items  capacities (computable by toCap), and bounds encodes in a   value (producible with mkBoundsW) both the lower and upper bounds on the number of copies to distribute per each item.Cf. Martello, S. and Toth, P.: *Knapsack Problems: Algorithms and Computer Implementations!, ch. 7, John Wiley & Sons, 1990. i j, for  i = {1, &, m},  j = {1, &, n}, where m& stands for the number of items, and n^ for the number of bins. These variables  are to be used only within the GAP formulation in ."Objective function to maximize in X. It stands for the overall profit accrued by a given distribution of items among bins.'Cf. Martello, S. and Toth, P.: op. cit.$Constraint function. It is used, in œ, to specify the capacity of each bin. Note that items are not divisible, and therefore their cost, as detracted from a given bin s capacity, is fixed at 1.'Cf. Martello, S. and Toth, P.: op. cit.$Constraint function. It is used, in >, to specify how many copies of each item can be distributed.'Cf. Martello, S. and Toth, P.: op. cit.Given a , # computes a profit matrix between bins and items, optionally taking a quality; as being by default shared between them. The values in a n serve to distribute items among bins according to the capacities of the latter and the values of the former.Wrapper to use Q with extra type safety.Wrapper to use R with extra type safety."Simple helper function to run the glpk-hs) interface to GLPK, as constructed with . Takes the same arguments as . turns the (unIOd) output of  into a more usable format. ItemsBinsOptional qualitySpecializes the ((Int, Int) -> a) function used with Q   Public types for Referees.Solver(c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNone   (c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNone24This type and its SU instance declarations are used to describe the parsing rules for reconstruction of 1 values from CSV files.The two Sµ instance declarations here (vid. source) enable silent conditional parsing of the second field in a CSV file with 4 fields. In this scenario, if the second field is parseable as T, it is parsed as " (a wrapper for P ); otherwise, as ' % (a wrapper for [U]).*<For warning about issues that may take place during parsing.# !"#$%&'()*+,-./0123456789:;<=  !"#$%&'()*+,-./0123456789:#:987123456/0-.,*+'()%&"#$ !=<; !"#$%&'()*+,-./0123456789:;<=Public interface to Referees.Solver.Internal(c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNoneCore functions for Referees(c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNone >Parses from a CSV file into 1 / values.?Parses from a CSV file into 1 - values.@[Taking the path to some CSV file in the appropriate format, parses it into values of type 1 aF. This function is intended to be used with wrappers that specialize a to some concrete type.AParses CSV files into )s, according to the format described in Referees.The parser is defined at the  FromField instance declarations in Referees.Types.Internal.BBY computes a distribution of proposals among referees, according to the given parameters.C8Computes the profit for an assignment between the given 1 - and 1 /M. The scale is continuous in [0,2]. Takes understood languages into account.D5This list is used to bias the profit associated with Areas and Subarea9s matches according to their order in the corresponding 1s.EE rs def* builds a list of capacities matching the /s in rs#, while assigning default capacity def to those /s that don t have one defined.FProvides a list of all /s suited for a -", regardless of any distribution.GProvides a list of all -s suited for a /", regardless of any distribution.H)Concise printing of assignments. Ignores 1 /#s for which there are no assigned 1 -s.LrPretty prints the given matrix, converting its values to 2-digit precision. This is currently used only in debug.>?@AB"Referees among which to distribute/Default capacity for referees, if none declared*Min and max number of copies to distribute8Optional shared language between referees and proposalsProposals to distributeCDEF;Optional shared language between the proposal and refereesG;Optional shared language between the referee and proposalsHIJKLMN>?@ABCDEFGHIJKLMN>?@ABCDEFGHIJKLMN>?@ABCDEFGHIJKLMNPublic types for Referees(c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNone ,-/123456789: :987123456/-,Main public interface(c) Pablo Couto 2014GPL-3pablo@infty.in experimentalNone,-/123456789:>?BCFGH>?BCFGHV       !""#$%&'()*++,-./0122334456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVQRWQRXYZ[\]^T_`aReferees-0.0.0Referees.Solver.Types.InternalReferees.Solver.InternalReferees.Types.InternalReferees.InternalReferees.Solver.TypesReferees.SolverReferees.TypesRefereesBounds_lower_upperProfitFunction ProfitMatrixProfitCol'ColRow'RowIndex_idxCopiesCapacitymkBoundslpGAPxobjFun subFunCap subFunMultmkProfitMatrix safeMatrix safeGetElem run_lpGAPfromGLPKtoListCSVentry_nameCSV _capacityCSV _languagesCSV_areaCSV _subareasCSVMaybeCapacityParse MaybeCapP _maybeCapP SemicolonStringListParseStrLstP_strLstP CSV_WarningDifferingCapacitiesMatchProposalRefereeEntry_name _capacity _languages_areasSubareaAreaLanguageName$fFromRecordCSVentry$fFromFieldMaybeCapacityParse$fFromFieldStringListParsefromCSVtoRefereesfromCSVtoProposalsfromCSVtoEntryreadCSVentriesdistributeWith profitRefProplogBiastoCapwhichRefereesForProposalwhichProposalsForRefereeppDistribution ppReferee ppProposalppEntryppMatrix ppCSV_WarningppNamesmatrix-0.3.4.0 Data.MatrixMatrixbase Data.MaybeMaybematrixgetElemcassava-0.4.2.0Data.Csv.Conversion FromFieldghc-prim GHC.TypesIntGHC.BaseString