public class BeforeAfterMerit extends AbstractMerit implements EndpointDefining
KEY_T0. If the KEY_WIDTH
is positive, the merit blocks observation before t0, if it
is negative, the merit blocks observation after t0.
The absoulte value
of KEY_WIDTH defines the sharpness of the merit as in
ts(t) = ln(±(t-t0)/width+1)If the logarithm evaluates to a negative value, zero is returned. For a positive
KEY_WIDTH, i.e. for a before merit, this class also has
the power of defining an end-point, i.e. this class implements
EndpointDefining.| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFTIME
Default time parameter name.
|
private static double |
DEFWIDTH
Default value for the width, one hour.
|
static String |
KEY_T0
The key linked to the impact of the airmass merit.
|
static String |
KEY_TIME
The key pointing to the name of the time parameter.
|
static String |
KEY_WIDTH
The key linked to the maximum number of successful observations.
|
private static long |
serialVersionUID |
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
BeforeAfterMerit(Map<String,String> prop)
Constructs a at-time merit centered at the current time and with a
default width of
DEFWIDTH. |
| Modifier and Type | Method and Description |
|---|---|
double |
getMerit(GlobalGrouping set,
Appointable target,
Collection<Appointable> ignore,
long within)
Calculates the actual time slot merit.
|
boolean |
isCompleted(GlobalGrouping set,
Appointable target)
Test if this target is completed.
|
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, toStringprivate static final long serialVersionUID
public static final String KEY_T0
public static final String KEY_WIDTH
public static final String KEY_TIME
private static final double DEFWIDTH
private static final String DEFTIME
public BeforeAfterMerit(Map<String,String> prop)
DEFWIDTH. Proper creation should be
done using the
AbstractMerit.createMerit(java.util.Map<java.lang.String, java.lang.String>)
method. This create method also takes care of proper parameter
overloading.public double getMerit(GlobalGrouping set, Appointable target, Collection<Appointable> ignore, long within)
public boolean isCompleted(GlobalGrouping set, Appointable target)
isCompleted in interface EndpointDefining