Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)

B28401-02


oracle.spatial.network
Class SystemConstraint

java.lang.Object
  extended by oracle.spatial.network.SystemConstraint

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, NetworkConstraint

public class SystemConstraint
extends java.lang.Object
implements NetworkConstraint

This class defines the common network constraints for network analysis. It contains the must-avoid nodes and must-avoid links, the maximum cost, the maximun duration, the maximum distance, the maximum search depth (no of links in the path!), and a bounding MBR. This class implements NetworkConstraint interface.

See Also:
Serialized Form

Constructor Summary
SystemConstraint(Network network)
          Constructs an empty system constraint.
SystemConstraint(Network network, double maxCost)
          Constructs a network constraint with the maximum cost.
SystemConstraint(Network network, int[] mustAvoidNodes)
          Constructs a system constraint containing the must-avoid nodes .
SystemConstraint(Network network, int[] mustAvoidNodes, int[] mustAvoidLinks)
          Constructs a network constraint with the following constraints: the must-avoid nodes, and the must-avoid links.
SystemConstraint(Network network, java.util.Vector mustAvoidNodes)
          Constructs a network constraint with the must-avoid nodes.
SystemConstraint(Network network, java.util.Vector mustAvoidNodes, java.util.Vector mustAvoidLinks)
          Constructs a network constraint with the following constraint items: the must-avoid nodes and the must-avoid links.

 

Method Summary
 double getMaxCost()
          Returns the maximum cost constraint.
 int getMaxDepth()
          Returns the maximum depth constraint.
 double getMaxDistance()
          Returns the maximum distance constraint.
 double getMaxDuration()
           
 MBR getMaxMBR()
          Returns the maximum MBR constraint.
 java.util.Vector getMustAvoidLinks()
          Returns the must-avoid links as a Vector
 java.util.Vector getMustAvoidNodes()
          Returns the must-avoid nodes as a Vector
 Network getNetwork()
          Returns the network that contains the consatrint.
 boolean isSatisfied(AnalysisInfo info)
          Check if the system constraint is satisfied during the search.
 boolean maxCostExists()
          Checks if the maximum cost constraint exists.
 boolean maxDepthExists()
          Checks if the maximum path depth constraint exists.
 boolean maxDistanceExists()
          Checks if the maximum distance constraint exists.
 boolean maxDurationExists()
          Checks if the maximum duration constraint exists.
 boolean maxMBRExists()
          Checks if the maximum MBR constraint exists.
 boolean requiresPathLinks()
          Chceks if the constraint requires some or all path information.
 void setMaxCost(double maxCost)
          Sets the maximum cost constraint.
 void setMaxDepth(int maxDepth)
          Sets the maximum depth constraint.
 void setMaxDistance(double maxDist)
          Sets the maximum distance constraint.
 void setMaxDuration(double maxDuration)
           
 void setMaxMBR(MBR mbr)
          Sets the maximum MBR constraint.
 void setMustAvoidLinks(java.util.Vector links)
          Sets the must-avoid links.
 void setMustAvoidNodes(java.util.Vector nodes)
          Sets the must-avoid nodes.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

SystemConstraint

public SystemConstraint(Network network)
Constructs an empty system constraint.
Parameters:
network - the specified network

SystemConstraint

public SystemConstraint(Network network,
                        double maxCost)
Constructs a network constraint with the maximum cost.
Parameters:
network - the specified network
maxCost - the maximum cost

SystemConstraint

public SystemConstraint(Network network,
                        java.util.Vector mustAvoidNodes,
                        java.util.Vector mustAvoidLinks)
Constructs a network constraint with the following constraint items: the must-avoid nodes and the must-avoid links.
Parameters:
network - the specified network
mustAvoidNodes - the must-avoid nodes in a Vector
mustAvoidLinks - the must-avoid links in a Vector

SystemConstraint

public SystemConstraint(Network network,
                        java.util.Vector mustAvoidNodes)
Constructs a network constraint with the must-avoid nodes.
Parameters:
network - the specified network
mustAvoidNodes - the must-avoid nodes in a Vector

SystemConstraint

public SystemConstraint(Network network,
                        int[] mustAvoidNodes,
                        int[] mustAvoidLinks)
                 throws NetworkDataException
Constructs a network constraint with the following constraints: the must-avoid nodes, and the must-avoid links.
Parameters:
network - the specified network
mustAvoidNodes - the array of the must-avoid node IDs
mustAvoidLinks - the array of the must-avoid link IDs
Throws:
NetworkDataException

SystemConstraint

public SystemConstraint(Network network,
                        int[] mustAvoidNodes)
                 throws NetworkDataException
Constructs a system constraint containing the must-avoid nodes .
Parameters:
network - the specified network
mustAvoidNodes - the array of the must-avoid node IDs
Throws:
NetworkDataException

Method Detail

setMustAvoidNodes

public void setMustAvoidNodes(java.util.Vector nodes)
Sets the must-avoid nodes.
Parameters:
nodes - the must-avoid nodes as a Vector

setMustAvoidLinks

public void setMustAvoidLinks(java.util.Vector links)
Sets the must-avoid links.
Parameters:
links - the must-avoid links as a Vector

setMaxDepth

public void setMaxDepth(int maxDepth)
Sets the maximum depth constraint.
Parameters:
maxDepth - the maximum depth

setMaxCost

public void setMaxCost(double maxCost)
Sets the maximum cost constraint.
Parameters:
maxCost - the maximum cost

setMaxDistance

public void setMaxDistance(double maxDist)
Sets the maximum distance constraint.
Parameters:
maxDist - the maximum distance

setMaxMBR

public void setMaxMBR(MBR mbr)
Sets the maximum MBR constraint.
Parameters:
mbr - the MBR constraint

getNetwork

public Network getNetwork()
Returns the network that contains the consatrint.

getMustAvoidNodes

public java.util.Vector getMustAvoidNodes()
Returns the must-avoid nodes as a Vector

getMustAvoidLinks

public java.util.Vector getMustAvoidLinks()
Returns the must-avoid links as a Vector

maxCostExists

public boolean maxCostExists()
Checks if the maximum cost constraint exists.

maxDurationExists

public boolean maxDurationExists()
Checks if the maximum duration constraint exists.

maxDistanceExists

public boolean maxDistanceExists()
Checks if the maximum distance constraint exists.

maxMBRExists

public boolean maxMBRExists()
Checks if the maximum MBR constraint exists.

maxDepthExists

public boolean maxDepthExists()
Checks if the maximum path depth constraint exists.

getMaxCost

public double getMaxCost()
Returns the maximum cost constraint.

getMaxDistance

public double getMaxDistance()
Returns the maximum distance constraint.

getMaxMBR

public MBR getMaxMBR()
Returns the maximum MBR constraint.

getMaxDepth

public int getMaxDepth()
Returns the maximum depth constraint.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setMaxDuration

public void setMaxDuration(double maxDuration)

getMaxDuration

public double getMaxDuration()

requiresPathLinks

public boolean requiresPathLinks()
Chceks if the constraint requires some or all path information.
Specified by:
requiresPathLinks in interface NetworkConstraint

isSatisfied

public boolean isSatisfied(AnalysisInfo info)
Check if the system constraint is satisfied during the search.
Specified by:
isSatisfied in interface NetworkConstraint
Parameters:
info - the analysis information for the network constraint
See Also:
AnalysisInfo

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)

B28401-02


Copyright © 2007, 2008, Oracle. All Rights Reserved.