public abstract class SegmentPropagatorInequalityConstraint extends DefinitionalObject
ParameterOptimizer.
This is the definition of the
evaluator.| Modifier | Constructor and Description |
|---|---|
protected |
SegmentPropagatorInequalityConstraint()
Initializes a new instance.
|
protected |
SegmentPropagatorInequalityConstraint(InequalityBoundType boundType,
double boundValue,
double tolerance)
Initializes a new instance.
|
protected |
SegmentPropagatorInequalityConstraint(InequalityBoundType boundType,
double boundValue,
double tolerance,
InequalityConstraintScaling scaling)
Initializes a new instance.
|
protected |
SegmentPropagatorInequalityConstraint(InequalityBoundType boundType,
ValueDefinition<Double> boundValue,
double tolerance)
Initializes a new instance.
|
protected |
SegmentPropagatorInequalityConstraint(InequalityBoundType boundType,
ValueDefinition<Double> boundValue,
double tolerance,
InequalityConstraintScaling scaling,
double weight)
Initializes a new instance.
|
protected |
SegmentPropagatorInequalityConstraint(SegmentPropagatorInequalityConstraint existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkForSameDefinition(DefinitionalObject other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected abstract boolean |
checkForSameDefinition(SegmentPropagatorInequalityConstraint other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
void |
enumerateDependencies(DependencyEnumerator enumerator)
Enumerates the dependencies of this object by calling
DependencyEnumerator#enumerate(T) for each object that this object directly depends upon. |
protected void |
freezeAggregatedObjects()
Called by
DefinitionalObject.freeze() to also freeze any objects that are considered to be a part of this object. |
InequalityBoundType |
getBoundType()
|
ValueDefinition<Double> |
getBoundValue()
Gets the threshold that the
evaluated value
will be compared to when solving for a particular trajectory. |
abstract SegmentPropagatorInequalityConstraintEvaluator |
getEvaluator(EvaluatorGroup group)
Creates and returns the
SegmentPropagatorInequalityConstraintEvaluator. |
String |
getName()
Gets an optional name to identify this constraint.
|
InequalityConstraintSettings |
getSettings()
Gets the settings for the
ParameterOptimizer
associated with this constraint. |
void |
setBoundType(InequalityBoundType value)
|
void |
setBoundValue(ValueDefinition<Double> value)
Sets the threshold that the
evaluated value
will be compared to when solving for a particular trajectory. |
void |
setName(String value)
Sets an optional name to identify this constraint.
|
void |
setSettings(InequalityConstraintSettings value)
Sets the settings for the
ParameterOptimizer
associated with this constraint. |
protected void |
validateProperties()
Validates that required properties are configured correctly in order to get an
evaluator for this instance.
|
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, clone, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, freeze, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozenprotected SegmentPropagatorInequalityConstraint()
Initializes a new instance. The weight defaults to 1.0.
Before SegmentPropagatorInequalityConstraint.getEvaluator(agi.foundation.EvaluatorGroup) can be called,
BoundValue (get / set) and BoundType (get / set) must be configured, and
Settings (get / set) must be configured with a valid Tolerance (get / set).
Scaling (get / set) defaults to NoScalingOnInequalityConstraint.
protected SegmentPropagatorInequalityConstraint(@Nonnull InequalityBoundType boundType, double boundValue, double tolerance)
Initializes a new instance. The weight defaults to 1.0.
Scaling (get / set) defaults to NoScalingOnConstraint.
boundType - Whether the boundValue represents a lower or an upper bound.boundValue - The lower or upper bound value that the function
will be driven to satisfy if it is not already satisfied.tolerance - How close the evaluated value must get to the
boundValue to consider this inequality constraint to be active and on the constraint manifold.protected SegmentPropagatorInequalityConstraint(@Nonnull InequalityBoundType boundType, ValueDefinition<Double> boundValue, double tolerance)
Initializes a new instance. The weight defaults to 1.0.
Scaling (get / set) defaults to NoScalingOnConstraint.
boundType - Whether the boundValue represents a lower or an upper bound.boundValue - The lower or upper bound value that the function
will be driven to satisfy if it is not already satisfied.tolerance - How close the evaluated value must get to the
boundValue to consider this inequality constraint to be active and on the constraint manifold.protected SegmentPropagatorInequalityConstraint(@Nonnull InequalityBoundType boundType, double boundValue, double tolerance, @Nonnull InequalityConstraintScaling scaling)
boundType - Whether the boundValue represents a lower or an upper bound.boundValue - The lower or upper bound value that the function
will be driven to satisfy if it is not already satisfied.tolerance - How close the evaluated value must get to the
boundValue to consider this inequality constraint to be active and on the constraint manifold.scaling - The type of scaling to be used on this constraint.protected SegmentPropagatorInequalityConstraint(@Nonnull InequalityBoundType boundType, ValueDefinition<Double> boundValue, double tolerance, @Nonnull InequalityConstraintScaling scaling, double weight)
boundType - Whether the boundValue represents a lower or an upper bound.boundValue - The lower or upper bound value that the function
will be driven to satisfy if it is not already satisfied.tolerance - How close the evaluated value must get to the
boundValue to consider this inequality constraint to be active and on the constraint manifold.scaling - The type of scaling to be used on this constraint.weight - The weight of this constraint compared to the cost function
and other constraints.protected SegmentPropagatorInequalityConstraint(@Nonnull SegmentPropagatorInequalityConstraint existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext) for more information about how to implement this constructor
in a derived class.
existingInstance - The existing instance to copy.context - A CopyContext that controls the depth of the copy.ArgumentNullException - Thrown when existingInstance or context is null.protected final boolean checkForSameDefinition(DefinitionalObject other)
true if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false for all derived-class instances.
Derived classes should check the type of other to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object).checkForSameDefinition in class DefinitionalObjectother - The other instance to compare to this one.true if the two objects are defined equivalently; otherwise false.protected abstract boolean checkForSameDefinition(SegmentPropagatorInequalityConstraint other)
true if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false for all derived-class instances.
Derived classes should check the type of other to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object).other - The other instance to compare to this one.true if the two objects are defined equivalently; otherwise false.protected int computeCurrentDefinitionHashCode()
SegmentPropagatorInequalityConstraint.checkForSameDefinition(agi.foundation.infrastructure.DefinitionalObject) method.computeCurrentDefinitionHashCode in class DefinitionalObjectpublic void enumerateDependencies(DependencyEnumerator enumerator)
DependencyEnumerator#enumerate(T) for each object that this object directly depends upon.
Derived classes which contain additional dependencies MUST override this method, call the base
implementation, and enumerate dependencies introduced by the derived class.enumerateDependencies in interface IEnumerateDependenciesenumerateDependencies in class DefinitionalObjectenumerator - The enumerator that is informed of the dependencies of this object.protected void freezeAggregatedObjects()
DefinitionalObject.freeze() to also freeze any objects that are considered to be a part of this object.
Derived classes which contain additional aggregated objects MUST override this method, call the base
implementation, and freeze aggregated objects introduced by the derived class. The objects that need to be
frozen in this method are frequently created in this object's constructor and are not settable via
properties.freezeAggregatedObjects in class DefinitionalObject@Nonnull public final InequalityBoundType getBoundType()
public final void setBoundType(@Nonnull InequalityBoundType value)
public final ValueDefinition<Double> getBoundValue()
evaluated value
will be compared to when solving for a particular trajectory. This value must not vary in time; consider
using a ParameterizedValueDefinition if you want to change this value at propagation time.public final void setBoundValue(ValueDefinition<Double> value)
evaluated value
will be compared to when solving for a particular trajectory. This value must not vary in time; consider
using a ParameterizedValueDefinition if you want to change this value at propagation time.public final InequalityConstraintSettings getSettings()
ParameterOptimizer
associated with this constraint.public final void setSettings(InequalityConstraintSettings value)
ParameterOptimizer
associated with this constraint.public final String getName()
public final void setName(String value)
@Nonnull public abstract SegmentPropagatorInequalityConstraintEvaluator getEvaluator(@Nonnull EvaluatorGroup group)
SegmentPropagatorInequalityConstraintEvaluator.
Derived classes should call SegmentPropagatorInequalityConstraint.validateProperties() to check properties
owned by this base class, as well as validate their own properties.
group - The EvaluatorGroup to use to create any necessary
evaluators for this constraint.constraint evaluator.protected void validateProperties()
SegmentPropagatorInequalityConstraint.getEvaluator(agi.foundation.EvaluatorGroup), as well as validate their own properties.