Click or drag to resize

StoppingConditionConstraintEvaluator Class

The evaluator for a StoppingConditionConstraint. This evaluator will be checked at one of two times and return a Boolean indicating if the state checked can be used to stop propagation (if the StoppingConditionEvaluator also determines if propagation should stop).
Inheritance Hierarchy

Namespace:  AGI.Foundation.StoppingConditions
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public abstract class StoppingConditionConstraintEvaluator : IEvaluator, 
	IAvailability, IThreadAware, ICloneWithContext, IDisposable

The StoppingConditionConstraintEvaluator type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyGroup
Gets the group that contains this evaluator.
Public propertyIsThreadSafe
Gets a value indicating whether the methods on this instance are safe to call from multiple threads simultaneously.
Public propertyName
Gets an optional name for this StoppingConditionConstraintEvaluator.
Public propertyWhenToCheck
Gets when to check the constraint (when an event is detected or exactly found). See the documentation of WhenToCheckConstraint to help decide which one to pick.
Top
Methods
  NameDescription
Public methodStatic memberAreConstraintsSatisfied
Loop through the constraints on a stopping condition and see if their constraints are satisfied by the state given when a relevant event is detected.
Public methodCheckCurrentState
This method gets called every time a new ITimeBasedState is checked by the parent StoppingConditionEvaluator. This method should be used when the criteria of your StoppingConditionConstraintEvaluator needs to check every computed state. For example, ThresholdStoppingConditionConstraintEvaluator needs to keep track of extrema if its InequalityCriteria is set to GreaterThanMinimum or LessThanMaximum.
Public methodClone
Clones this object using the specified context.
Public methodDispose
Releases any resources associated with this instance.
Protected methodDispose(Boolean)
Releases any resources associated with this instance.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAvailabilityIntervals
Gets the intervals over which data is available.
Public methodGetCachingWrapper
Gets a version of this evaluator that caches the previously computed value so that if it is evaluated twice at the same date the computation is done only once.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialize
Initialize the constraint with the initialState. This is useful for when the constraint is comparing the current value with the initial (such as something related to the duration of propagation).
Public methodIsAvailable
Determines if valid data is available for the given JulianDate.
Public methodIsConstraintSatisfied
This method will examine from the state and return if this constraint is satisfied, and if not.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodCode exampleUpdateEvaluatorReferences
Updates the evaluator references held by this object using the reference-to-reference mapping in the specified CopyContext.
Top
Remarks

Often there are times when a StoppingCondition needs additional criteria to truly stop on the desired event. Simply combining StoppingConditions usually wouldn't work; if you would AND two conditions together, they both must have their own relevant at the exact same time. It is more reasonable to add constraints to a stopping condition that could, instead of stopping at some particular event, could instead signal that some other event has gone by, or has not happened yet. This is the evaluator for such an object.

Note that most cases are sampling some single double value from the state at the current propagation time. If that is the general behavior of your constraint, consider using ThresholdStoppingConditionConstraintEvaluator instead, which allows for the more general case for deciding upon the satisfaction of this constraint by any means of determining or based on the passed in state.

See Also