com.rubecula.darwin.examples.travelingsalesman
Class ExPhen_TS

java.lang.Object
  extended by net.sf.tostring0.AToString
      extended by com.rubecula.darwin.domain.environment.ExPhen_
          extended by com.rubecula.darwin.examples.travelingsalesman.ExPhen_TS
All Implemented Interfaces:
ExPhen, Expression, net.sf.tostring0.IToString

public class ExPhen_TS
extends ExPhen_

Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.domain.environment.ExPhen_
LOG
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Constructor Summary
ExPhen_TS(EcoFactor factor, java.lang.Object value)
           
 
Method Summary
protected  boolean evaluate(java.lang.Object bestTime)
          This method is used to determine whether there should be follow-up action on the processing of this ExPhen object.
protected  EcoFactor getRevisedFactor()
          Method to get an updated eco factor for this ExPhen object which will be suitable to substitute in the environment as the outcome of processing this extended phenotype.
 Route getRoute()
           
protected  void postProcess(EcoFactor factor, java.lang.Object value)
          Method which is called as a post-processor as the final step of ExPhen.applyToEnvironment(Object).
 
Methods inherited from class com.rubecula.darwin.domain.environment.ExPhen_
applyToEnvironment, getEcoFactor, getValue
 
Methods inherited from class net.sf.tostring0.AToString
toString, toString, toStringBrief, toStringId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExPhen_TS

public ExPhen_TS(EcoFactor factor,
                 java.lang.Object value)
Parameters:
factor -
value -
Method Detail

getRoute

public Route getRoute()
Returns:
the Route

evaluate

protected boolean evaluate(java.lang.Object bestTime)
Description copied from class: ExPhen_
This method is used to determine whether there should be follow-up action on the processing of this ExPhen object. By convention, this method returns true only if derived value is less than criterion. It should be overridden by concrete implementers of ExPhen.

Overrides:
evaluate in class ExPhen_
Parameters:
bestTime - the higher this value, the more likely the method will return true, in general.
Returns:
true if the travel time for the environment is less than the given best time.
See Also:
ExPhen_.evaluate(Object)

getRevisedFactor

protected EcoFactor getRevisedFactor()
Description copied from class: ExPhen_
Method to get an updated eco factor for this ExPhen object which will be suitable to substitute in the environment as the outcome of processing this extended phenotype. This method should be overridden by concrete implementers of ExPhen.

Overrides:
getRevisedFactor in class ExPhen_
Returns:
a new instance of EcoFactor_Clients which has the various clients belonging to the Route which is the value of this ExPhen.

postProcess

protected void postProcess(EcoFactor factor,
                           java.lang.Object value)
Description copied from class: ExPhen_
Method which is called as a post-processor as the final step of ExPhen.applyToEnvironment(Object). By default, this method does nothing. Concrete implementations of ExPhen should consider overriding this method.

Overrides:
postProcess in class ExPhen_
Parameters:
factor - the updated eco factor
value - the value of this ExPhen


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.