|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ComponentInfo
public class ComponentInfo
Holds all information pertaining to components. 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 production schedule is sent that is not feasible given the components available, the problem will not be detected.
Field Summary | |
---|---|
int[] |
basePrices
component base prices |
private static int |
columnWidth
width of summary table columns |
java.util.Hashtable[] |
currentOrders
a list of orders that have not been delivered for each component |
int[][] |
deliveries
completed deliveries |
int[][] |
expectedDeliveries
expected future deliveries |
int[][] |
inventory
inventory each day |
private int |
numComponents
|
private int |
numDays
|
java.util.Hashtable |
offerTable
stores offers by offerID |
int[][] |
orderedToday
number ordered each day |
int[] |
orderedTotal
total number currently ordered |
java.util.Vector[] |
ordersByDate
a list of all orders for each component, in order of date |
int[] |
productIDs
ID for each index |
java.util.Hashtable |
rfqTable
stores RFQs by rfqID |
private GameSettings |
settings
|
SupplierModel[][] |
supplierModel
information on each supplier line, as [component][supplier] |
java.util.Vector |
todaysOffers
list of all offers |
java.util.Vector[] |
todaysOrders
list of orders for each component |
java.util.Vector[][] |
todaysSortedOffers
offers sorted by date, divided into [component][supplier] |
int[] |
tomorrowsInventory
tomorrow's available inventory (including today's deliveries, which aren't included in today's inventory) |
int[][] |
used
used each day |
Constructor Summary | |
---|---|
ComponentInfo(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 component information. |
int |
getIndex(int productID)
Returns the index for the productID |
int[] |
getTomorrowsInventoryCopy()
Returns a copy of tomorrow's available inventory (including components delivered today). |
void |
morningUpdate(DailyInfo dayInfo)
Updates the component 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[][] deliveries
public int[][] expectedDeliveries
public int[][] inventory
public int[] tomorrowsInventory
public int[][] used
public int[][] orderedToday
public int[] orderedTotal
public int[] basePrices
public int[] productIDs
public java.util.Hashtable rfqTable
public java.util.Hashtable[] currentOrders
public java.util.Hashtable offerTable
public java.util.Vector todaysOffers
public java.util.Vector[] todaysOrders
public java.util.Vector[] ordersByDate
public java.util.Vector[][] todaysSortedOffers
public SupplierModel[][] supplierModel
private GameSettings settings
private static final int columnWidth
private int numComponents
private int numDays
Constructor Detail |
---|
public ComponentInfo(GameSettings settings)
settings
- the game settingsMethod Detail |
---|
public int[] getTomorrowsInventoryCopy()
public java.lang.String getDailySummary(int date)
public void morningUpdate(DailyInfo dayInfo)
dayInfo
- information received todaypublic void eveningUpdate(int date, DailyActions actions)
date
- the dateactions
- the agent's actions for the daypublic int getIndex(int productID)
productID
- (e.g., 101)
private java.lang.String pad(int i)
private java.lang.String pad(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |