|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
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< Good > | getGoods () |
| List< Bid > | getBids () |
| List< Bidder > | getBidders () |
| 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< Good > | goodsList |
| List containing all the goods sold in this auction. | |
| List< Bid > | bidsList |
| List containing all the bids placed in this auction. | |
| List< Bidder > | biddersList |
| List containing all the bidders of this auction. | |
This class represents an auction generated by the CATS program.
| 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.
| nbGoods | Number of goods sold in this auction |
References biddersList, bidsList, createGoodsList(), goodsList, and frodo2.benchmarks.auctions.cats.Bidder.NEXT_ID.

| 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
| bid | Bid 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().

| void frodo2.benchmarks.auctions.cats.Auction.addBidder | ( | Bidder | bidder | ) |
This method adds a new Bidder to the list of bidders in this auction.
| bidder | Bidder to add to the auction |
References biddersList.
|
private |
| List< Bidder > frodo2.benchmarks.auctions.cats.Auction.getBidders | ( | ) |
References biddersList.
Referenced by frodo2.benchmarks.auctions.xcsp.Constraints.create(), frodo2.benchmarks.auctions.xcsp.Relations.create(), frodo2.benchmarks.auctions.xcsp.Variables.create(), and frodo2.benchmarks.auctions.xcsp.Instance.findMaxConstraintArity().
| List< Bid > frodo2.benchmarks.auctions.cats.Auction.getBids | ( | ) |
References bidsList.
Referenced by frodo2.benchmarks.auctions.xcsp.Constraints.create(), frodo2.benchmarks.auctions.xcsp.Relations.create(), and frodo2.benchmarks.auctions.xcsp.Variables.create().
| Good frodo2.benchmarks.auctions.cats.Auction.getGood | ( | int | goodID | ) |
| List< Good > frodo2.benchmarks.auctions.cats.Auction.getGoods | ( | ) |
References goodsList.
Referenced by frodo2.benchmarks.auctions.xcsp.Constraints.create(), frodo2.benchmarks.auctions.xcsp.Variables.create(), and frodo2.benchmarks.auctions.xcsp.Instance.findMaxConstraintArity().
| String frodo2.benchmarks.auctions.cats.Auction.toString | ( | ) |
|
private |
List containing all the bidders of this auction.
Referenced by addBidder(), Auction(), and getBidders().
|
private |
|
private |
List containing all the goods sold in this auction.
Referenced by Auction(), createGoodsList(), getGood(), and getGoods().