Interface IEntityInvokedOperatorController
- All Superinterfaces:
- Serializable
- All Known Implementing Classes:
- EntityInvokedOperatorController
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 SummaryModifier and TypeMethodDescriptioncopy()Copies theIEntityInvokedOperatorController.intGets the counter how many times no lowercostshave been achieved by using anIOperator.doubleGets the cost that was be saved by using the last beneficialOperator.doubleGets the amount ofcostthat was saved by using the last beneficialOperator.Optional<com.dna.jopt.revision.operator.IOperator>Gets the lastIOperatorwhich realized acost advantage.Optional<com.dna.jopt.revision.operator.IOperator>Gets the last invokedIOperator.voidsetCostAfterInvocation(double costAfterInvocation) Updates the last invokedOperatorand the lastjoined costif saidOperatorproved to be beneficial for thecost.voidsetLastInvokedOperator(com.dna.jopt.revision.operator.IOperator op) Sets the last invokedIOperator.voidsetLastJoinedCost(double lastJoinedCost) Sets thecostbefore the newIOperatorwas invoked.
- 
Method Details- 
getLastInvokedOperatorOptional<com.dna.jopt.revision.operator.IOperator> getLastInvokedOperator()Gets the last invokedIOperator.- Returns:
- the Operator
 
- 
setLastInvokedOperatorvoid setLastInvokedOperator(com.dna.jopt.revision.operator.IOperator op) Sets the last invokedIOperator.- Parameters:
- op- the iOperator last used
 
- 
setLastJoinedCostvoid setLastJoinedCost(double lastJoinedCost) Sets thecostbefore the newIOperatorwas invoked.- Parameters:
- lastJoinedCost- the double cost before the- Operator
 
- 
setCostAfterInvocationvoid setCostAfterInvocation(double costAfterInvocation) Updates the last invokedOperatorand the lastjoined costif saidOperatorproved to be beneficial for thecost.- Parameters:
- costAfterInvocation- the double new cost after the- Operator
 
- 
getCostAdvantagedouble getCostAdvantage()Gets the cost that was be saved by using the last beneficialOperator.- Returns:
- the cost advantage of using said Operator
 
- 
copyCopies theIEntityInvokedOperatorController.This is used when copying an IEntitysince the history of the cost in theOperatorControlleris needed.- Returns:
- a copy of this Object
 
- 
getLastBeneficialInvokedOperatorOptional<com.dna.jopt.revision.operator.IOperator> getLastBeneficialInvokedOperator()Gets the lastIOperatorwhich realized acost advantage.If no such Operatorwas used, returns anempty Optional.- Returns:
- the last beneficial Operator
 
- 
getLastBeneficialCostAdvantagedouble getLastBeneficialCostAdvantage()Gets the amount ofcostthat was saved by using the last beneficialOperator.- Returns:
- the saved cost
 
- 
getBenefitCounterint getBenefitCounter()Gets the counter how many times no lowercostshave been achieved by using anIOperator.This counter resets when a beneficial Operatorhas been invoked andsetCostAfterInvocation(double)has been called.- Returns:
- the number of times no benefit has been achieved
 
 
-