|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplayer.Player
player.ZIPlayer
player.ZIFirm
public class ZIFirm
ZIFirm represents a firm with a Zero Intelligence strategy to buying and selling goods, including ones that they may produce. It is assumed that a ZIfirm is under some form of emission control which requires a certain permit to produce output. Thus, upon creation of a ZIFirm, the commodity that this firm is producing and the permits it requires must be specified.
Constructor Summary | |
---|---|
ZIFirm(java.lang.String pName,
boolean constraint,
java.lang.String type,
Commodity pCommodity,
Commodity pPermit)
|
Method Summary | |
---|---|
void |
adjustCapacity()
Changes output capacity by randomly adding 1 or subtracting 1 from the current capacity. |
void |
calibrateOutputCapacity()
Resets the output capacity to that of the target capacity |
void |
clearOutputCapacity()
Sets the output capacity to 0 |
int |
getEmissionRate()
|
Commodity |
getEmissionsPermit()
|
java.lang.String |
getFirmType()
|
double |
getLastOutputTrade()
|
int |
getOutputCapacity()
|
Commodity |
getProduct()
|
int |
getTargetCapacity()
|
void |
produceOutput()
Simulates production by simply adding an amount equal to the output capacity of the firm's product to the firm's inventory if there are enough emissionsPermits to permit it. |
void |
setLastOutputTrade(double lastOutputTrade)
|
void |
setOutputCapacity(int outputCapacity)
|
void |
setTargetCapacity(int pTargetCapacity)
Sets the current output capacity for this firm. |
Methods inherited from class player.ZIPlayer |
---|
isConstrained, makeAsk, makeBid, setConstrained |
Methods inherited from class player.Player |
---|
addToInventory, browseInventory, clearFromInventory, clearInventory, clearValueFunction, getInventory, getPlayerName, getValue, printInventory, removeFromInventory, setBudget, setPlayerName, setValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZIFirm(java.lang.String pName, boolean constraint, java.lang.String type, Commodity pCommodity, Commodity pPermit)
pName
- constraint
- type
- pCommodity
- pPermit
- Method Detail |
---|
public void adjustCapacity()
public int getEmissionRate()
public int getTargetCapacity()
public void produceOutput()
public void setTargetCapacity(int pTargetCapacity)
pTargetCapacity
- public java.lang.String getFirmType()
public Commodity getProduct()
public Commodity getEmissionsPermit()
public double getLastOutputTrade()
public void setLastOutputTrade(double lastOutputTrade)
lastOutputTrade
- public int getOutputCapacity()
public void calibrateOutputCapacity()
public void clearOutputCapacity()
public void setOutputCapacity(int outputCapacity)
outputCapacity
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |