Class RandomAgent

java.lang.Object
  extended bySwarmObjectImpl
      extended byBasicSumAgent
          extended byRandomAgent

public class RandomAgent
extends BasicSumAgent

This is the RandomAgent. RandomAgent acts at random.

Author:
Marco Agagliate integrations of Antonio de Ruvo
See Also:
Serialized Form

Field Summary
 double[] order
          This variable is for send order to the book.
 RandomRuleMaster ruleMaster
          This is the agent's rule master.
 
Fields inherited from class BasicSumAgent
agentProbToActWithMarketPrice, agentWealthAtMeanDailyPrice, asymmetricBuySellProb, buySellSwitch, executedPrices, iMax, liquidityQuantity, maxOrderQuantity, meanOperatingPrice, number, price, printing, shareQuantity, shareValueAtMeanDailyPrice, theBook
 
Constructor Summary
RandomAgent(Zone aZone, int maxOrderQuantity)
          Constructor for a new RandomAgent.
 
Method Summary
 void act0()
          This method is called in the first phase of the day.
 void act1()
          This method is called in the first phase of the day.
 void setRuleMaster(RandomRuleMaster r)
          This method sets the rule master.
 
Methods inherited from class BasicSumAgent
act2, extract, getWealthAtMeanDailyPrice, setAgentProbToActWithMarketPrice, setAsymmetricBuySellProb, setBook, setConfirmationOfExecutedPrice, setMaxOrderQuantity, setNumber, setPrinting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

order

public double[] order
This variable is for send order to the book.


ruleMaster

public RandomRuleMaster ruleMaster
This is the agent's rule master.

Constructor Detail

RandomAgent

public RandomAgent(Zone aZone,
                   int maxOrderQuantity)
Constructor for a new RandomAgent.

Method Detail

setRuleMaster

public void setRuleMaster(RandomRuleMaster r)
This method sets the rule master.


act0

public void act0()
This method is called in the first phase of the day.

Overrides:
act0 in class BasicSumAgent

act1

public void act1()
This method is called in the first phase of the day. The agent acts in the market.

Overrides:
act1 in class BasicSumAgent