public class PriorityMerit extends AbstractMerit
KEY_IMPACT
and KEY_STRETCH that can be overriden in the xml-definition.
The user must provide a KEY_PRIORITY that should be a simple
integer. Smaller numbers means higher priority.
The formula used for this merit is
merit(t) = k·ef·pHere, k is the
KEY_IMPACT factor, while f is the
KEY_STRETCH. The priority comes in with p. Note that this
merit is not time dependant. Its range is between zero and positive
infinity.
| Modifier and Type | Field and Description |
|---|---|
private static double |
DEFIMPACT
Default value for the priority impact.
|
private static double |
DEFSTRETCH
Default value for the priority stretch.
|
static String |
KEY_IMPACT
The key linked to the impact of the priority merit.
|
static String |
KEY_PRIORITY
The key linked to the priority of the target.
|
static String |
KEY_STRETCH
The key linked to the stretching factor of the priority.
|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
PriorityMerit(Map prop)
Constructs a new priority merit.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getMerit(GlobalGrouping set,
Appointable target,
Collection ignore,
long dummy)
Calculates the priority merit stemming from the target priority.
|
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_IMPACT
public static final String KEY_STRETCH
public static final String KEY_PRIORITY
private static final double DEFIMPACT
private static final double DEFSTRETCH
public PriorityMerit(Map prop)
AbstractMerit.createMerit(java.util.Map<java.lang.String, java.lang.String>)
method. This create method also takes care of proper argument
overloading, while normal construction always uses default values.KEY_STRETCH and the
KEY_IMPACT factors are set.public double getMerit(GlobalGrouping set, Appointable target, Collection ignore, long dummy)
AbstractMerit.createMerit(java.util.Map<java.lang.String, java.lang.String>) creation.set - Current observing conditions.target - The actual target.ignore - All targets, observable or not.dummy - The relevant time span in ms.