* @return
* @throws IllegalArgumentException if work is null
*/
private BidAuctionMessage generateBid(StartAuctionMessage auctionMessage){
BidAuctionMessage bidAuctionMessage = new BidAuctionMessage();
bidAuctionMessage.setAgentID(this.config.getId());
// int bid = MAX_BID;
//
// //subtract work preference
// Work work = auctionMessage.getWorkForAuction();
//
// if(work == null){
// throw new IllegalArgumentException("Work was null!!!");
//
// }
//
// bid = subtractWorkPenaltyFromBid(bid, work);
//
// int size = workQueue.size();
// bid -= size;
//subtract work preference
Work work = auctionMessage.getWorkForAuction();
if(work == null){
throw new IllegalArgumentException("Work was null!!!");
}
long bid = calulateBid(work);
// Currency currency = new Currency(bid);
bidAuctionMessage.setBidAmount(bid);
printString("Agent ID: " + config.getId() +" AuctionID = "+ auctionMessage.getAuctionID() + " Bid = " + bid);
return bidAuctionMessage;
}