uk.ac.liv.auction.ui
Class DrawableAgentAdaptor
java.lang.Object
uk.ac.liv.auction.ui.DrawableAgentAdaptor
- All Implemented Interfaces:
- uchicago.src.sim.gui.Drawable
- public class DrawableAgentAdaptor
- extends java.lang.Object
- implements uchicago.src.sim.gui.Drawable
An adaptor that allows an AbstractTraderAgent to be drawn on a
RePast Object2DDisplay. Each agent is represented by a coloured bar.
Profitable buyers are shown as red, and profitable sellers are shown as
blue. The brighter the colour, the more profitable the agent. Agents
with zero profits are shown as white bars. The height of the bar represents
the current margin offered by the agent; that is, the absolute difference
between their current valuation of the commodity on offer and their last
shout price.
- Version:
- $Revision: 1.12 $
- Author:
- Steve Phelps
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
agent
protected AbstractTradingAgent agent
auction
protected Auction auction
colorMap
protected uchicago.src.sim.gui.ColorMap colorMap
minProfit
protected static float minProfit
maxProfit
protected static float maxProfit
maxMarkup
protected static float maxMarkup
scale
public float scale
DrawableAgentAdaptor
public DrawableAgentAdaptor(Auction auction)
DrawableAgentAdaptor
public DrawableAgentAdaptor(Auction auction,
AbstractTradingAgent agent)
DrawableAgentAdaptor
public DrawableAgentAdaptor(Auction auction,
AbstractTradingAgent agent,
uchicago.src.sim.gui.ColorMap colorMap)
draw
public void draw(uchicago.src.sim.gui.SimGraphics g)
- Specified by:
draw in interface uchicago.src.sim.gui.Drawable
getX
public int getX()
- Specified by:
getX in interface uchicago.src.sim.gui.Drawable
getY
public int getY()
- Specified by:
getY in interface uchicago.src.sim.gui.Drawable
getLastProfit
public float getLastProfit()
getTotalProfits
public float getTotalProfits()
getCurrentValuation
public float getCurrentValuation()
getId
public long getId()
getRole
public java.lang.String getRole()
getLastShoutPrice
public float getLastShoutPrice()
getAgentType
public java.lang.Object getAgentType()
getLastShoutAccepted
public boolean getLastShoutAccepted()
getLearningDelta
public float getLearningDelta()