Annotation Cost

  • All Implemented Interfaces:

    @Target(allowedTargets = {AnnotationTarget.FUNCTION}) 
    public @interface Cost
    
                        

    Annotates a method that computes the dynamic cost or value of an action at planning time. Similar to @Condition, this method can take domain object parameters from the blackboard. Unlike @Condition, all domain object parameters must be nullable. If a parameter is not available on the blackboard, null will be passed.

    The method can also take a Blackboard parameter for direct access to all available objects.

    The method must return a Double between 0.0 and 1.0.

    Example:

    @Cost(name = "processingCost")
    public double computeProcessingCost(@Nullable LargeDataSet largeData) {
        return largeData != null ? 0.9 : 0.1;
    }
    
    @Action(costMethod = "processingCost")
    public DataOutput processData(DataInput input) { ... }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String name
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail