|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cuny.cat.valuation.IntervalValuerGenerator
public class IntervalValuerGenerator
Agents configured with valuation policies created by this generator 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).
Parameters
base.minvalue double >= 0 (50.0 by default) |
(the minimal private value to be allocated) |
base.step double >= 0 (5.0 by default) |
(the amount to increase each step for next private value) |
Default Base
interval_valuer |
Field Summary | |
---|---|
static double |
DEFAULT_MINVALUE
|
static double |
DEFAULT_STEP
|
protected boolean |
firstValue
|
protected double |
minValue
The minimum valuation that any buyer will receive. |
protected double |
nextValue
|
static java.lang.String |
P_DEF_BASE
|
static java.lang.String |
P_MINVALUE
|
static java.lang.String |
P_STEP
|
protected double |
step
The increment in valuation to use |
Constructor Summary | |
---|---|
IntervalValuerGenerator()
|
|
IntervalValuerGenerator(double minValue,
double step)
|
Method Summary | |
---|---|
ValuationPolicy |
createValuer()
creates a new valuer. |
void |
eventOccurred(AuctionEvent event)
Recalculate valuation(s) in response to an auction event. |
protected boolean |
firstValue()
|
protected double |
getMinValue()
|
protected double |
getNextValue()
|
protected double |
getStep()
|
void |
reset()
|
protected void |
setFirstValue(boolean firstValue)
|
protected void |
setMinValue(double value)
|
protected void |
setNextValue(double value)
|
protected void |
setStep(double step)
|
void |
setup(edu.cuny.config.param.ParameterDatabase parameters,
edu.cuny.config.param.Parameter base)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String P_DEF_BASE
public static final java.lang.String P_MINVALUE
public static final java.lang.String P_STEP
public static final double DEFAULT_MINVALUE
public static final double DEFAULT_STEP
protected double minValue
protected double step
protected double nextValue
protected boolean firstValue
Constructor Detail |
---|
public IntervalValuerGenerator()
public IntervalValuerGenerator(double minValue, double step)
Method Detail |
---|
public void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
setup
in interface edu.cuny.config.param.Parameterizable
public void reset()
reset
in interface edu.cuny.obj.Resetable
protected boolean firstValue()
protected double getMinValue()
protected double getNextValue()
protected double getStep()
protected void setFirstValue(boolean firstValue)
protected void setMinValue(double value)
protected void setNextValue(double value)
protected void setStep(double step)
public ValuationPolicy createValuer()
ValuerGenerator
createValuer
in interface ValuerGenerator
public void eventOccurred(AuctionEvent event)
ValuerGenerator
eventOccurred
in interface AuctionEventListener
eventOccurred
in interface ValuerGenerator
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |