FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.benchmarks.auctions.cats.Auction Class Reference

This class represents an auction generated by the CATS program. More...

Public Member Functions

 Auction (int nbGoods)
 The constructor first initializes all the lists used in this class.
void addBid (Bid bid)
 This method adds a bid to the auction.
void addBidder (Bidder bidder)
 This method adds a new Bidder to the list of bidders in this auction.
Good getGood (int goodID)
List< GoodgetGoods ()
List< BidgetBids ()
List< BiddergetBidders ()
String toString ()

Private Member Functions

void createGoodsList (int nbGoods)
 This method creates The desired number of goods having IDs from 0 to (nbGoods - 1) and adds them to the goodsList.

Private Attributes

List< GoodgoodsList
 List containing all the goods sold in this auction.
List< BidbidsList
 List containing all the bids placed in this auction.
List< BidderbiddersList
 List containing all the bidders of this auction.

Detailed Description

This class represents an auction generated by the CATS program.

Author
Andreas Schaedeli

Constructor & Destructor Documentation

◆ Auction()

frodo2.benchmarks.auctions.cats.Auction.Auction ( int nbGoods)

The constructor first initializes all the lists used in this class.

Then, it calls a method to create as many goods as desired and places them in the corresponding list.

Parameters
nbGoodsNumber of goods sold in this auction

References biddersList, bidsList, createGoodsList(), goodsList, and frodo2.benchmarks.auctions.cats.Bidder.NEXT_ID.

Here is the call graph for this function:

Member Function Documentation

◆ addBid()

void frodo2.benchmarks.auctions.cats.Auction.addBid ( Bid bid)

This method adds a bid to the auction.

A bid needs to be added in several places: First of all, to the bids list. Then, to the bids list of the corresponding bidder. And finally, to the bids lists of the goods contained in the bid

Parameters
bidBid to add to the auction

References frodo2.benchmarks.auctions.cats.Bidder.addBid(), bidsList, frodo2.benchmarks.auctions.cats.Bid.getBidder(), and frodo2.benchmarks.auctions.cats.Bid.getGoodsList().

Here is the call graph for this function:

◆ addBidder()

void frodo2.benchmarks.auctions.cats.Auction.addBidder ( Bidder bidder)

This method adds a new Bidder to the list of bidders in this auction.

Parameters
bidderBidder to add to the auction

References biddersList.

◆ createGoodsList()

void frodo2.benchmarks.auctions.cats.Auction.createGoodsList ( int nbGoods)
private

This method creates The desired number of goods having IDs from 0 to (nbGoods - 1) and adds them to the goodsList.

Parameters
nbGoodsNumber of goods to create

References goodsList.

Referenced by Auction().

◆ getBidders()

◆ getBids()

List< Bid > frodo2.benchmarks.auctions.cats.Auction.getBids ( )

◆ getGood()

Good frodo2.benchmarks.auctions.cats.Auction.getGood ( int goodID)
Parameters
goodIDID of the good to be returned
Returns
Good object with the given ID

References goodsList.

◆ getGoods()

List< Good > frodo2.benchmarks.auctions.cats.Auction.getGoods ( )

◆ toString()

String frodo2.benchmarks.auctions.cats.Auction.toString ( )
See also
java.lang.Object#toString()
Author
Thomas Leaute

Member Data Documentation

◆ biddersList

List<Bidder> frodo2.benchmarks.auctions.cats.Auction.biddersList
private

List containing all the bidders of this auction.

Referenced by addBidder(), Auction(), and getBidders().

◆ bidsList

List<Bid> frodo2.benchmarks.auctions.cats.Auction.bidsList
private

List containing all the bids placed in this auction.

Referenced by addBid(), Auction(), and getBids().

◆ goodsList

List<Good> frodo2.benchmarks.auctions.cats.Auction.goodsList
private

List containing all the goods sold in this auction.

Referenced by Auction(), createGoodsList(), getGood(), and getGoods().


The documentation for this class was generated from the following file: