Class TspOrderConstraint

    • Constructor Summary

      Constructors 
      Constructor Description
      TspOrderConstraint​(int before, int after)
      Creates a tsp order constraint.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAfter()  
      int getBefore()  
      int[] getUserDataCategories()
      Returns the required user data categories.
      boolean isSatisfied​(TspAnalysisInfo tspAnalysisInfo)
      Checks if the constraint is satisfied.
      void reset()
      This method allows a stateful network constraint object to be reset to its original state and reused by network analysis functions.
      void setAfter​(int after)  
      void setBefore​(int before)  
      void setNetworkAnalyst​(NetworkAnalyst analyst)
      This method allows caller to pass the network analyst object to this constraint, so that the constraint can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TspOrderConstraint

        public TspOrderConstraint​(int before,
                                  int after)
        Creates a tsp order constraint.
        Parameters:
        before - the original index of the tsp point that should be visited earlier
        after - the original index of the tsp point that should be visited later
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: TspConstraint
        This method allows a stateful network constraint object to be reset to its original state and reused by network analysis functions.
        Specified by:
        reset in interface TspConstraint
      • setNetworkAnalyst

        public void setNetworkAnalyst​(NetworkAnalyst analyst)
        Description copied from interface: TspConstraint
        This method allows caller to pass the network analyst object to this constraint, so that the constraint can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst. If network analyst is not needed by the constraint, the link level selector can choose to do nothing with this method.
        Specified by:
        setNetworkAnalyst in interface TspConstraint
      • setBefore

        public void setBefore​(int before)
      • getBefore

        public int getBefore()
      • setAfter

        public void setAfter​(int after)
      • getAfter

        public int getAfter()