uk.ac.liv.auction.agent
Class PureSimpleStrategy

java.lang.Object
  extended byuk.ac.liv.auction.agent.AbstractStrategy
      extended byuk.ac.liv.auction.agent.FixedQuantityStrategyImpl
          extended byuk.ac.liv.auction.agent.PureSimpleStrategy
All Implemented Interfaces:
AuctionEventListener, java.lang.Cloneable, FixedQuantityStrategy, Parameterizable, Prototypeable, Resetable, java.io.Serializable, Strategy

public class PureSimpleStrategy
extends FixedQuantityStrategyImpl
implements java.io.Serializable, Prototypeable

A trading strategy in which we bid a constant mark-up on the agent's private value.

Parameters
base.delta
double
(the markup over our private valuation to bid for)

Version:
$Revision: 1.29 $
Author:
Steve Phelps
See Also:
Serialized Form

Field Summary
protected  double margin
           
 
Fields inherited from class uk.ac.liv.auction.agent.AbstractStrategy
agent, auction, currentShout
 
Constructor Summary
PureSimpleStrategy()
           
PureSimpleStrategy(AbstractTradingAgent agent, double margin, int quantity)
           
 
Method Summary
 void endOfRound(Auction auction)
           
 boolean modifyShout(Shout.MutableShout shout)
          Modify the price and quantity of the given shout according to this strategy.
 java.lang.Object protoClone()
           
 void setMargin(double margin)
           
 void setup(ec.util.ParameterDatabase parameters, ec.util.Parameter base)
          Initialise this object from a parameter database.
 
Methods inherited from class uk.ac.liv.auction.agent.FixedQuantityStrategyImpl
determineQuantity, getQuantity, setQuantity
 
Methods inherited from class uk.ac.liv.auction.agent.AbstractStrategy
eventOccurred, getAgent, initialise, modifyShout, reset, setAgent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.liv.util.Resetable
reset
 
Methods inherited from interface uk.ac.liv.auction.agent.Strategy
modifyShout, setAgent
 
Methods inherited from interface uk.ac.liv.auction.core.AuctionEventListener
eventOccurred
 

Field Detail

margin

protected double margin
Constructor Detail

PureSimpleStrategy

public PureSimpleStrategy(AbstractTradingAgent agent,
                          double margin,
                          int quantity)

PureSimpleStrategy

public PureSimpleStrategy()
Method Detail

setup

public void setup(ec.util.ParameterDatabase parameters,
                  ec.util.Parameter base)
Description copied from interface: Parameterizable
Initialise this object from a parameter database.

Specified by:
setup in interface Parameterizable
Overrides:
setup in class FixedQuantityStrategyImpl

protoClone

public java.lang.Object protoClone()
Specified by:
protoClone in interface Prototypeable
Overrides:
protoClone in class AbstractStrategy

modifyShout

public boolean modifyShout(Shout.MutableShout shout)
Description copied from class: AbstractStrategy
Modify the price and quantity of the given shout according to this strategy.

Overrides:
modifyShout in class FixedQuantityStrategyImpl

endOfRound

public void endOfRound(Auction auction)
Specified by:
endOfRound in class AbstractStrategy

setMargin

public void setMargin(double margin)