public class TspOrderConstraint extends java.lang.Object implements TspConstraint
| Constructor and Description |
|---|
TspOrderConstraint(int before, int after)
Creates a tsp order constraint.
|
| Modifier and Type | Method and 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.
|
public TspOrderConstraint(int before,
int after)
before - the original index of the tsp point that should be visited earlierafter - the original index of the tsp point that should be visited laterpublic boolean isSatisfied(TspAnalysisInfo tspAnalysisInfo)
ConstraintisSatisfied in interface Constraint<TspAnalysisInfo>tspAnalysisInfo - the analysis contextLODAnalysisInfopublic int[] getUserDataCategories()
TspConstraintgetUserDataCategories in interface TspConstraintpublic void reset()
TspConstraintreset in interface TspConstraintpublic void setNetworkAnalyst(NetworkAnalyst analyst)
TspConstraintsetNetworkAnalyst in interface TspConstraintpublic void setBefore(int before)
public int getBefore()
public void setAfter(int after)
public int getAfter()