net.sourceforge.jasa.agent.valuation
Class FixedValuer

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

public class FixedValuer
extends AbstractValuationPolicy
implements java.io.Serializable

A valuation policy in which we maintain a fixed private valuation independent of time or market.

See Also:
Serialized Form
 

Field Summary
protected  double value
           
 
Fields inherited from class net.sourceforge.jasa.agent.valuation.AbstractValuationPolicy
agent
 
Constructor Summary
FixedValuer()
           
FixedValuer(double value)
           
 
Method Summary
 void consumeUnit(Market auction)
          Recalculate valuation after consumption of the commodity being traded in the given market.
 double determineValue(Market auction)
          Determine the current valuation of commodity in the given market.
 void eventOccurred(SimEvent event)
           
 void initialise()
           
 void reset()
           
 void setValue(double value)
           
 void subscribeToEvents(EventScheduler scheduler)
           
 java.lang.String 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

value

protected double value
Constructor Detail

FixedValuer

public FixedValuer()

FixedValuer

public FixedValuer(double value)
Method Detail

determineValue

public double determineValue(Market auction)
Description copied from interface: ValuationPolicy
Determine the current valuation of commodity in the given market.

Specified by:
determineValue in interface ValuationPolicy

consumeUnit

public void consumeUnit(Market auction)
Description copied from interface: ValuationPolicy
Recalculate valuation after consumption of the commodity being traded in the given market.

Specified by:
consumeUnit in interface ValuationPolicy

eventOccurred

public void eventOccurred(SimEvent event)

reset

public void reset()

initialise

public void initialise()
Specified by:
initialise in interface ValuationPolicy

setValue

public void setValue(double value)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

subscribeToEvents

public void subscribeToEvents(EventScheduler scheduler)