net.sourceforge.jasa.agent.valuation
Class IntervalValuer

java.lang.Object
  extended by net.sourceforge.jasa.agent.valuation.AbstractValuationPolicy
      extended by net.sourceforge.jasa.agent.valuation.FixedValuer
          extended by net.sourceforge.jasa.agent.valuation.IntervalValuer
All Implemented Interfaces:
java.io.Serializable, ValuationPolicy, MarketEventListener
Direct Known Subclasses:
BuyerIntervalValuer, SellerIntervalValuer

public abstract class IntervalValuer
extends FixedValuer

Agents configured with this valuation policy will receive a unique private value from a common set of values starting at minValue and incrementing by step as each agent is assigned a valuation at agent setup time. This is useful for quickly specifying supply or demand curves with a constant "slope" (step).

See Also:
Serialized Form
 

Field Summary
static java.lang.String P_DEF_BASE
           
static java.lang.String P_MINVALUE
           
static java.lang.String P_STEP
           
 
Fields inherited from class net.sourceforge.jasa.agent.valuation.FixedValuer
value
 
Fields inherited from class net.sourceforge.jasa.agent.valuation.AbstractValuationPolicy
agent
 
Constructor Summary
IntervalValuer()
           
IntervalValuer(double minValue, double step)
           
 
Method Summary
abstract  boolean firstValue()
           
abstract  double getMinValue()
           
abstract  double getNextValue()
           
abstract  double getStep()
           
 void initialise()
           
 void reset()
           
abstract  void setFirstValue(boolean firstValue)
           
abstract  void setMinValue(double value)
           
abstract  void setNextValue(double value)
           
abstract  void setStep(double step)
           
 
Methods inherited from class net.sourceforge.jasa.agent.valuation.FixedValuer
consumeUnit, determineValue, eventOccurred, setValue, subscribeToEvents, toString
 
Methods inherited from class net.sourceforge.jasa.agent.valuation.AbstractValuationPolicy
getAgent, setAgent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_DEF_BASE

public static final java.lang.String P_DEF_BASE
See Also:
Constant Field Values

P_MINVALUE

public static final java.lang.String P_MINVALUE
See Also:
Constant Field Values

P_STEP

public static final java.lang.String P_STEP
See Also:
Constant Field Values
Constructor Detail

IntervalValuer

public IntervalValuer()

IntervalValuer

public IntervalValuer(double minValue,
                      double step)
Method Detail

initialise

public void initialise()
Specified by:
initialise in interface ValuationPolicy
Overrides:
initialise in class FixedValuer

reset

public void reset()
Overrides:
reset in class FixedValuer

setMinValue

public abstract void setMinValue(double value)

getMinValue

public abstract double getMinValue()

setStep

public abstract void setStep(double step)

getStep

public abstract double getStep()

setNextValue

public abstract void setNextValue(double value)

getNextValue

public abstract double getNextValue()

firstValue

public abstract boolean firstValue()

setFirstValue

public abstract void setFirstValue(boolean firstValue)