Class RescheduleValueChangeVisitor

    • Constructor Detail

      • RescheduleValueChangeVisitor

        public RescheduleValueChangeVisitor​(Resolver resolver)
        Creates a rescheduling value change visitor for a certain resolver instance.
        Parameters:
        resolver - the resolver instance
    • Method Detail

      • rescheduleValueChange

        void rescheduleValueChange​(IDecisionVariable varParent,
                                   IDecisionVariable variable,
                                   Value oldValue,
                                   boolean clear)
        Re-schedules a changed constraint value but only if rescheduling is needed.
        Parameters:
        varParent - the parent variable holding variable, if not nested use variable
        variable - the variable for which the value changed
        oldValue - the old value
        clear - whether constraints for holder shall be cleared
      • notifyUnresolved

        public void notifyUnresolved​(IDecisionVariable variable)
        Description copied from interface: IValueChangeListener
        Called if an assignment to the given variable failed as the defining expression cannot be evaluated, e.g., due to an undefined variable.
        Specified by:
        notifyUnresolved in interface IValueChangeListener
        Parameters:
        variable - the variable that the evaluator was about to modify
      • isValueTypeChange

        private boolean isValueTypeChange​(IDecisionVariable variable,
                                          Value newValue,
                                          Value oldValue)
        Returns whether a value change from oldValue to newValue on variable is a value type change.
        Parameters:
        variable - the variable
        newValue - the new value (in variable
        oldValue - the old value
        Returns:
        true for type change, false else
      • rescheduleConstraintsForParent

        private void rescheduleConstraintsForParent​(IDecisionVariable variable)
        Determines the constraints needed for the parents of variable.
        Parameters:
        variable - the variable to analyze
      • rescheduleConstraintsForChilds

        private void rescheduleConstraintsForChilds​(IDecisionVariable variable,
                                                    boolean decl)
        Determines the constraints needed for variable and its (transitive) child slots.
        Parameters:
        variable - the variable to analyze
        decl - reschedule on the declaration of variable or on variable itself