Interface IEntityInvokedOperatorController

All Superinterfaces:
Serializable
All Known Implementing Classes:
EntityInvokedOperatorController

public interface IEntityInvokedOperatorController extends Serializable
This interface provides methods that help to track the last invoked IOperator, which last Operator was able to realize lower costs and by what amount.
Since:
17/02/2020
Version:
17/02/2020
Author:
DNA
  • Method Details

    • getLastInvokedOperator

      Optional<com.dna.jopt.revision.operator.IOperator> getLastInvokedOperator()
      Gets the last invoked IOperator.
      Returns:
      the Operator
    • setLastInvokedOperator

      void setLastInvokedOperator(com.dna.jopt.revision.operator.IOperator op)
      Sets the last invoked IOperator.
      Parameters:
      op - the iOperator last used
    • setLastJoinedCost

      void setLastJoinedCost(double lastJoinedCost)
      Sets the cost before the new IOperator was invoked.
      Parameters:
      lastJoinedCost - the double cost before the Operator
    • setCostAfterInvocation

      void setCostAfterInvocation(double costAfterInvocation)
      Updates the last invoked Operator and the last joined cost if said Operator proved to be beneficial for the cost.
      Parameters:
      costAfterInvocation - the double new cost after the Operator
    • getCostAdvantage

      double getCostAdvantage()
      Gets the cost that was be saved by using the last beneficial Operator.
      Returns:
      the cost advantage of using said Operator
    • copy

      Copies the IEntityInvokedOperatorController.

      This is used when copying an IEntity since the history of the cost in the OperatorController is needed.

      Returns:
      a copy of this Object
    • getLastBeneficialInvokedOperator

      Optional<com.dna.jopt.revision.operator.IOperator> getLastBeneficialInvokedOperator()
      Gets the last IOperator which realized a cost advantage.

      If no such Operator was used, returns an empty Optional.

      Returns:
      the last beneficial Operator
    • getLastBeneficialCostAdvantage

      double getLastBeneficialCostAdvantage()
      Gets the amount of cost that was saved by using the last beneficial Operator.
      Returns:
      the saved cost
    • getBenefitCounter

      int getBenefitCounter()
      Gets the counter how many times no lower costs have been achieved by using an IOperator.

      This counter resets when a beneficial Operator has been invoked and setCostAfterInvocation(double) has been called.

      Returns:
      the number of times no benefit has been achieved