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)
Constraint
isSatisfied
in interface Constraint<TspAnalysisInfo>
tspAnalysisInfo
- the analysis contextLODAnalysisInfo
public int[] getUserDataCategories()
TspConstraint
getUserDataCategories
in interface TspConstraint
public void reset()
TspConstraint
reset
in interface TspConstraint
public void setNetworkAnalyst(NetworkAnalyst analyst)
TspConstraint
setNetworkAnalyst
in interface TspConstraint
public void setBefore(int before)
public int getBefore()
public void setAfter(int after)
public int getAfter()