|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SimpleDemandManager
public class SimpleDemandManager
A very simple demand manager.
Nested Class Summary | |
---|---|
(package private) class |
SimpleDemandManager.OrderHandler
Used for sorting orders and/or RFQs |
Field Summary | |
---|---|
private DailyActions |
actions
|
private AgentInfo |
agentInfo
|
private int[] |
completedComputers
number of computers remaining in inventory |
private double[] |
componentCost
|
private int[][] |
components
number of components remaining |
private double[] |
computerCost
|
private int[] |
cycles
cycles remaining each day |
private int |
date
|
private DailyInfo |
dayInfo
|
(package private) static int |
numComponents
|
(package private) static int |
numComputers
|
private int |
numProductionDays
how many days of production to plan for |
private se.sics.tasim.props.OfferBundle |
offers
|
private int[][] |
producedPerDay
how many of each computer are produced per day |
private double[] |
salesPrices
|
private GameSettings |
settings
|
Constructor Summary | |
---|---|
SimpleDemandManager()
|
Method Summary | |
---|---|
private void |
calculateCosts()
Predicts replacement costs for each type of component and computer |
private void |
getProductionDays()
Determines how many days of production should be planned for. |
private void |
handleRFQs()
Makes offers on RFQs. |
private void |
predictSalesPrices()
Predicts the price that each type of computer will sell for. |
void |
produceDeliverBid(GameSettings settings,
DailyInfo dayInfo,
AgentInfo agentInfo,
DailyActions actions)
Performs all of the demand manager's actions: produce and deliver computers, and bid on RFQs from customers. |
private void |
produceExistingOrders()
Tries to deliver or produce existing orders. |
void |
projectFutureComponentUse()
Project component use for some number of days in the future, so the supply manager will know what to order. |
private void |
sendProductionSchedule()
Determines the production schedule for tomorrow, and sends it to the factory. |
private void |
setupResources()
Initializes the resources - cycles, components, and completed computers. |
private boolean |
tryToProduce(int index,
int quantity,
int daysUntilDue)
Tries to produce the needed computers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int numComponents
static final int numComputers
private GameSettings settings
private DailyInfo dayInfo
private AgentInfo agentInfo
private DailyActions actions
private int date
private int numProductionDays
private se.sics.tasim.props.OfferBundle offers
private double[] componentCost
private double[] computerCost
private double[] salesPrices
private int[][] components
private int[] completedComputers
private int[] cycles
private int[][] producedPerDay
Constructor Detail |
---|
public SimpleDemandManager()
Method Detail |
---|
private void calculateCosts()
private void predictSalesPrices()
private void getProductionDays()
private void setupResources()
private void produceExistingOrders()
private void handleRFQs()
private boolean tryToProduce(int index, int quantity, int daysUntilDue)
index
- computer indexquantity
- how many are neededdaysUntilDue
- how far in the future the due date is
private void sendProductionSchedule()
public void projectFutureComponentUse()
public void produceDeliverBid(GameSettings settings, DailyInfo dayInfo, AgentInfo agentInfo, DailyActions actions)
produceDeliverBid
in interface InterfaceDemandManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |