Package org.jacop.examples.fd.muca
Class MUCA
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.muca.MUCA
-
public class MUCA extends ExampleFD
It solves the Mixed Multi-Unit Combinatorial Auctions.The idea originated from reading the following paper where the first attempt to use CP was presented.
Comparing Winner Determination Algorithms for Mixed Multi-Unit Combinatorial Auctions by Brammert Ottens Ulle Endriss
- Version:
- 4.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classMUCA.Delta(package private) static classMUCA.Transformation
-
Field Summary
Fields Modifier and Type Field Description java.util.List<IntVar>bidCostsFor each bidder it specifies variable representing the cost of the chosen xor bid.java.util.List<java.util.List<java.util.List<MUCA.Transformation>>>bidsArrayList of bids issued by different bidders.java.util.List<java.util.List<java.lang.Integer>>costsFor each bidder and each xor bid there is an integer representing a cost of the xor bid.IntVar[][]deltasIFor each transition and each good it specifies the delta change of that good before the transition takes place.IntVar[][]deltasOFor each transition and each good it specifies the delta change of that good after the transition takes place.java.lang.StringfilenameIt reads auction problem description from the file.java.util.List<java.lang.Integer>finalQuantityIt specifies the minimal quantities of items seeked to achieve.java.util.List<java.lang.Integer>initialQuantityIt specifies the initial quantities of goods.intmaxCostIt specifies the maximal value for the cost.intmaxDeltaIt specifies the maximal possible delta of goods for any transformation.intmaxNoTransformationsIt specifies the maximal number of transformations used by the auctioneer.intmaxProductsThe maximal number of products.intminCostIt specifies the minimal value for the cost.intminDeltaIt specifies the minimal possible delta of goods for any transformation.intnoGoodsIt specifies number of goods which are in the focus of the auction.IntVar[]sumIt specifies the number of goods after the last transition.IntVar[]transitionsIt specifies the sequence of transitions used by an auctioneer.
-
Constructor Summary
Constructors Constructor Description MUCA()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)It executes the program which solve the supplied auction problem or solves three problems available within the files.voidmodel()It specifies a standard way of modeling the problem.voidreadAuction(java.lang.String filename)It reads the auction problem from the file.booleansearchSpecial()It executes special master-slave search.voidsetupProblem1()It creates an instance of the auction problem.voidsetupProblem2()It creates an instance of the auction problem.voidsetupProblem3()It creates an instance of the auction problem.voidsetupProblem4()It creates an instance of the auction problem.-
Methods inherited from class org.jacop.examples.fd.ExampleFD
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
-
-
-
-
Field Detail
-
bids
public java.util.List<java.util.List<java.util.List<MUCA.Transformation>>> bids
ArrayList of bids issued by different bidders. Each bidder issues an ArrayList of xor bids. Each Xor bid is a list of transformations.
-
costs
public java.util.List<java.util.List<java.lang.Integer>> costs
For each bidder and each xor bid there is an integer representing a cost of the xor bid.
-
initialQuantity
public java.util.List<java.lang.Integer> initialQuantity
It specifies the initial quantities of goods.
-
finalQuantity
public java.util.List<java.lang.Integer> finalQuantity
It specifies the minimal quantities of items seeked to achieve.
-
noGoods
public int noGoods
It specifies number of goods which are in the focus of the auction.
-
minDelta
public int minDelta
It specifies the minimal possible delta of goods for any transformation.
-
maxDelta
public int maxDelta
It specifies the maximal possible delta of goods for any transformation.
-
minCost
public int minCost
It specifies the minimal value for the cost.
-
maxCost
public int maxCost
It specifies the maximal value for the cost.
-
maxProducts
public int maxProducts
The maximal number of products.
-
bidCosts
public java.util.List<IntVar> bidCosts
For each bidder it specifies variable representing the cost of the chosen xor bid.
-
transitions
public IntVar[] transitions
It specifies the sequence of transitions used by an auctioneer.
-
maxNoTransformations
public int maxNoTransformations
It specifies the maximal number of transformations used by the auctioneer.
-
deltasI
public IntVar[][] deltasI
For each transition and each good it specifies the delta change of that good before the transition takes place.
-
deltasO
public IntVar[][] deltasO
For each transition and each good it specifies the delta change of that good after the transition takes place.
-
sum
public IntVar[] sum
It specifies the number of goods after the last transition.
-
filename
public java.lang.String filename
It reads auction problem description from the file.
-
-
Method Detail
-
setupProblem1
public void setupProblem1()
It creates an instance of the auction problem.
-
setupProblem2
public void setupProblem2()
It creates an instance of the auction problem.
-
setupProblem3
public void setupProblem3()
It creates an instance of the auction problem.
-
setupProblem4
public void setupProblem4()
It creates an instance of the auction problem.
-
main
public static void main(java.lang.String[] args)
It executes the program which solve the supplied auction problem or solves three problems available within the files.- Parameters:
args- the first argument specifies the name of the file containing the problem description.
-
model
public void model()
Description copied from class:ExampleFDIt specifies a standard way of modeling the problem.
-
searchSpecial
public boolean searchSpecial()
It executes special master-slave search. The master search uses costs variables and maxregret criteria to choose an interesting bids. The second search (slave) looks for the sequence of chosen transactions such as that all constraints concerning goods quantity (deltas of transitions) are respected.- Returns:
- true if there is a solution, false otherwise.
-
readAuction
public void readAuction(java.lang.String filename)
It reads the auction problem from the file.- Parameters:
filename- file describing the auction problem.
-
-