package agents.anac.y2014.Aster; import java.util.ArrayList; import java.util.List; import genius.core.Bid; import genius.core.issue.Issue; import genius.core.issue.IssueInteger; import genius.core.issue.ValueInteger; import genius.core.utility.AbstractUtilitySpace; public class SearchBid { private AbstractUtilitySpace utilitySpace; public SearchBid(AbstractUtilitySpace utilitySpace) { this.utilitySpace = utilitySpace; } /** * Search Bid for nonlinear ���高速化���ージョン */ public ArrayList searchOfferingBid(ArrayList bidHistory, Bid bid, double bidTarget) throws Exception { List issues = utilitySpace.getDomain().getIssues(); Bid nextBid = new Bid(bid); IssueInteger lIssueInteger; double nextBidUtility; int issueNumber, issueIndexMin, issueIndexMax; for (Issue issue : issues) { lIssueInteger = (IssueInteger) issue; issueNumber = lIssueInteger.getNumber(); issueIndexMin = lIssueInteger.getLowerBound(); issueIndexMax = lIssueInteger.getUpperBound(); for (int i = issueIndexMin; i <= issueIndexMax; i++) { nextBid = nextBid.putValue(issueNumber, new ValueInteger(i)); nextBidUtility = utilitySpace.getUtility(nextBid); // 新��Bid�Target以下�場���下 if (nextBidUtility <= bidTarget) { continue; } // 新��Bid��在�探索テーブル���れ�追加 if (!bidHistory.contains(nextBid)) { Bid newBid = new Bid(nextBid); bidHistory.add(newBid); } } nextBid = new Bid(bid); // BidReset } return bidHistory; } }