edu.cuny.cat.trader.strategy
Class RandomConstrainedStrategy
java.lang.Object
  
java.util.Observable
      
edu.cuny.cat.trader.strategy.AbstractStrategy
          
edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
              
edu.cuny.cat.trader.strategy.RandomConstrainedStrategy
- All Implemented Interfaces: 
 - AuctionEventListener, FixedQuantityStrategy, Strategy, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Prototypeable, edu.cuny.obj.Resetable, java.io.Serializable, java.lang.Cloneable
 
public class RandomConstrainedStrategy
- extends FixedQuantityStrategyImpl
- implements java.io.Serializable
  
 A trading strategy that in which we bid a different random markup on our
 agent's private value in each auction round. This strategy is often referred
 to as Zero Intelligence Constrained (ZI-C) in the literature.
 
 
 
 Parameters
 
 
 
 
 base.maxmarkup 
 double >= 0 | 
 (the maximum markup to bid for) | 
 
 
 
 
 
 Default Base
 
 
 
 | random_constrained_strategy | 
 
 
- Version:
 
  - $Revision: 1.14 $
 
- Author:
 
  - Steve Phelps
 
- See Also:
 - Serialized Form
 
 
 
 
 
 
 
 
| Methods inherited from class java.util.Observable | 
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
 
| Methods inherited from interface edu.cuny.obj.Prototypeable | 
protoClone | 
 
| Methods inherited from interface edu.cuny.obj.Resetable | 
reset | 
 
 
maxMarkup
protected double maxMarkup
markupDistribution
protected cern.jet.random.AbstractContinousDistribution markupDistribution
P_DEF_BASE
public static final java.lang.String P_DEF_BASE
- See Also:
 - Constant Field Values
 
P_MAX_MARKUP
public static final java.lang.String P_MAX_MARKUP
- See Also:
 - Constant Field Values
 
DEFAULT_MARKUP
public static final double DEFAULT_MARKUP
- See Also:
 - Constant Field Values
 
RandomConstrainedStrategy
public RandomConstrainedStrategy()
RandomConstrainedStrategy
public RandomConstrainedStrategy(AbstractTradingAgent agent,
                                 double maxMarkup)
setup
public void setup(edu.cuny.config.param.ParameterDatabase parameters,
                  edu.cuny.config.param.Parameter base)
- Specified by:
 setup in interface edu.cuny.config.param.Parameterizable- Overrides:
 setup in class FixedQuantityStrategyImpl
 
 
initialize
public void initialize()
- Overrides:
 initialize 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
 
- Returns:
 - false if no shout is to be placed at this time
 
 
 
getMaxMarkup
public double getMaxMarkup()
 
 
setMaxMarkup
public void setMaxMarkup(double maxMarkup)
 
 
toString
public java.lang.String toString()
- Overrides:
 toString in class FixedQuantityStrategyImpl