class RescheduleValueChangeVisitor
extends net.ssehub.easy.varModel.model.values.ValueVisitorAdapter
implements net.ssehub.easy.varModel.cstEvaluation.IValueChangeListener
| Modifier and Type | Field and Description |
|---|---|
private boolean |
clear |
private static net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLogger |
LOGGER |
private net.ssehub.easy.varModel.model.values.Value |
oldValue |
private Resolver |
resolver |
private net.ssehub.easy.varModel.confModel.IDecisionVariable |
variable |
private net.ssehub.easy.varModel.confModel.IDecisionVariable |
varParent |
| Constructor and Description |
|---|
RescheduleValueChangeVisitor(Resolver resolver)
Creates a rescheduling value change visitor for a certain resolver instance.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
isValueTypeChange(net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
net.ssehub.easy.varModel.model.values.Value newValue,
net.ssehub.easy.varModel.model.values.Value oldValue)
Returns whether a value change from
oldValue to newValue on variable
is a value type change. |
void |
notifyChanged(net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
net.ssehub.easy.varModel.model.values.Value oldValue,
net.ssehub.easy.varModel.confModel.IAssignmentState oldState,
net.ssehub.easy.varModel.cstEvaluation.IValueChangeListener.ChangeKind kind) |
void |
notifyUnresolved(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) |
private void |
rescheduleConstraintsForChilds(net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
boolean decl)
Determines the constraints needed for
variable and its (transitive) child slots. |
private void |
rescheduleConstraintsForParent(net.ssehub.easy.varModel.confModel.IDecisionVariable variable)
Determines the constraints needed for the parents of
variable. |
(package private) void |
rescheduleValueChange(net.ssehub.easy.varModel.confModel.IDecisionVariable varParent,
net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
net.ssehub.easy.varModel.model.values.Value oldValue,
boolean clear)
Re-schedules a changed constraint value but only if rescheduling is needed.
|
void |
visitCompoundValue(net.ssehub.easy.varModel.model.values.CompoundValue newValue) |
void |
visitConstraintValue(net.ssehub.easy.varModel.model.values.ConstraintValue value) |
void |
visitContainerValue(net.ssehub.easy.varModel.model.values.ContainerValue newValue) |
private static final net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLogger LOGGER
private Resolver resolver
private boolean clear
private net.ssehub.easy.varModel.model.values.Value oldValue
private net.ssehub.easy.varModel.confModel.IDecisionVariable variable
private net.ssehub.easy.varModel.confModel.IDecisionVariable varParent
public RescheduleValueChangeVisitor(Resolver resolver)
resolver - the resolver instancepublic void visitConstraintValue(net.ssehub.easy.varModel.model.values.ConstraintValue value)
visitConstraintValue in interface net.ssehub.easy.varModel.model.values.IValueVisitorvisitConstraintValue in class net.ssehub.easy.varModel.model.values.ValueVisitorAdapterpublic void visitCompoundValue(net.ssehub.easy.varModel.model.values.CompoundValue newValue)
visitCompoundValue in interface net.ssehub.easy.varModel.model.values.IValueVisitorvisitCompoundValue in class net.ssehub.easy.varModel.model.values.ValueVisitorAdapterpublic void visitContainerValue(net.ssehub.easy.varModel.model.values.ContainerValue newValue)
visitContainerValue in interface net.ssehub.easy.varModel.model.values.IValueVisitorvisitContainerValue in class net.ssehub.easy.varModel.model.values.ValueVisitorAdaptervoid rescheduleValueChange(net.ssehub.easy.varModel.confModel.IDecisionVariable varParent,
net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
net.ssehub.easy.varModel.model.values.Value oldValue,
boolean clear)
varParent - the parent variable holding variable, if not nested use variablevariable - the variable for which the value changedoldValue - the old valueclear - whether constraints for holder shall be clearedpublic void notifyChanged(net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
net.ssehub.easy.varModel.model.values.Value oldValue,
net.ssehub.easy.varModel.confModel.IAssignmentState oldState,
net.ssehub.easy.varModel.cstEvaluation.IValueChangeListener.ChangeKind kind)
notifyChanged in interface net.ssehub.easy.varModel.cstEvaluation.IValueChangeListenerpublic void notifyUnresolved(net.ssehub.easy.varModel.confModel.IDecisionVariable variable)
notifyUnresolved in interface net.ssehub.easy.varModel.cstEvaluation.IValueChangeListenerprivate boolean isValueTypeChange(net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
net.ssehub.easy.varModel.model.values.Value newValue,
net.ssehub.easy.varModel.model.values.Value oldValue)
oldValue to newValue on variable
is a value type change.variable - the variablenewValue - the new value (in variableoldValue - the old valuetrue for type change, false elseprivate void rescheduleConstraintsForParent(net.ssehub.easy.varModel.confModel.IDecisionVariable variable)
variable.variable - the variable to analyzeprivate void rescheduleConstraintsForChilds(net.ssehub.easy.varModel.confModel.IDecisionVariable variable,
boolean decl)
variable and its (transitive) child slots.variable - the variable to analyzedecl - reschedule on the declaration of variable or on variable itselfCopyright © 2009 - 2018 SSE. All Rights Reserved.