Safe Haskell | None |
---|---|
Language | Haskell2010 |
ProductMixAuction.BudgetConstraints.CandidateRates
- candidateRates :: [Bid b] -> Set PriceVector
- type Interaction b = [Bid b]
- interactions :: Dimension -> [Bid b] -> [Interaction b]
- type Sequence = [Good]
- sequences :: Dimension -> [[Good]]
- getCandidate :: Interaction b -> Sequence -> Maybe PriceVector
- toPriceVector :: [(Good, Price)] -> PriceVector
- rebaseBid :: Good -> Price -> Bid b -> Bid b
Computing candidate auction prices
candidateRates :: [Bid b] -> Set PriceVector Source #
Calculate the set of candidate clearing rates for a list of bids using an approach not yet proven correct.
type Interaction b = [Bid b] Source #
An interaction is a list of n bids, where n is the dimension (number of goods), such that the the first element is a threshold bid. The interaction determines the order to fix the candiate rates. Bids may be used more than once.
interactions :: Dimension -> [Bid b] -> [Interaction b] Source #
Given a list of all the bids, produce a list of all the
interactions, that is, generate all the possible lists of n
bids.
sequences :: Dimension -> [[Good]] Source #
List all the possible sequences of goods, given the dimension.
getCandidate :: Interaction b -> Sequence -> Maybe PriceVector Source #
Given a particular interaction and sequence, calculate the
candidate price vector. This may fail (return Nothing
) if
a later bidgood in the interactionsequence fix a price that
invalidates a price fixed by an earlier bid/good.
toPriceVector :: [(Good, Price)] -> PriceVector Source #
Make a price vector from a list of good-price pairs, provided all goods from 0 to n-1 are included in the list.