|
| List< String > | createSUMAssignments (int nbVariables, boolean xor) |
| | This method constructs a list of strings that represent all assignments of the specified number of variables where the SUM relation has utility 0, i.e.
|
| Map< Double, List< String > > | createConstantUtilityMapping (double utility, List< String > assignments) |
| Map< Double, List< String > > | createUtilityMappingByBidder (Bidder bidder, List< Integer > goodsScope, final boolean discsp) |
| | This method creates a mapping from utilities to the corresponding variable assignments.
|
| List< Integer > | getGoodIDsForBid (Bid bid) |
This class is used to generate the 'relations' tag in the XML output file.
- Author
- Andreas Schaedeli
| void frodo2.benchmarks.auctions.xcsp.Relations.create |
( |
Auction | auction, |
|
|
int | methodID, |
|
|
boolean | discsp, |
|
|
boolean | sumDecomposition, |
|
|
boolean | intensional ) |
This method creates the relations of this DCOP.
The number and type of the relations depend on the method, therefore a switch is needed. The generated relations are then added as content to this element, so they will be written inside the 'relations' tag. The number of relations is added as a simple attribute
- Parameters
-
| auction | Auction instance |
| methodID | ID of conversion method to be applied |
| discsp | whether bid prices should be ignored, and the output should be a pure DisCSP instance |
| sumDecomposition | true if sum constraints should be intensional instead of extensional |
| intensional | whether all constraints should be intensional |
- Todo
- Replace XOR with SUM=1
References createConstantUtilityMapping(), createSUMAssignments(), createUtilityMappingByBidder(), frodo2.benchmarks.auctions.xcsp.Instance.findMaxConstraintArity(), frodo2.benchmarks.auctions.cats.Auction.getBidders(), frodo2.benchmarks.auctions.cats.Auction.getBids(), frodo2.benchmarks.auctions.xcsp.Instance.getGoodsScopeByBidder(), and relations.
Referenced by frodo2.benchmarks.auctions.xcsp.Instance.create().
| Map< Double, List< String > > frodo2.benchmarks.auctions.xcsp.Relations.createUtilityMappingByBidder |
( |
Bidder | bidder, |
|
|
List< Integer > | goodsScope, |
|
|
final boolean | discsp ) |
|
private |
This method creates a mapping from utilities to the corresponding variable assignments.
For each bid, the utility is rewarded if and only if each variable standing for a good contained in the bid is 1, and all the others are 0 (a bidder wants to win only one of his bids). A first exception is the all 0 string; in this case, the reward is 0. The second exception is the fake bids; in this case, the utility is rewarded if and only if each variable is 0 (it does not win the bid = the good is sold).
- Parameters
-
| bidder | Bidder instance |
| goodsScope | List of IDs of all the goods the bidder has placed a bid for |
| discsp | whether bid prices should be ignored, and the output should be a pure DisCSP instance |
- Returns
- Mapping from utilities to corresponding assignments; usually one utility to one assignment per bid
References frodo2.benchmarks.auctions.cats.Bidder.getBidsList(), and getGoodIDsForBid().
Referenced by create().