|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ComputerInfo
public class ComputerInfo
Holds all information pertaining to computers. The information is updated by using the incoming messages at the beginning of each day and the outgoing messages at the end of each day. This means that there is no need to modify any values during the agent's decision making process, and so this object should essentially be read-only during the day. (But fields have been left public to allow easy access - too much work to add get methods for everything!) Note that this object is not responsible for verifying messages. For example, if a delivery schedule is sent that is not feasible given the computers available, the problem will not be detected.
Field Summary | |
---|---|
int[][] |
averageOfferPrice
avg bid per computer type each day |
int[] |
basePrices
base prices for each computer: sum of component base prices |
private static int |
columnWidth
width of columns in summary table |
int[][] |
componentIndexList
list of components for each computer, stored by index instead of ID |
int[] |
dailyRFQCount
total number of RFQs per day |
private int |
date
|
int[][] |
delivered
number delivered each day |
int[][] |
highPrice
high price from each day's product report |
int[] |
highSegmentRFQCount
number of RFQs per day in high segment |
int[][] |
inventory
number of computers in inventory each day |
int[][] |
lowPrice
low price from each day's product report |
int[] |
lowSegmentRFQCount
number of RFQs per day in low segment |
int[] |
midSegmentRFQCount
number of RFQs per day in mid segment |
private int |
numComputers
|
private int |
numDays
|
int[][] |
offerNumber
total number of computers offered each day |
int[][] |
offerPrice
sum of all offers each day |
java.util.Hashtable |
offerTable
stores all offers |
int[][] |
orderNumber
number of computers ordered each day |
int[][] |
orderPrice
total price for all computers ordered each day |
java.util.Hashtable |
orderTable
stores current orders |
int[][] |
produced
computers produced each day |
int[] |
productIDs
product IDs for each index |
int[][] |
rfqNumber
total computers in all rfqs each day |
java.util.Hashtable |
rfqTable
stores current RFQs |
private GameSettings |
settings
|
int[] |
tomorrowsInventory
number of computers available for delivery tomorrow |
int[] |
totalOrders
total number of each computer currently ordered |
int[][] |
wholeOfferNumber
total number of offers made each day |
int[][] |
wholeOrderNumber
total number of orders each day |
int[][] |
wholeRfqNumber
number of RFQs received for each type of computer |
java.util.Vector[] |
yesterdaysOffers
offers made yesterday for each computer type |
Constructor Summary | |
---|---|
ComputerInfo(GameSettings settings)
|
Method Summary | |
---|---|
void |
eveningUpdate(int date,
DailyActions actions)
Updates the component information using today's outgoing messages (actions taken by the agent). |
java.lang.String |
getDailySummary(int date)
Generates a compact table summarizing today's computer information. |
private java.lang.String |
getDecimal(double d,
int length)
|
int |
getIndex(int productID)
Returns the index for the productID |
int[] |
getTomorrowsInventoryCopy()
Returns a copy of tomorrow's available computers (including computers being produced on the current day) |
void |
morningUpdate(DailyInfo dayInfo)
Updates the computer information using today's incoming messages. |
private java.lang.String |
pad(int i)
|
private java.lang.String |
pad(java.lang.String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int[] dailyRFQCount
public int[] highSegmentRFQCount
public int[] midSegmentRFQCount
public int[] lowSegmentRFQCount
public int[][] wholeRfqNumber
public int[][] rfqNumber
public int[][] offerNumber
public int[][] wholeOfferNumber
public int[][] offerPrice
public int[][] orderNumber
public int[][] wholeOrderNumber
public int[][] averageOfferPrice
public int[][] orderPrice
public int[][] inventory
public int[] tomorrowsInventory
public int[][] produced
public int[][] delivered
public int[] totalOrders
public int[][] highPrice
public int[][] lowPrice
public int[] productIDs
public java.util.Hashtable rfqTable
public java.util.Hashtable offerTable
public java.util.Hashtable orderTable
public java.util.Vector[] yesterdaysOffers
public int[][] componentIndexList
public int[] basePrices
private GameSettings settings
private static final int columnWidth
private int numComputers
private int numDays
private int date
Constructor Detail |
---|
public ComputerInfo(GameSettings settings)
settings
- the game settingsMethod Detail |
---|
public int[] getTomorrowsInventoryCopy()
public java.lang.String getDailySummary(int date)
public int getIndex(int productID)
productID
-
public void morningUpdate(DailyInfo dayInfo)
dayInfo
- information received todaypublic void eveningUpdate(int date, DailyActions actions)
date
- the dateactions
- the agent's actions for the dayprivate java.lang.String pad(int i)
private java.lang.String pad(java.lang.String s)
private java.lang.String getDecimal(double d, int length)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |