stella.xml
Class PickRaiseMerit

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.AbstractMerit
                  extended by stella.xml.PickRaiseMerit
All Implemented Interfaces:
Serializable, Cloneable, EndpointDefining, Meriting, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class PickRaiseMerit
extends AbstractMerit
implements EndpointDefining

This merit represents a merit that grows/shrinks after a first successful observation of a target. Until the target has been observed for the first time, the merit is one, indicating its use as a timeslot. The merit is fitted with a two-order polynom such has a value of k at n=1, from n=1 it rises within m observations to its peak value (m may also be negative, then the merit drops as soon as the target was picked). After a maximum observations z the merit drops to zero, where it stays (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[n²/z(2m-z)+2mċn/z(z-2m)+1]
   

See Also:
AfterPickMerit, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  double apoly
          To easy evaluation, calculate polynom at construct.
private  double bpoly
          To easy evaluation, calculate polynom at construct.
private static int DEFMAXIMUM
          The default rise-time to the maximum.
private static double DEFSCALE
          The default scale.
static String KEY_MAXIMUM
          The number of picks until the merit reaches its maximum.
static String KEY_SCALE
          The key linked to the scaling factor k of the merit.
static String KEY_ZERO
          The number of picks when the merit drops down to zero.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
PickRaiseMerit(Map prop)
          Constructs a new after-start merit.
 
Method Summary
 double getMerit(ParameterClustering needtime, TargetDefinition aim, Collection oftargets, long ignore)
          Calculates the merit.
 boolean isCompleted(ParameterClustering set, TargetDefinition aim)
          Test, if the first successful observation has been done too long in the past.
 
Methods inherited from class stella.AbstractMerit
createMerit, getInitializer, initMerit
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, 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, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.Meriting
getInitializer, initMerit
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_SCALE

public static final String KEY_SCALE
The key linked to the scaling factor k of the merit.

See Also:
Constant Field Values

KEY_MAXIMUM

public static final String KEY_MAXIMUM
The number of picks until the merit reaches its maximum.

See Also:
Constant Field Values

KEY_ZERO

public static final String KEY_ZERO
The number of picks when the merit drops down to zero.

See Also:
Constant Field Values

DEFSCALE

private static final double DEFSCALE
The default scale.

See Also:
Constant Field Values

DEFMAXIMUM

private static final int DEFMAXIMUM
The default rise-time to the maximum.

See Also:
Constant Field Values

apoly

private double apoly
To easy evaluation, calculate polynom at construct. Quadratic factor.


bpoly

private double bpoly
To easy evaluation, calculate polynom at construct. Linear factor.

Constructor Detail

PickRaiseMerit

public PickRaiseMerit(Map prop)
Constructs a new after-start merit. The zero-time must be specified.

Method Detail

getMerit

public double getMerit(ParameterClustering needtime,
                       TargetDefinition aim,
                       Collection oftargets,
                       long ignore)
Calculates the merit. If the target has never been successfully picked, the entry value is returned. If the first successful pick was longer than 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.
This merit is not time dependent, thus the time span is ignored.

Specified by:
getMerit in interface Meriting
Parameters:
needtime - Current observing conditions.
aim - The actual target.
oftargets - The list of targetes relevant to the actual target.
ignore - The relevant time span in ms.

isCompleted

public boolean isCompleted(ParameterClustering set,
                           TargetDefinition aim)
Test, if the first successful observation has been done too long in the past.

Specified by:
isCompleted in interface EndpointDefining