Interface VarHandler

  • All Known Implementing Classes:
    ArcCompanion, DomainStructure, MultiVarHandler

    public interface VarHandler
    Common interface to all objects that can handle one or more variables of the network flow constraint.
    Version:
    4.8
    • Method Detail

      • listVariables

        java.util.List<IntVar> listVariables()
        Returns:
        the list of variables handled by this handler
      • getPruningEvent

        int getPruningEvent​(Var variable)
        Retrieves the consistency pruning event of a handler variable that causes the handler to be reevaluated. For instance, X- and W-variables will listen to BOUND events while S-variables typically consider ANY events.
        Parameters:
        variable - a handler variable
        Returns:
        the pruning event which causes reevaluation of the handler
      • processEvent

        void processEvent​(IntVar variable,
                          MutableNetwork network)
        Informs the handler that one of its variable has changed and asks the handler to update the state of the network accordingly.
        Parameters:
        variable - the variable that changed
        network - the network