Safe Haskell | None |
---|---|
Language | Haskell2010 |
ProductMixAuction.BudgetConstraints.Types
Contents
Description
Core types for budget constrained PMA auctions
- data AuctionKind
- data FilterPrices
- type Good = Int
- type Dimension = Int
- newtype Price = Price {}
- type PriceVector = Vector Price
- type QuantityVector = Vector Units
- justGood :: Int -> Good -> Units -> QuantityVector
- type BidName = Text
- newtype Budget = Budget {}
- data Bid b = Bid {
- _bid_label :: b
- _bid_name :: BidName
- _bid_budget :: Budget
- _bid_prices :: PriceVector
- bid_prices :: forall b. Lens' (Bid b) PriceVector
- bid_name :: forall b. Lens' (Bid b) BidName
- bid_label :: forall b b. Lens (Bid b) (Bid b) b b
- bid_budget :: forall b. Lens' (Bid b) Budget
- bidPrice :: Good -> Bid b -> Price
- type BidAssignments b = Map b QuantityVector
- type SupplyCurveVector = Vector (SupplyCurve Units)
- data BCException
Core types
data AuctionKind Source #
Constructors
Standard | |
BudgetConstrained |
Instances
Bounded AuctionKind Source # | |
Enum AuctionKind Source # | |
Eq AuctionKind Source # | |
Show AuctionKind Source # | |
Generic AuctionKind Source # | |
ToJSON AuctionKind Source # | |
FromJSON AuctionKind Source # | |
Default AuctionKind Source # | |
Arbitrary AuctionKind Source # | |
type Rep AuctionKind Source # | |
data FilterPrices Source #
Constructors
AllPrices | |
FilterPrices |
Instances
Bounded FilterPrices Source # | |
Enum FilterPrices Source # | |
Eq FilterPrices Source # | |
Show FilterPrices Source # | |
Generic FilterPrices Source # | |
Arbitrary FilterPrices Source # | |
type Rep FilterPrices Source # | |
Goods are identified by non-negative integers (with 0 being the first good).
Instances
Eq Price Source # | |
Floating Price Source # | |
Fractional Price Source # | |
Num Price Source # | |
Ord Price Source # | |
Real Price Source # | |
RealFloat Price Source # | |
RealFrac Price Source # | |
Show Price Source # | |
Generic Price Source # | |
NFData Price Source # | |
ToJSON Price Source # | |
FromJSON Price Source # | |
ToField Price Source # | |
FromField Price Source # | |
Default Price Source # | |
Random Price Source # | |
Arbitrary Price Source # | |
type Rep Price Source # | |
type PriceVector = Vector Price Source #
type QuantityVector = Vector Units Source #
justGood :: Int -> Good -> Units -> QuantityVector Source #
justGood n good units
creates an n
-dimensional quantity vector
with zeroes everywhere except possibly in the entry for good
,
which is set to units
.
Instances
Eq Budget Source # | |
Floating Budget Source # | |
Fractional Budget Source # | |
Num Budget Source # | |
Ord Budget Source # | |
Real Budget Source # | |
RealFloat Budget Source # | |
RealFrac Budget Source # | |
Show Budget Source # | |
Generic Budget Source # | |
ToJSON Budget Source # | |
FromJSON Budget Source # | |
ToField Budget Source # | |
FromField Budget Source # | |
Default Budget Source # | |
type Rep Budget Source # | |
A budget-constrained bid. Only threshold bids are implemented so far, not price-taking (non-competitive) bids.
Constructors
Bid | |
Fields
|
bid_prices :: forall b. Lens' (Bid b) PriceVector Source #
bid_budget :: forall b. Lens' (Bid b) Budget Source #
type BidAssignments b = Map b QuantityVector Source #
Assignment of good quantities to bids
type SupplyCurveVector = Vector (SupplyCurve Units) Source #
A supply curve per good
data BCException Source #
Exception that the solver may throw
Constructors
DemandTooHigh Units (SupplyCurve Units) | when the solver tries to get the cost of supplying a given quantity of some good but the said quantity exceeds the supply curve's capacity (this is in principle ruled out by the code, but an exception is a good way to signal that this impossible case can in fact happen) |
NoBids | when the solver is run on an auction with no bid |
NoCandidatePriceVector | when the solver cannot find a single candidate price vector to use for exploring different allocations of quantities |
DecreasingSupplyCurve Good | when the solver is run on an auction with a decreasing supply curve for the given good |
Instances
Show BCException Source # | |
Exception BCException Source # | |
ToJSON BCException Source # | |