Package org.oristool.models.stpn.trees
Class TruncationPolicy
java.lang.Object
org.oristool.models.stpn.trees.TruncationPolicy
- All Implemented Interfaces:
EnumerationPolicy
Priority policy halting the enumeration on dropRegenerative leaves or when
the total reaching (before time limit) probability of nodes to be expanded is
lower than epsilon (or both).
-
Constructor Summary
ConstructorsConstructorDescriptionTruncationPolicy(BigDecimal epsilon, OmegaBigDecimal tauAgeLimit) Builds a truncation policy for a given time limit and allowed error (total probability mass of discarded nodes). -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Succession succession) Adds the succession child as a new state to be explored.booleanisEmpty()Checks whether the set of states to explore is empty.remove()Extracts a succession: its child node is the next state to be explored.
-
Constructor Details
-
TruncationPolicy
Builds a truncation policy for a given time limit and allowed error (total probability mass of discarded nodes).Nodes with higher probability are expanded first.
- Parameters:
epsilon- allowed errortauAgeLimit- time bound
-
-
Method Details
-
getTauAgeLimit
-
getEpsilon
-
add
Description copied from interface:EnumerationPolicyAdds the succession child as a new state to be explored.- Specified by:
addin interfaceEnumerationPolicy- Parameters:
succession- succession to be added
-
remove
Description copied from interface:EnumerationPolicyExtracts a succession: its child node is the next state to be explored.- Specified by:
removein interfaceEnumerationPolicy- Returns:
- succession with next state
-
isEmpty
public boolean isEmpty()Description copied from interface:EnumerationPolicyChecks whether the set of states to explore is empty.- Specified by:
isEmptyin interfaceEnumerationPolicy- Returns:
- true if no more states should be explored.
-