public abstract class AfterPickMerit extends AbstractMerit implements EndpointDefining
EndpointDefining). This behaviour implies that
k is non-negative, m is arbitrary, z is non-negative and z>2m. The
polynom used is
merit(t)=k[(t-t0)²/z(2m-z)+2m(t-t0)/z(z-2m)+1]
The definition of t0 and the flavor of the merit is different in its three
non-abstract subclasses SuccessorMerit, ConsecutiveMerit, and
FollowingProgramMerit. To allow a time-independant merit, set zero to
a high value. In particular, setting zero to a value less equal zero renders
z to be positive infinitive.| Modifier and Type | Field and Description |
|---|---|
private double |
apoly
To easy evaluation, calculate polynom at construct.
|
private double |
bpoly
To easy evaluation, calculate polynom at construct.
|
private static double |
DEFMAXIMUMDAY
The default rise-time to the maximum.
|
private static double |
DEFSCALE
The default scale.
|
private static String |
DEFTIME
The default name of the time parameter.
|
static String |
KEY_FLAVOR
The key linked to the 'flavor' of the merit.
|
static String |
KEY_MAXIMUM
The rise-time to the maximum, same unit as the time.
|
static String |
KEY_MAXIMUMDAY
The rise-time to the maximum, same unit as the time.
|
static String |
KEY_SCALE
The key linked to the scaling factor k of the merit.
|
static String |
KEY_TIME
The name of the time parameter.
|
static String |
KEY_ZERO
The time down to zero.
|
static String |
KEY_ZERODAY
The time down to zero.
|
private double |
m
The time to raise tio the maximum.
|
private double |
z
The time to drop to zero.
|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
AfterPickMerit(Map<String,String> prop)
Constructs a new after-start merit.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract double |
checkForStartTime(Appointable me,
Collection<Appointable> others,
GlobalGrouping set)
Checks for the starting time.
|
double |
getMerit(GlobalGrouping needtime,
Appointable aim,
Collection<Appointable> oftargets,
long within)
Calculates the merit.
|
boolean |
isCompleted(GlobalGrouping set,
Appointable aim)
Test, if the first successful observation has been done too long in the
past.
|
createMerit, getInitializer, initMeritaugment, augment, augment, augment, augment, clone, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringpublic static final String KEY_SCALE
public static final String KEY_FLAVOR
public static final String KEY_MAXIMUM
public static final String KEY_MAXIMUMDAY
public static final String KEY_ZERO
public static final String KEY_ZERODAY
public static final String KEY_TIME
private static final double DEFSCALE
private static final double DEFMAXIMUMDAY
private static final String DEFTIME
private final double apoly
private final double bpoly
private double z
private final double m
public double getMerit(GlobalGrouping needtime, Appointable aim, Collection<Appointable> oftargets, long within)
KEY_ZERO time in the past, zero is returned. In the intermittant
phase return a merit that rises from the scale factor until some
KEY_MAXIMUM time is passed, then drops to zero.public boolean isCompleted(GlobalGrouping set, Appointable aim)
isCompleted in interface EndpointDefiningprotected abstract double checkForStartTime(Appointable me, Collection<Appointable> others, GlobalGrouping set)