CBPRS.Routing

City Based Parking and Routing System API Documentation

CBPRS.Routing Namespace

CBPRS.Routing contains the routing algorithms (Dijkstra and Distributed Hierarchical Ant-based control) used for the CBPRS.

Namespace hierarchy

Classes

Class | Description
AntLink | The ant link that contains the delay experienced over a certain road in the alpha or beta direction.
AntNode | Class representing an ant node.
AntRoute | Default ant route class.
AntRouteEntry | The entry for a specified route.
AntRoutingTable | The routing table that maintain an collection of AntRouteEntry objects.
AntVehicle | Simple vehicle that uses ant routing to reach its destination.
BackwardAnt | Backward ant
BackwardExploringAnt | Backward exploring ant updates routes between colonies.
Dijkstra | Dijkstra algorithm for an IIntersection based graph.
DijkstraNode | Dijkstra node for calculating shortest paths on a road network.
DijkstraRoutingTable | The routing table used for the Dijkstra algorithm.
DijkstraVehicle | Vehicle that uses the Dijkstra algorithm for routing.
ForwardAnt | Forward ant implementation
ForwardExploringAnt | Ant that discovers routes towards other colonies
NodeInfo | Structure contain information about a node and its delay.
RoutingSystem | Routing subsystem class

Interfaces

Interface | Description
IAnt | Basic ant interface.

Structures

Structure | Description
ColonyInfo | Colony encountering information.

Enumerations

Enumeration | Description
AntNodeTypes | The different types of Ant nodes available in the simulation.

(c) 2006 - 2007 J.L.Boehlé. All Rights Reserved.


AntLink Class

The ant link that contains the delay experienced over a certain road in the alpha or beta direction.

For a list of all members of this type, see AntLink Members.

System.Object
CBPRS.Routing.AntLink

public class AntLink

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

AntLink Members | CBPRS.Routing Namespace


AntLink Members

AntLink overview

Public Static Properties

Weight Gets or sets the weight associated with a new measurement.

Protected Static Fields

cWeight The weigh of the new measurement.

Public Instance Constructors

AntLink Constructor Default constructor

Public Instance Properties

Alpha | Gets or sets the predicted travel time for alpha lanes.
Beta | Gets or sets the predicted travel time for beta lanes.
Enabeld | Gets or sets a boolean indicating that if the link is enabled.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset | Resets the values for the link.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

_Alpha | The predicted travel time for alpha lanes.
_Beta | The predicted travel time for beta lanes.
_Enabeld | Boolean indicating if the link is enabled.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink Constructor

Default constructor

public AntLink(
float alpha,
float beta
);

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink Fields

The fields of the AntLink class are listed below. For a complete list of AntLink class members, see the AntLink Members topic.

Protected Static Fields

cWeight The weigh of the new measurement.

Protected Instance Fields

_Alpha | The predicted travel time for alpha lanes.
_Beta | The predicted travel time for beta lanes.
_Enabeld | Boolean indicating if the link is enabled.

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink._Alpha Field

The predicted travel time for alpha lanes.

protected float _Alpha;

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink._Beta Field

The predicted travel time for beta lanes.

protected float _Beta;

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink._Enabeld Field

Boolean indicating if the link is enabled.

protected bool _Enabeld;

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink.cWeight Field

The weigh of the new measurement.

protected static float cWeight;

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink Properties

The properties of the AntLink class are listed below. For a complete list of AntLink class members, see the AntLink Members topic.

Public Static Properties

Weight Gets or sets the weight associated with a new measurement.

Public Instance Properties

Alpha | Gets or sets the predicted travel time for alpha lanes.
Beta | Gets or sets the predicted travel time for beta lanes.
Enabeld | Gets or sets a boolean indicating that if the link is enabled.

See Also

AntLink Class | CBPRS.Routing Namespace


Alpha Property

City Based Parking and Routing System API Documentation

AntLink.Alpha Property

Gets or sets the predicted travel time for alpha lanes.

public float Alpha {get; set;}

Remarks

When setting the following function is applied: Ml = Ml + a * ( xl - Ml). Use reset to reset the value.

See Also

AntLink Class | CBPRS.Routing Namespace


Beta Property

City Based Parking and Routing System API Documentation

AntLink.Beta Property

Gets or sets the predicted travel time for beta lanes.

public float Beta {get; set;}

Remarks

When setting the following function is applied: Ml = Ml + a * ( xl - Ml). Use reset to reset the value.

See Also

AntLink Class | CBPRS.Routing Namespace


Enabeld Property

City Based Parking and Routing System API Documentation

AntLink.Enabeld Property

Gets or sets a boolean indicating that if the link is enabled.

public bool Enabeld {get; set;}

See Also

AntLink Class | CBPRS.Routing Namespace


Weight Property

City Based Parking and Routing System API Documentation

AntLink.Weight Property

Gets or sets the weight associated with a new measurement.

public static float Weight {get; set;}

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink Methods

The methods of the AntLink class are listed below. For a complete list of AntLink class members, see the AntLink Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset | Resets the values for the link.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AntLink Class | CBPRS.Routing Namespace


AntLink.Reset Method

Resets the values for the link.

public void Reset(
float alpha,
float beta
);

Parameters

alpha
The travel time for the alpha links.
beta
The travel time for the beta links.

See Also

AntLink Class | CBPRS.Routing Namespace


AntNode Class

Class representing an ant node.

For a list of all members of this type, see AntNode Members.

System.Object
CBPRS.Routing.AntNode

public class AntNode : ISimObject

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

AntNode Members | CBPRS.Routing Namespace


AntNode Members

AntNode overview

Public Static Fields

sA | The oscillation dampening factor.
sBackwardAnts | The number of backward ants currently in the simulation.
sBackwardExploringAnt | The number of backward exploring ants in the simulation.
sC | The scaling factor of the probability reinforcement.
sEta | The eta value used when calculating the new average delay value.
sExploringProbability | The likelihood that a routing ant node will generate an exploring ant instead of a forward ant.
sForwardAnts | The number of forward ants currently in the simulation.
sForwardExploringAnt | The number of forward exploring ants in the simulation.
sSameColonyProbability | The likelihood that a normal ant node will generate a forward ant with a destination within the current colony.

Protected Static Fields

cMaxProbabilitiesPerDest | The maximum number of probabilities per destination.
cNoDestinationNodeId | The identifier when no destination node id is present.
cNoNextNodeIdOnRouteFound | The identifier when no next node id for the requested route is found.
cNoPreviousNodeId | The identifier when no previous node id is present.

Public Instance Constructors

AntNode Constructor Default constructor

Public Instance Properties

Colonies | Gets the number of colonies this node is member of.
Id | Gets or sets the nodes Id.
NodeType | Gets or sets the node type.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GenerateAnts | Generates ants that are send out by this node to discover routes.
GetColonies | Creates a array containing the id's of the colonies this node belongs to.
GetColoniesTable | Gets the colonies table used by this node.
GetColonyTable | Gets the colony table for this node.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNeighbourIndex | Gets the index of the neighbor in order to locate the correct probability.
GetNeighbourPosition | Returns the position at which the neighbor is connected.
GetNeighbours | Gets the list of neighbours for the current node.
GetNextNodeOnRoute | Retrieves the next node on the route towards the destination node.
GetRandomNeighbour | Gets a randomly chosen neighbor.
GetRandomValidNeighbor | Gets a randomly chosen neighbor out of the collection of valid neighbors associated with this node.
GetType (inherited from Object) | Gets the Type of the current instance.
Intitialize | Initializes the ant node.
IsMemberOfColony | Determines if the node is member of the specified colony.
IsNeighbor | Determines if the specified id is a neighbor of the current node.
ProcessAnts | Process the ants in the waiting in the ant queue.
RecieveAnt | Enqueues the ant for processing.
RegisterColony | Registers a colony with the current node.
Reset | Resets the node
ToString (inherited from Object) | Returns a String that represents the current Object.
UnregisterColony | Unregisters a colony with the current node.

Protected Instance Fields

_AntQueue | The queue containing the ants to be processed.
_ColoniesTable | Routing table for routing between colonies.
_ColonyTables | Routing Tables for routing in the colonies.
_Id | The id of the current node.
_NeighbourNodes | The collection of neighbor nodes and the position at which they are connected.
_NodeType | The type of the current ant node.
_ValidDirections | Bit array containing the turns vehicles can make at an intersection.

Protected Instance Methods

FillRoutingTables | Fills the routing tables for the current node.
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GenerateNormalNodeAnts | Generates ants for normal nodes.
GenerateRoutingNodeAnts | Generates ants for routing nodes.
GetAntLinkDelay | Retrieves the delay of the piece of road leading from the source node to the destination node.
GetNextAlternativeNextNode |
GetNextNode | Retrieves the best possible next node on the basis of the previous node and the specified entry.
IsDirectionValid | Determines if a vehicle coming form the fromNodeId can turn onto the ToNodeId.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ProcessBackwardAnt | Processes backward ants.
ProcessBackwardExploringAnt | Processes backward exploring ants.
ProcessForwardAnt | Processes forward ants.
ProcessForwardExploringAnt | Processes exploring ants.
SetValidDirection | Flags a specified direction as valid.
SetValidDirections | Creates a bitmask containing the valid directions over the intersection.
UpdateProbabilities | Updates the probabilities for the currently selected routing entry.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode Constructor

Default constructor

public AntNode(
int id
);

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode Fields

The fields of the AntNode class are listed below. For a complete list of AntNode class members, see the AntNode Members topic.

Public Static Fields

sA | The oscillation dampening factor.
sBackwardAnts | The number of backward ants currently in the simulation.
sBackwardExploringAnt | The number of backward exploring ants in the simulation.
sC | The scaling factor of the probability reinforcement.
sEta | The eta value used when calculating the new average delay value.
sExploringProbability | The likelihood that a routing ant node will generate an exploring ant instead of a forward ant.
sForwardAnts | The number of forward ants currently in the simulation.
sForwardExploringAnt | The number of forward exploring ants in the simulation.
sSameColonyProbability | The likelihood that a normal ant node will generate a forward ant with a destination within the current colony.

Protected Static Fields

cMaxProbabilitiesPerDest | The maximum number of probabilities per destination.
cNoDestinationNodeId | The identifier when no destination node id is present.
cNoNextNodeIdOnRouteFound | The identifier when no next node id for the requested route is found.
cNoPreviousNodeId | The identifier when no previous node id is present.

Protected Instance Fields

_AntQueue | The queue containing the ants to be processed.
_ColoniesTable | Routing table for routing between colonies.
_ColonyTables | Routing Tables for routing in the colonies.
_Id | The id of the current node.
_NeighbourNodes | The collection of neighbor nodes and the position at which they are connected.
_NodeType | The type of the current ant node.
_ValidDirections | Bit array containing the turns vehicles can make at an intersection.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode._AntQueue Field

The queue containing the ants to be processed.

protected 0, Culture=neutral, PublicKeyToken=null]] _AntQueue;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode._ColoniesTable Field

Routing table for routing between colonies.

protected AntRoutingTable _ColoniesTable;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode._ColonyTables Field

Routing Tables for routing in the colonies.

protected 0, Culture=neutral, PublicKeyToken=null]] _ColonyTables;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode._Id Field

The id of the current node.

protected int _Id;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode._NeighbourNodes Field

The collection of neighbor nodes and the position at which they are connected.

protected 0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] _NeighbourNodes;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode._NodeType Field

The type of the current ant node.

protected AntNodeTypes _NodeType;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode._ValidDirections Field

Bit array containing the turns vehicles can make at an intersection.

protected short _ValidDirections;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.cMaxProbabilitiesPerDest Field

The maximum number of probabilities per destination.

protected const int cMaxProbabilitiesPerDest = 4;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.cNoDestinationNodeId Field

The identifier when no destination node id is present.

protected const int cNoDestinationNodeId = -1;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.cNoNextNodeIdOnRouteFound Field

The identifier when no next node id for the requested route is found.

protected const int cNoNextNodeIdOnRouteFound = -1;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.cNoPreviousNodeId Field

The identifier when no previous node id is present.

protected const int cNoPreviousNodeId = -1;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sA Field

The oscillation dampening factor.

public static float sA;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sBackwardAnts Field

The number of backward ants currently in the simulation.

public static int sBackwardAnts;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sBackwardExploringAnt Field

The number of backward exploring ants in the simulation.

public static int sBackwardExploringAnt;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sC Field

The scaling factor of the probability reinforcement.

public static float sC;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sEta Field

The eta value used when calculating the new average delay value.

public static float sEta;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sExploringProbability Field

The likelihood that a routing ant node will generate an exploring ant instead of a forward ant.

public static float sExploringProbability;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sForwardAnts Field

The number of forward ants currently in the simulation.

public static int sForwardAnts;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sForwardExploringAnt Field

The number of forward exploring ants in the simulation.

public static int sForwardExploringAnt;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.sSameColonyProbability Field

The likelihood that a normal ant node will generate a forward ant with a destination within the current colony.

public static float sSameColonyProbability;

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode Properties

The properties of the AntNode class are listed below. For a complete list of AntNode class members, see the AntNode Members topic.

Public Instance Properties

Colonies | Gets the number of colonies this node is member of.
Id | Gets or sets the nodes Id.
NodeType | Gets or sets the node type.

See Also

AntNode Class | CBPRS.Routing Namespace


Colonies Property

City Based Parking and Routing System API Documentation

AntNode.Colonies Property

Gets the number of colonies this node is member of.

public int Colonies {get;}

See Also

AntNode Class | CBPRS.Routing Namespace


Id Property

City Based Parking and Routing System API Documentation

AntNode.Id Property

Gets or sets the nodes Id.

public int Id {get; set;}

Implements

ISimObject.Id

See Also

AntNode Class | CBPRS.Routing Namespace


NodeType Property

City Based Parking and Routing System API Documentation

AntNode.NodeType Property

Gets or sets the node type.

public AntNodeTypes NodeType {get; set;}

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode Methods

The methods of the AntNode class are listed below. For a complete list of AntNode class members, see the AntNode Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GenerateAnts | Generates ants that are send out by this node to discover routes.
GetColonies | Creates a array containing the id's of the colonies this node belongs to.
GetColoniesTable | Gets the colonies table used by this node.
GetColonyTable | Gets the colony table for this node.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNeighbourIndex | Gets the index of the neighbor in order to locate the correct probability.
GetNeighbourPosition | Returns the position at which the neighbor is connected.
GetNeighbours | Gets the list of neighbours for the current node.
GetNextNodeOnRoute | Retrieves the next node on the route towards the destination node.
GetRandomNeighbour | Gets a randomly chosen neighbor.
GetRandomValidNeighbor | Gets a randomly chosen neighbor out of the collection of valid neighbors associated with this node.
GetType (inherited from Object) | Gets the Type of the current instance.
Intitialize | Initializes the ant node.
IsMemberOfColony | Determines if the node is member of the specified colony.
IsNeighbor | Determines if the specified id is a neighbor of the current node.
ProcessAnts | Process the ants in the waiting in the ant queue.
RecieveAnt | Enqueues the ant for processing.
RegisterColony | Registers a colony with the current node.
Reset | Resets the node
ToString (inherited from Object) | Returns a String that represents the current Object.
UnregisterColony | Unregisters a colony with the current node.

Protected Instance Methods

FillRoutingTables | Fills the routing tables for the current node.
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GenerateNormalNodeAnts | Generates ants for normal nodes.
GenerateRoutingNodeAnts | Generates ants for routing nodes.
GetAntLinkDelay | Retrieves the delay of the piece of road leading from the source node to the destination node.
GetNextAlternativeNextNode |
GetNextNode | Retrieves the best possible next node on the basis of the previous node and the specified entry.
IsDirectionValid | Determines if a vehicle coming form the fromNodeId can turn onto the ToNodeId.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ProcessBackwardAnt | Processes backward ants.
ProcessBackwardExploringAnt | Processes backward exploring ants.
ProcessForwardAnt | Processes forward ants.
ProcessForwardExploringAnt | Processes exploring ants.
SetValidDirection | Flags a specified direction as valid.
SetValidDirections | Creates a bitmask containing the valid directions over the intersection.
UpdateProbabilities | Updates the probabilities for the currently selected routing entry.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.FillRoutingTables Method

Fills the routing tables for the current node.

protected void FillRoutingTables();

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GenerateAnts Method

Generates ants that are send out by this node to discover routes.

public void GenerateAnts();

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GenerateNormalNodeAnts Method

Generates ants for normal nodes.

protected void GenerateNormalNodeAnts();

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GenerateRoutingNodeAnts Method

Generates ants for routing nodes.

protected void GenerateRoutingNodeAnts();

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetAntLinkDelay Method

Retrieves the delay of the piece of road leading from the source node to the destination node.

protected float GetAntLinkDelay(
int SourceNodeId,
int DestinationNodeId
);

Parameters

SourceNodeId
The id of the intersection at which the road originates.
DestinationNodeId
The id of the intersection at which the road ends.

Return Value

The average delay in simulation steps required to cover the distance of the road.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetColonies Method

Creates a array containing the id's of the colonies this node belongs to.

public int[] GetColonies();

Return Value

Array of colony id's to which this node belongs.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetColoniesTable Method

Gets the colonies table used by this node.

public AntRoutingTable GetColoniesTable();

Return Value

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetColonyTable Method

Gets the colony table for this node.

public AntRoutingTable GetColonyTable(
int ColonyId
);

Parameters

ColonyId
The id of the colony.

Return Value

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetNeighbourIndex Method

Gets the index of the neighbor in order to locate the correct probability.

public int GetNeighbourIndex(
int NeighborId
);

Parameters

NeighborId
A valid neighbor id for the current node.

Return Value

The index of the neighbor.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetNeighbourPosition Method

Returns the position at which the neighbor is connected.

public RoadPosition GetNeighbourPosition(
int NeighborId
);

Parameters

NeighborId
The id of the neighbor node.

Return Value

The Roadposition of the neighbour node.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetNeighbours Method

Gets the list of neighbours for the current node.

public int[] GetNeighbours();

Return Value

The list of neighbours for the current node.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetNextAlternativeNextNode Method

protected int GetNextAlternativeNextNode(
int destinationColonyId,
int destinationNodeId,
int previousNodeId
);

Parameters

destinationColonyId
The id of the destination colony.
destinationNodeId
The id of the destination node.
previousNodeId
The previous node encountered on the route.

Return Value

The Id of the next node on the route towards the destination.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetNextNode Method

Retrieves the best possible next node on the basis of the previous node and the specified entry.

protected int GetNextNode(
AntRouteEntry entry,
int previousNodeId
);

Parameters

entry
The AntRouteEntry for the destination.
previousNodeId
The previous node encountered on the route.

Return Value

The next node on the route towards the destination.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetNextNodeOnRoute Method

Retrieves the next node on the route towards the destination node.

public int GetNextNodeOnRoute(
int destinationColonyId,
int destinationNodeId,
int previousNodeId
);

Parameters

destinationColonyId
The id of the destination colony.
destinationNodeId
The id of the destination node.
previousNodeId
The previous node encountered on the route.

Return Value

The Id of the next node on the route towards the destination.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetRandomNeighbour Method

Gets a randomly chosen neighbor.

public int GetRandomNeighbour();

Return Value

The Id of a randomly chosen neighbor of the current node.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.GetRandomValidNeighbor Method

Gets a randomly chosen neighbor out of the collection of valid neighbors associated with this node.

public int GetRandomValidNeighbor(
int destinationColonyId,
int destinationNodeId,
int previousNodeId
);

Parameters

destinationColonyId
The id of the destination colony.
destinationNodeId
The id of the destination node.
previousNodeId
The previous node encountered on the route.

Return Value

A randomly chosen neighbor that is a valid destination an has a probability of cMinimumProbability or higher.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.Intitialize Method

Initializes the ant node.

public void Intitialize();

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.IsDirectionValid Method

Determines if a vehicle coming form the fromNodeId can turn onto the ToNodeId.

protected bool IsDirectionValid(
int fromNodeId,
int ToNodeId
);

Parameters

fromNodeId
The id of the intersection from which the vehicle is heading toward the current.
ToNodeId
The id of the intersection to which the vehicle wants to be heading after passing this one.

Return Value

True if the proposed direction is valid; Otherwise, false.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.IsMemberOfColony Method

Determines if the node is member of the specified colony.

public bool IsMemberOfColony(
int colonyId
);

Parameters

colonyId
The colony id to test for membership.

Return Value

True if the node is a member of the colony; Otherwise, false.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.IsNeighbor Method

Determines if the specified id is a neighbor of the current node.

public bool IsNeighbor(
int neighborId
);

Parameters

neighborId
The neighbor id to test.

Return Value

True if the id belongs to a direct neighbor node; Otherwise, false.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.ProcessAnts Method

Process the ants in the waiting in the ant queue.

public void ProcessAnts();

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.ProcessBackwardAnt Method

Processes backward ants.

protected void ProcessBackwardAnt(
BackwardAnt Bant
);

Parameters

Bant
An backward ant to process.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.ProcessBackwardExploringAnt Method

Processes backward exploring ants.

protected void ProcessBackwardExploringAnt(
BackwardExploringAnt BEant
);

Parameters

BEant
An backward exploring ant to process.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.ProcessForwardAnt Method

Processes forward ants.

protected void ProcessForwardAnt(
ForwardAnt Fant
);

Parameters

Fant
An forward ant to process.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.ProcessForwardExploringAnt Method

Processes exploring ants.

protected void ProcessForwardExploringAnt(
ForwardExploringAnt FEant
);

Parameters

FEant
An forward Exploring ant to process.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.RecieveAnt Method

Enqueues the ant for processing.

public void RecieveAnt(
IAnt incommingAnt
);

Parameters

incommingAnt
Object of the type IAnt.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.RegisterColony Method

Registers a colony with the current node.

public void RegisterColony(
int colonyId
);

Parameters

colonyId
The id of the colony to register.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.Reset Method

Resets the node

public void Reset();

Implements

ISimObject.Reset

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.SetValidDirection Method

Flags a specified direction as valid.

protected void SetValidDirection(
int fromNodeId,
int ToNodeId
);

Parameters

fromNodeId
The id of the intersection from which the vehicle is heading toward the current.
ToNodeId
The id of the intersection to which the vehicle wants to be heading after passing this one.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.SetValidDirections Method

Creates a bitmask containing the valid directions over the intersection.

protected void SetValidDirections();

Remarks

The bitmask is stored in format below with {Top,Right,Bottom,Left} being connection positions. T R B L TRBL | TRBL | TRBL | TRBL 0101 | 1011 | 0101 | 0110 0 means route is invalid; 1 means route is valid.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.UnregisterColony Method

Unregisters a colony with the current node.

public bool UnregisterColony(
int colonyId
);

Parameters

colonyId
The id of the colony to unregister.

Return Value

True if the colony was sucessfully unregistered; otherwise false.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNode.UpdateProbabilities Method

Updates the probabilities for the currently selected routing entry.

protected virtual void UpdateProbabilities(
AntRouteEntry Entry,
int NextNodeId,
int PreviousNodeId,
float Delay
);

Parameters

Entry
The routing Entry for the selected destination.
NextNodeId
The previous node id on the route.
PreviousNodeId
The previous node in on the route if present; Otherwise, cNoPreviousNodeId.
Delay
The delay incurred on the route between the destination and the current node.

See Also

AntNode Class | CBPRS.Routing Namespace


AntNodeTypes Enumeration

The different types of Ant nodes available in the simulation.

public enum AntNodeTypes

Members

Member Name | Description
Normal | Ant node that lies within a sector.
Routing | Ant node that lies on the boundary of one or more sectors.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

CBPRS.Routing Namespace


AntRoute Class

Default ant route class.

For a list of all members of this type, see AntRoute Members.

System.Object
CBPRS.Infrastructure.Route
CBPRS.Routing.AntRoute

public class AntRoute : Route

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

AntRoute Members | CBPRS.Routing Namespace


AntRoute Members

AntRoute overview

Public Instance Constructors

AntRoute Constructor Default constructor

Public Instance Properties

CurrentSector | Gets or sets the current sector.
Destination (inherited from CBPRS.Infrastructure.Route) |
DestinationSector | Gets or sets the destination sector.
Direction (inherited from CBPRS.Infrastructure.Route) |
HasSideObject (inherited from CBPRS.Infrastructure.Route) |
LeftTurn (inherited from CBPRS.Infrastructure.Route) |
Next (inherited from CBPRS.Infrastructure.Route) |
Previous | Gets or sets the previous lane.
RightTurn (inherited from CBPRS.Infrastructure.Route) |
SideObject (inherited from CBPRS.Infrastructure.Route) |
Source (inherited from CBPRS.Infrastructure.Route) |
StartTime (inherited from CBPRS.Infrastructure.Route) |
TraveledLanes (inherited from CBPRS.Infrastructure.Route) |
TravelTime (inherited from CBPRS.Infrastructure.Route) |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

_CurrentSector | The sector in which the vehicle currently is.
_Destination (inherited from CBPRS.Infrastructure.Route) |
_DestinationSector | The sector in which the destination intersection lies.
_Direction (inherited from CBPRS.Infrastructure.Route) |
_LeftTurns (inherited from CBPRS.Infrastructure.Route) |
_Next (inherited from CBPRS.Infrastructure.Route) |
_Previous | The previous lane on the route.
_RightTurns (inherited from CBPRS.Infrastructure.Route) |
_SideObject (inherited from CBPRS.Infrastructure.Route) |
_Source (inherited from CBPRS.Infrastructure.Route) |
_StartTime (inherited from CBPRS.Infrastructure.Route) |
_TraveledLanes (inherited from CBPRS.Infrastructure.Route) |
_TravelTime (inherited from CBPRS.Infrastructure.Route) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AntRoute Class | CBPRS.Routing Namespace


AntRoute Constructor

Default constructor

public AntRoute();

See Also

AntRoute Class | CBPRS.Routing Namespace


AntRoute Fields

The fields of the AntRoute class are listed below. For a complete list of AntRoute class members, see the AntRoute Members topic.

Protected Instance Fields

_CurrentSector | The sector in which the vehicle currently is.
_Destination (inherited from CBPRS.Infrastructure.Route) |
_DestinationSector | The sector in which the destination intersection lies.
_Direction (inherited from CBPRS.Infrastructure.Route) |
_LeftTurns (inherited from CBPRS.Infrastructure.Route) |
_Next (inherited from CBPRS.Infrastructure.Route) |
_Previous | The previous lane on the route.
_RightTurns (inherited from CBPRS.Infrastructure.Route) |
_SideObject (inherited from CBPRS.Infrastructure.Route) |
_Source (inherited from CBPRS.Infrastructure.Route) |
_StartTime (inherited from CBPRS.Infrastructure.Route) |
_TraveledLanes (inherited from CBPRS.Infrastructure.Route) |
_TravelTime (inherited from CBPRS.Infrastructure.Route) |

See Also

AntRoute Class | CBPRS.Routing Namespace


AntRoute._CurrentSector Field

The sector in which the vehicle currently is.

protected int _CurrentSector;

See Also

AntRoute Class | CBPRS.Routing Namespace


AntRoute._DestinationSector Field

The sector in which the destination intersection lies.

protected int _DestinationSector;

See Also

AntRoute Class | CBPRS.Routing Namespace


AntRoute._Previous Field

The previous lane on the route.

protected ILane _Previous;

See Also

AntRoute Class | CBPRS.Routing Namespace


AntRoute Properties

The properties of the AntRoute class are listed below. For a complete list of AntRoute class members, see the AntRoute Members topic.

Public Instance Properties

CurrentSector | Gets or sets the current sector.
Destination (inherited from CBPRS.Infrastructure.Route) |
DestinationSector | Gets or sets the destination sector.
Direction (inherited from CBPRS.Infrastructure.Route) |
HasSideObject (inherited from CBPRS.Infrastructure.Route) |
LeftTurn (inherited from CBPRS.Infrastructure.Route) |
Next (inherited from CBPRS.Infrastructure.Route) |
Previous | Gets or sets the previous lane.
RightTurn (inherited from CBPRS.Infrastructure.Route) |
SideObject (inherited from CBPRS.Infrastructure.Route) |
Source (inherited from CBPRS.Infrastructure.Route) |
StartTime (inherited from CBPRS.Infrastructure.Route) |
TraveledLanes (inherited from CBPRS.Infrastructure.Route) |
TravelTime (inherited from CBPRS.Infrastructure.Route) |

See Also

AntRoute Class | CBPRS.Routing Namespace


CurrentSector Property

City Based Parking and Routing System API Documentation

AntRoute.CurrentSector Property

Gets or sets the current sector.

public int CurrentSector {get; set;}

See Also

AntRoute Class | CBPRS.Routing Namespace


DestinationSector Property

City Based Parking and Routing System API Documentation

AntRoute.DestinationSector Property

Gets or sets the destination sector.

public int DestinationSector {get; set;}

See Also

AntRoute Class | CBPRS.Routing Namespace


Previous Property

City Based Parking and Routing System API Documentation

AntRoute.Previous Property

Gets or sets the previous lane.

public CBPRS.Infrastructure.ILane Previous {get; set;}

See Also

AntRoute Class | CBPRS.Routing Namespace


AntRouteEntry Class

The entry for a specified route.

For a list of all members of this type, see AntRouteEntry Members.

System.Object
CBPRS.Routing.AntRouteEntry

public class AntRouteEntry

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

AntRouteEntry Members | CBPRS.Routing Namespace


AntRouteEntry Members

AntRouteEntry overview

Public Static Fields

cDisabeldProbability | Signals there is no probability for the route.
cMinimumProbability | Lower limit for a active route.

Public Instance Constructors

AntRouteEntry Constructor Initializes a new instance of the AntRouteEntry class.

Public Instance Fields

AverageDelay | The average delay for the current route.
Probabilities | The probabilities for the current destination.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Normalize | Normalizes the all probabilities in the range [0.05f,1.0f] without altering disabled probabilities.
Sum | Calculates the sum of the probabilities.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry Constructor

Initializes a new instance of the AntRouteEntry class.

public AntRouteEntry();

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry Fields

The fields of the AntRouteEntry class are listed below. For a complete list of AntRouteEntry class members, see the AntRouteEntry Members topic.

Public Static Fields

cDisabeldProbability | Signals there is no probability for the route.
cMinimumProbability | Lower limit for a active route.

Public Instance Fields

AverageDelay | The average delay for the current route.
Probabilities | The probabilities for the current destination.

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry.AverageDelay Field

The average delay for the current route.

public float AverageDelay;

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry.cDisabeldProbability Field

Signals there is no probability for the route.

public const float cDisabeldProbability = 0;

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry.cMinimumProbability Field

Lower limit for a active route.

public const float cMinimumProbability = 0,05;

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry.Probabilities Field

The probabilities for the current destination.

public float[] Probabilities;

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry Methods

The methods of the AntRouteEntry class are listed below. For a complete list of AntRouteEntry class members, see the AntRouteEntry Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Normalize | Normalizes the all probabilities in the range [0.05f,1.0f] without altering disabled probabilities.
Sum | Calculates the sum of the probabilities.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry.Normalize Method

Normalizes the all probabilities in the range [0.05f,1.0f] without altering disabled probabilities.

public void Normalize();

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRouteEntry.Sum Method

Calculates the sum of the probabilities.

public float Sum();

Return Value

The sum of the probabilities.

See Also

AntRouteEntry Class | CBPRS.Routing Namespace


AntRoutingTable Class

The routing table that maintain an collection of AntRouteEntry objects.

For a list of all members of this type, see AntRoutingTable Members.

System.Object
CBPRS.Routing.AntRoutingTable

public class AntRoutingTable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

AntRoutingTable Members | CBPRS.Routing Namespace


AntRoutingTable Members

AntRoutingTable overview

Public Instance Constructors

AntRoutingTable Constructor Constructor.

Public Instance Properties

GetRouteCount Gets the number of routes in the table.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDestinations | Gets the set of destinations registered with the current routing table.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetRouteEntry | Gets the route entry for the specified destinationId.
GetType (inherited from Object) | Gets the Type of the current instance.
IsValidDestination | Determines whether the specified destinationId represents a valid destination.
RegisterRoute | Registers a route in the route table.
ToString (inherited from Object) | Returns a String that represents the current Object.
UnregisterRoute | Unregisters a route from the routing table.

Protected Instance Fields

_Routes Dictionary containing the probabilities for the routes.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable Constructor

Constructor.

public AntRoutingTable();

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable Fields

The fields of the AntRoutingTable class are listed below. For a complete list of AntRoutingTable class members, see the AntRoutingTable Members topic.

Protected Instance Fields

_Routes Dictionary containing the probabilities for the routes.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable._Routes Field

Dictionary containing the probabilities for the routes.

protected 0, Culture=neutral, PublicKeyToken=null]] _Routes;

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable Properties

The properties of the AntRoutingTable class are listed below. For a complete list of AntRoutingTable class members, see the AntRoutingTable Members topic.

Public Instance Properties

GetRouteCount Gets the number of routes in the table.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


GetRouteCount Property

City Based Parking and Routing System API Documentation

AntRoutingTable.GetRouteCount Property

Gets the number of routes in the table.

public int GetRouteCount {get;}

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable Methods

The methods of the AntRoutingTable class are listed below. For a complete list of AntRoutingTable class members, see the AntRoutingTable Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDestinations | Gets the set of destinations registered with the current routing table.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetRouteEntry | Gets the route entry for the specified destinationId.
GetType (inherited from Object) | Gets the Type of the current instance.
IsValidDestination | Determines whether the specified destinationId represents a valid destination.
RegisterRoute | Registers a route in the route table.
ToString (inherited from Object) | Returns a String that represents the current Object.
UnregisterRoute | Unregisters a route from the routing table.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable.GetDestinations Method

Gets the set of destinations registered with the current routing table.

public int[] GetDestinations();

Return Value

An array of integers containing the registered destination id's.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable.GetRouteEntry Method

Gets the route entry for the specified destinationId.

public AntRouteEntry GetRouteEntry(
int destinationId
);

Parameters

destinationId
The id of the destination for which to retrieve the route entry.

Return Value

The route entry of the specified destinationId.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable.IsValidDestination Method

Determines whether the specified destinationId represents a valid destination.

public bool IsValidDestination(
int destinationId
);

Parameters

destinationId
The destination Id to test.

Return Value

True if the destination is present in the routing table; Otherwise, false.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable.RegisterRoute Method

Registers a route in the route table.

public void RegisterRoute(
int destinationId,
AntRouteEntry routeEntry
);

Parameters

destinationId
The id of the destination node / colony.
routeEntry
The AntRouteEntry associated with the route.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntRoutingTable.UnregisterRoute Method

Unregisters a route from the routing table.

public bool UnregisterRoute(
int destinationId
);

Parameters

destinationId
The destination id of the route to remove.

Return Value

True if the route was sucessfully removed; Otherwise, false.

See Also

AntRoutingTable Class | CBPRS.Routing Namespace


AntVehicle Class

Simple vehicle that uses ant routing to reach its destination.

For a list of all members of this type, see AntVehicle Members.

System.Object
CBPRS.Infrastructure.Vehicle
CBPRS.Routing.AntVehicle

public class AntVehicle : Vehicle

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

AntVehicle Members | CBPRS.Routing Namespace


AntVehicle Members

AntVehicle overview

Public Static Methods

Create The vehicle creation factory method.

Public Instance Properties

Behind (inherited from CBPRS.Infrastructure.Vehicle) |
Color | Gets the color of the vehicle
Id (inherited from CBPRS.Infrastructure.Vehicle) |
IsBraking (inherited from CBPRS.Infrastructure.Vehicle) |
Lane (inherited from CBPRS.Infrastructure.Vehicle) |
Length | Gets the length of the vehicle in blocks.
MaxSpeed | Gets the maximum speed of the vehicle in blocks per step.
MustChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
Position (inherited from CBPRS.Infrastructure.Vehicle) |
Route (inherited from CBPRS.Infrastructure.Vehicle) |
Speed (inherited from CBPRS.Infrastructure.Vehicle) |
TurnIndicator (inherited from CBPRS.Infrastructure.Vehicle) |
UpdateRoutingSystem | Gets or sets a boolean value indicating that the vehicle should update the routing system with delay information.

Public Instance Methods

BackwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeTo (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToLeft (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToRight (inherited from CBPRS.Infrastructure.Vehicle) |
CriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
ForwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IntializeRoute | Initialize the routing for the current vehicle.
Move (inherited from CBPRS.Infrastructure.Vehicle) |
PreCriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Reset (inherited from CBPRS.Infrastructure.Vehicle) |
ResolveLaneChangeDeadLock (inherited from CBPRS.Infrastructure.Vehicle) |
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateRoute | Updates the current route.

Protected Instance Constructors

AntVehicle Constructor Default constructor

Protected Instance Fields

_Braking (inherited from CBPRS.Infrastructure.Vehicle) |
_Id (inherited from CBPRS.Infrastructure.Vehicle) |
_Lane (inherited from CBPRS.Infrastructure.Vehicle) |
_MustChange (inherited from CBPRS.Infrastructure.Vehicle) |
_Position (inherited from CBPRS.Infrastructure.Vehicle) |
_Route (inherited from CBPRS.Infrastructure.Vehicle) |
_Speed (inherited from CBPRS.Infrastructure.Vehicle) |
_TailLight (inherited from CBPRS.Infrastructure.Vehicle) |
_UpdateRouting | Boolean indicating if the routing system is updated by this vehicle.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
MoveVehicle (inherited from CBPRS.Infrastructure.Vehicle) |
SetTailLight (inherited from CBPRS.Infrastructure.Vehicle) |
UpdateRouting | Updates the routing system by transmitting delays.

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle Constructor

Default constructor

protected AntVehicle(
int id
);

Parameters

id
The id to be assigned to the vehicle.

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle Fields

The fields of the AntVehicle class are listed below. For a complete list of AntVehicle class members, see the AntVehicle Members topic.

Protected Instance Fields

_Braking (inherited from CBPRS.Infrastructure.Vehicle) |
_Id (inherited from CBPRS.Infrastructure.Vehicle) |
_Lane (inherited from CBPRS.Infrastructure.Vehicle) |
_MustChange (inherited from CBPRS.Infrastructure.Vehicle) |
_Position (inherited from CBPRS.Infrastructure.Vehicle) |
_Route (inherited from CBPRS.Infrastructure.Vehicle) |
_Speed (inherited from CBPRS.Infrastructure.Vehicle) |
_TailLight (inherited from CBPRS.Infrastructure.Vehicle) |
_UpdateRouting | Boolean indicating if the routing system is updated by this vehicle.

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle._UpdateRouting Field

Boolean indicating if the routing system is updated by this vehicle.

protected bool _UpdateRouting;

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle Properties

The properties of the AntVehicle class are listed below. For a complete list of AntVehicle class members, see the AntVehicle Members topic.

Public Instance Properties

Behind (inherited from CBPRS.Infrastructure.Vehicle) |
Color | Gets the color of the vehicle
Id (inherited from CBPRS.Infrastructure.Vehicle) |
IsBraking (inherited from CBPRS.Infrastructure.Vehicle) |
Lane (inherited from CBPRS.Infrastructure.Vehicle) |
Length | Gets the length of the vehicle in blocks.
MaxSpeed | Gets the maximum speed of the vehicle in blocks per step.
MustChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
Position (inherited from CBPRS.Infrastructure.Vehicle) |
Route (inherited from CBPRS.Infrastructure.Vehicle) |
Speed (inherited from CBPRS.Infrastructure.Vehicle) |
TurnIndicator (inherited from CBPRS.Infrastructure.Vehicle) |
UpdateRoutingSystem | Gets or sets a boolean value indicating that the vehicle should update the routing system with delay information.

See Also

AntVehicle Class | CBPRS.Routing Namespace


Color Property

City Based Parking and Routing System API Documentation

AntVehicle.Color Property

Gets the color of the vehicle

public override System.Drawing.Color Color {get;}

Implements

IVehicle.Color

See Also

AntVehicle Class | CBPRS.Routing Namespace


Length Property

City Based Parking and Routing System API Documentation

AntVehicle.Length Property

Gets the length of the vehicle in blocks.

public override int Length {get;}

Implements

IVehicle.Length

See Also

AntVehicle Class | CBPRS.Routing Namespace


MaxSpeed Property

City Based Parking and Routing System API Documentation

AntVehicle.MaxSpeed Property

Gets the maximum speed of the vehicle in blocks per step.

public override int MaxSpeed {get;}

Implements

IVehicle.MaxSpeed

See Also

AntVehicle Class | CBPRS.Routing Namespace


UpdateRoutingSystem Property

City Based Parking and Routing System API Documentation

AntVehicle.UpdateRoutingSystem Property

Gets or sets a boolean value indicating that the vehicle should update the routing system with delay information.

public bool UpdateRoutingSystem {get; set;}

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle Methods

The methods of the AntVehicle class are listed below. For a complete list of AntVehicle class members, see the AntVehicle Members topic.

Public Static Methods

Create The vehicle creation factory method.

Public Instance Methods

BackwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeTo (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToLeft (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToRight (inherited from CBPRS.Infrastructure.Vehicle) |
CriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
ForwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IntializeRoute | Initialize the routing for the current vehicle.
Move (inherited from CBPRS.Infrastructure.Vehicle) |
PreCriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Reset (inherited from CBPRS.Infrastructure.Vehicle) |
ResolveLaneChangeDeadLock (inherited from CBPRS.Infrastructure.Vehicle) |
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateRoute | Updates the current route.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
MoveVehicle (inherited from CBPRS.Infrastructure.Vehicle) |
SetTailLight (inherited from CBPRS.Infrastructure.Vehicle) |
UpdateRouting | Updates the routing system by transmitting delays.

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle.Create Method

The vehicle creation factory method.

public static IVehicle Create(
int id
);

Parameters

id
The id to be assigned to the vehicle.

Return Value

A newly created AntVehicle with the specified id assigned.

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle.IntializeRoute Method

Initialize the routing for the current vehicle.

public override void IntializeRoute(
IIntersection source,
uint step
);

Parameters

source
The generator at which the vehicle was generated.
step
The current time step.

Implements

IVehicle.IntializeRoute

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle.UpdateRoute Method

Updates the current route.

public override void UpdateRoute(
uint step
);

Parameters

step
The current time step

Implements

IVehicle.UpdateRoute

See Also

AntVehicle Class | CBPRS.Routing Namespace


AntVehicle.UpdateRouting Method

Updates the routing system by transmitting delays.

protected void UpdateRouting(
AntRoute route,
int Delay
);

Parameters

route
The ant route the vehicle is currently following
Delay
The delay experienced on the route.

See Also

AntVehicle Class | CBPRS.Routing Namespace


BackwardAnt Class

Backward ant

For a list of all members of this type, see BackwardAnt Members.

System.Object
CBPRS.Routing.BackwardAnt

public class BackwardAnt : IAnt

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

BackwardAnt Members | CBPRS.Routing Namespace


BackwardAnt Members

BackwardAnt overview

Public Instance Constructors

BackwardAnt Overloaded. Initializes a new instance of the BackwardAnt class.

Public Instance Properties

Age | Gets the age of the current ant.
Colony | Gets or sets the colony id where the forward ant originated.
Destination | Gets or sets the destination id of the forward ant.
IsTransmitted | Boolean that indicates if the node has been transmitted.
Origin | Gets or sets the origin node id of the current ant.
OriginIsColony | Gets or sets a boolean that indicates if the origin is a colony.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDelayOnRouteBetween | Gets the delay on the route between a destination and the current node.
GetDelayOnRouteToOrigin | Gets the delay on the route between the current node and the origin.
GetDelayOnRouteToOriginNode | Gets the delay on the route between the node that spawned the backward ant and the current node.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNextNodeOnRoute | Gets the next node on the route towards the destination.
GetOriginNode | Gets the origin node of the backward ant, i.e. the node where the Fant became Bant.
GetPreviousNodeOnRoute | Gets the previous node on the route towards the destination.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt Constructor

Default constructor

Overload List

Default constructor

public BackwardAnt();

public BackwardAnt(int,int,bool,int,0, Culture=neutral, PublicKeyToken=null]]);

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt Constructor ()

Default constructor

public BackwardAnt();

See Also

BackwardAnt Class | CBPRS.Routing Namespace | BackwardAnt Constructor Overload List


BackwardAnt Constructor (Int32, Int32, Boolean, Int32, 0, Culture=neutral, PublicKeyToken=null]])

public BackwardAnt(
int destination,
int origin,
bool originIsColony,
int colony,
0, Culture=neutral, PublicKeyToken=null]] visitedpath
);

See Also

BackwardAnt Class | CBPRS.Routing Namespace | BackwardAnt Constructor Overload List


BackwardAnt Properties

The properties of the BackwardAnt class are listed below. For a complete list of BackwardAnt class members, see the BackwardAnt Members topic.

Public Instance Properties

Age | Gets the age of the current ant.
Colony | Gets or sets the colony id where the forward ant originated.
Destination | Gets or sets the destination id of the forward ant.
IsTransmitted | Boolean that indicates if the node has been transmitted.
Origin | Gets or sets the origin node id of the current ant.
OriginIsColony | Gets or sets a boolean that indicates if the origin is a colony.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


Age Property

City Based Parking and Routing System API Documentation

BackwardAnt.Age Property

Gets the age of the current ant.

public int Age {get;}

Remarks

The age of ant is determined by the length of the path in its buffers.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


Colony Property

City Based Parking and Routing System API Documentation

BackwardAnt.Colony Property

Gets or sets the colony id where the forward ant originated.

public int Colony {get; set;}

See Also

BackwardAnt Class | CBPRS.Routing Namespace


Destination Property

City Based Parking and Routing System API Documentation

BackwardAnt.Destination Property

Gets or sets the destination id of the forward ant.

public int Destination {get; set;}

Implements

IAnt.Destination

See Also

BackwardAnt Class | CBPRS.Routing Namespace


IsTransmitted Property

City Based Parking and Routing System API Documentation

BackwardAnt.IsTransmitted Property

Boolean that indicates if the node has been transmitted.

public bool IsTransmitted {get; set;}

Implements

IAnt.IsTransmitted

See Also

BackwardAnt Class | CBPRS.Routing Namespace


Origin Property

City Based Parking and Routing System API Documentation

BackwardAnt.Origin Property

Gets or sets the origin node id of the current ant.

public int Origin {get; set;}

Implements

IAnt.Origin

See Also

BackwardAnt Class | CBPRS.Routing Namespace


OriginIsColony Property

City Based Parking and Routing System API Documentation

BackwardAnt.OriginIsColony Property

Gets or sets a boolean that indicates if the origin is a colony.

public bool OriginIsColony {get; set;}

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt Methods

The methods of the BackwardAnt class are listed below. For a complete list of BackwardAnt class members, see the BackwardAnt Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDelayOnRouteBetween | Gets the delay on the route between a destination and the current node.
GetDelayOnRouteToOrigin | Gets the delay on the route between the current node and the origin.
GetDelayOnRouteToOriginNode | Gets the delay on the route between the node that spawned the backward ant and the current node.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNextNodeOnRoute | Gets the next node on the route towards the destination.
GetOriginNode | Gets the origin node of the backward ant, i.e. the node where the Fant became Bant.
GetPreviousNodeOnRoute | Gets the previous node on the route towards the destination.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt.GetDelayOnRouteBetween Method

Gets the delay on the route between a destination and the current node.

public float GetDelayOnRouteBetween(
int destination,
int origin
);

Parameters

destination
The destination node of the current path
origin
The origin of the current path.

Return Value

The delay of path beteen the specified destination and origin.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt.GetDelayOnRouteToOrigin Method

Gets the delay on the route between the current node and the origin.

public float GetDelayOnRouteToOrigin(
int current
);

Parameters

current
The id of the current node.

Return Value

The delay between the current node and the origin node/colony.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt.GetDelayOnRouteToOriginNode Method

Gets the delay on the route between the node that spawned the backward ant and the current node.

public float GetDelayOnRouteToOriginNode(
int current
);

Parameters

current
The id of the current node.

Return Value

The delay between the current node and the origin node.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt.GetNextNodeOnRoute Method

Gets the next node on the route towards the destination.

public int GetNextNodeOnRoute(
int current
);

Parameters

current
The id of the current node.

Return Value

The node id of the next node on the route if one is present; Otherwise, -1.

Exceptions

Exception Type | Condition
ArgumentException | Thrown if the current was not found in the visited path list.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt.GetOriginNode Method

Gets the origin node of the backward ant, i.e. the node where the Fant became Bant.

public int GetOriginNode();

Return Value

The origin node Id the backward ant.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardAnt.GetPreviousNodeOnRoute Method

Gets the previous node on the route towards the destination.

public int GetPreviousNodeOnRoute(
int current
);

Parameters

current
The id of the current node.

Return Value

The node id of the previous node on the route; If the current node is the first node it is returned.

Exceptions

Exception Type | Condition
ArgumentException | Thrown if the current was not found in the visited path list.

See Also

BackwardAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt Class

Backward exploring ant updates routes between colonies.

For a list of all members of this type, see BackwardExploringAnt Members.

System.Object
CBPRS.Routing.BackwardExploringAnt

public class BackwardExploringAnt : IAnt

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

BackwardExploringAnt Members | CBPRS.Routing Namespace


BackwardExploringAnt Members

BackwardExploringAnt overview

Public Instance Constructors

BackwardExploringAnt Constructor

Public Instance Properties

Destination | Get or sets the destination node id for the ant.
IsTransmitted | Gets or sets a boolean indicating if the ant has been transmitted.
Origin | Gets or sets the origin colony id for the ant.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDelayOnRouteBetween | Gets the delay on the route between a destination and the current node.
GetDelayOnRouteToOrigin | Gets the delay on the route between the current node and the origin.
GetDelayOnRouteToOriginNode | Gets the delay on the route between the node that spawned the backward ant and the current node.
GetDelayToColonies | Gets the delay between the current node and the colonies in between the origin.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNextNodeOnRoute | Gets the next node on the route towards the destination.
GetOriginNode | Gets the origin node of the backward ant, i.e. the node where the Fant became Bant.
GetPreviousNodeOnRoute | Gets the previous node on the route towards the destination.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

_ColoniesTable | The association between colony id's and the nodes at which they where encountered.
_DestinationNodeId | The node to which the BEant is destined.
_NodePath | The path traveled to reach the destination colony.
_OriginColonyId | The colony at which the BEant was spawned.
_Transmitted | Boolean indicating if the ant has been transmitted this simulation step.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt Constructor

public BackwardExploringAnt(
int OriginColonyId,
int DestinationNodeId,
0, Culture=neutral, PublicKeyToken=null]] Path,
0, Culture=neutral, PublicKeyToken=null]] ColoniesTable
);

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt Fields

The fields of the BackwardExploringAnt class are listed below. For a complete list of BackwardExploringAnt class members, see the BackwardExploringAnt Members topic.

Protected Instance Fields

_ColoniesTable | The association between colony id's and the nodes at which they where encountered.
_DestinationNodeId | The node to which the BEant is destined.
_NodePath | The path traveled to reach the destination colony.
_OriginColonyId | The colony at which the BEant was spawned.
_Transmitted | Boolean indicating if the ant has been transmitted this simulation step.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt._ColoniesTable Field

The association between colony id's and the nodes at which they where encountered.

protected 0, Culture=neutral, PublicKeyToken=null]] _ColoniesTable;

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt._DestinationNodeId Field

The node to which the BEant is destined.

protected int _DestinationNodeId;

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt._NodePath Field

The path traveled to reach the destination colony.

protected 0, Culture=neutral, PublicKeyToken=null]] _NodePath;

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt._OriginColonyId Field

The colony at which the BEant was spawned.

protected int _OriginColonyId;

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt._Transmitted Field

Boolean indicating if the ant has been transmitted this simulation step.

protected bool _Transmitted;

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt Properties

The properties of the BackwardExploringAnt class are listed below. For a complete list of BackwardExploringAnt class members, see the BackwardExploringAnt Members topic.

Public Instance Properties

Destination | Get or sets the destination node id for the ant.
IsTransmitted | Gets or sets a boolean indicating if the ant has been transmitted.
Origin | Gets or sets the origin colony id for the ant.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


Destination Property

City Based Parking and Routing System API Documentation

BackwardExploringAnt.Destination Property

Get or sets the destination node id for the ant.

public int Destination {get; set;}

Implements

IAnt.Destination

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


IsTransmitted Property

City Based Parking and Routing System API Documentation

BackwardExploringAnt.IsTransmitted Property

Gets or sets a boolean indicating if the ant has been transmitted.

public bool IsTransmitted {get; set;}

Implements

IAnt.IsTransmitted

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


Origin Property

City Based Parking and Routing System API Documentation

BackwardExploringAnt.Origin Property

Gets or sets the origin colony id for the ant.

public int Origin {get; set;}

Implements

IAnt.Origin

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt Methods

The methods of the BackwardExploringAnt class are listed below. For a complete list of BackwardExploringAnt class members, see the BackwardExploringAnt Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDelayOnRouteBetween | Gets the delay on the route between a destination and the current node.
GetDelayOnRouteToOrigin | Gets the delay on the route between the current node and the origin.
GetDelayOnRouteToOriginNode | Gets the delay on the route between the node that spawned the backward ant and the current node.
GetDelayToColonies | Gets the delay between the current node and the colonies in between the origin.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNextNodeOnRoute | Gets the next node on the route towards the destination.
GetOriginNode | Gets the origin node of the backward ant, i.e. the node where the Fant became Bant.
GetPreviousNodeOnRoute | Gets the previous node on the route towards the destination.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt.GetDelayOnRouteBetween Method

Gets the delay on the route between a destination and the current node.

public float GetDelayOnRouteBetween(
int destination,
int origin
);

Parameters

destination
The destination node of the current path
origin
The origin of the current path.

Return Value

The delay of path beteen the specified destination and origin.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt.GetDelayOnRouteToOrigin Method

Gets the delay on the route between the current node and the origin.

public float GetDelayOnRouteToOrigin(
int current
);

Parameters

current
The id of the current node.

Return Value

The delay between the current node and the origin node/colony.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt.GetDelayOnRouteToOriginNode Method

Gets the delay on the route between the node that spawned the backward ant and the current node.

public float GetDelayOnRouteToOriginNode(
int current
);

Parameters

current
The id of the current node.

Return Value

The delay between the current node and the origin node.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt.GetDelayToColonies Method

Gets the delay between the current node and the colonies in between the origin.

public 0, Culture=neutral, PublicKeyToken=null]] GetDelayToColonies(
int current
);

Parameters

current
The id of the current node.

Return Value

A list of NodeInfo structures containgin the colony id and the delay to that colony.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt.GetNextNodeOnRoute Method

Gets the next node on the route towards the destination.

public int GetNextNodeOnRoute(
int current
);

Parameters

current
The id of the current node.

Return Value

The node id of the next node on the route if one is present; Otherwise, -1.

Exceptions

Exception Type | Condition
ArgumentException | Thrown if the current was not found in the visited path list.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt.GetOriginNode Method

Gets the origin node of the backward ant, i.e. the node where the Fant became Bant.

public int GetOriginNode();

Return Value

The origin node Id the backward ant.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


BackwardExploringAnt.GetPreviousNodeOnRoute Method

Gets the previous node on the route towards the destination.

public int GetPreviousNodeOnRoute(
int current
);

Parameters

current
The id of the current node.

Return Value

The node id of the previous node on the route; If the current node is the first node it is returned.

Exceptions

Exception Type | Condition
ArgumentException | Thrown if the current was not found in the visited path list.

See Also

BackwardExploringAnt Class | CBPRS.Routing Namespace


ColonyInfo Structure

Colony encountering information.

For a list of all members of this type, see ColonyInfo Members.

System.Object
System.ValueType
CBPRS.Routing.ColonyInfo

public struct ColonyInfo

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

ColonyInfo Members | CBPRS.Routing Namespace


ColonyInfo Members

ColonyInfo overview

Public Instance Constructors

ColonyInfo Constructor Default constructor

Public Instance Fields

Colony | The Colony id of the colony encountered.
Node | The node id at which the colony was encountered.

Public Instance Methods

Equals (inherited from ValueType) | Indicates whether this instance and a specified object are equal.
GetHashCode (inherited from ValueType) | Returns the hash code for this instance.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from ValueType) | Returns the fully qualified type name of this instance.

See Also

ColonyInfo Class | CBPRS.Routing Namespace


ColonyInfo Constructor

Default constructor

public ColonyInfo(
int node,
int colony
);

Parameters

node
The Id of the node encountered.
colony
The Id of the colony.

See Also

ColonyInfo Class | CBPRS.Routing Namespace


ColonyInfo Fields

The fields of the ColonyInfo structure are listed below. For a complete list of ColonyInfo structure members, see the ColonyInfo Members topic.

Public Instance Fields

Colony | The Colony id of the colony encountered.
Node | The node id at which the colony was encountered.

See Also

ColonyInfo Class | CBPRS.Routing Namespace


ColonyInfo.Colony Field

The Colony id of the colony encountered.

public int Colony;

See Also

ColonyInfo Class | CBPRS.Routing Namespace


ColonyInfo.Node Field

The node id at which the colony was encountered.

public int Node;

See Also

ColonyInfo Class | CBPRS.Routing Namespace


Dijkstra Class

Dijkstra algorithm for an IIntersection based graph.

For a list of all members of this type, see Dijkstra Members.

System.Object
CBPRS.Routing.Dijkstra

public class Dijkstra

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

Dijkstra Members | CBPRS.Routing Namespace


Dijkstra Members

Dijkstra overview

Public Instance Constructors

Dijkstra Constructor Default constructor

Public Instance Methods

CalculateShortestPaths |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

_Associations | The intersection to node dictionary.
_PriorityQueue | The priority queue.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
FindMinNode | Finds the minimum weight node in the priority queue.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Dijkstra Class | CBPRS.Routing Namespace


Dijkstra Constructor

Default constructor

public Dijkstra();

See Also

Dijkstra Class | CBPRS.Routing Namespace


Dijkstra Fields

The fields of the Dijkstra class are listed below. For a complete list of Dijkstra class members, see the Dijkstra Members topic.

Protected Instance Fields

_Associations | The intersection to node dictionary.
_PriorityQueue | The priority queue.

See Also

Dijkstra Class | CBPRS.Routing Namespace


Dijkstra._Associations Field

The intersection to node dictionary.

protected 0, Culture=neutral, PublicKeyToken=null]] _Associations;

See Also

Dijkstra Class | CBPRS.Routing Namespace


Dijkstra._PriorityQueue Field

The priority queue.

protected 0, Culture=neutral, PublicKeyToken=null]] _PriorityQueue;

See Also

Dijkstra Class | CBPRS.Routing Namespace


Dijkstra Methods

The methods of the Dijkstra class are listed below. For a complete list of Dijkstra class members, see the Dijkstra Members topic.

Public Instance Methods

CalculateShortestPaths |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
FindMinNode | Finds the minimum weight node in the priority queue.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Dijkstra Class | CBPRS.Routing Namespace


Dijkstra.CalculateShortestPaths Method

public bool CalculateShortestPaths(
0, Culture=neutral, PublicKeyToken=null]] intersections,
0, Culture=neutral, PublicKeyToken=null]] Tables
);

See Also

Dijkstra Class | CBPRS.Routing Namespace


Dijkstra.FindMinNode Method

Finds the minimum weight node in the priority queue.

protected DijkstraNode FindMinNode();

Return Value

The mimumum weight node.

See Also

Dijkstra Class | CBPRS.Routing Namespace


DijkstraNode Class

Dijkstra node for calculating shortest paths on a road network.

For a list of all members of this type, see DijkstraNode Members.

System.Object
CBPRS.Routing.DijkstraNode

public class DijkstraNode

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

DijkstraNode Members | CBPRS.Routing Namespace


DijkstraNode Members

DijkstraNode overview

Public Instance Constructors

DijkstraNode Constructor Default constructor.

Public Instance Properties

Current | Gets the intersection associated with this object.
Previous | Gets or sets the previous Dijkstra node in a shortest path.
Weight | Gets or sets the weight of the current node.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset | Reverts the node to its post-constructor state.
ToString (inherited from Object) | Returns a String that represents the current Object.
Visit | Overloaded.

Protected Instance Fields

_Current | The current intersection bound to this node.
_Previous | The previous Dijkstra node in a shortest path search.
_Weight | The weight of the shortest path up to this point.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode Constructor

Default constructor.

public DijkstraNode(
IIntersection current
);

Parameters

current
The intersection bound to this node.

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode Fields

The fields of the DijkstraNode class are listed below. For a complete list of DijkstraNode class members, see the DijkstraNode Members topic.

Protected Instance Fields

_Current | The current intersection bound to this node.
_Previous | The previous Dijkstra node in a shortest path search.
_Weight | The weight of the shortest path up to this point.

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode._Current Field

The current intersection bound to this node.

protected IIntersection _Current;

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode._Previous Field

The previous Dijkstra node in a shortest path search.

protected DijkstraNode _Previous;

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode._Weight Field

The weight of the shortest path up to this point.

protected float _Weight;

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode Properties

The properties of the DijkstraNode class are listed below. For a complete list of DijkstraNode class members, see the DijkstraNode Members topic.

Public Instance Properties

Current | Gets the intersection associated with this object.
Previous | Gets or sets the previous Dijkstra node in a shortest path.
Weight | Gets or sets the weight of the current node.

See Also

DijkstraNode Class | CBPRS.Routing Namespace


Current Property

City Based Parking and Routing System API Documentation

DijkstraNode.Current Property

Gets the intersection associated with this object.

public CBPRS.Infrastructure.IIntersection Current {get;}

See Also

DijkstraNode Class | CBPRS.Routing Namespace


Previous Property

City Based Parking and Routing System API Documentation

DijkstraNode.Previous Property

Gets or sets the previous Dijkstra node in a shortest path.

public DijkstraNode Previous {get; set;}

See Also

DijkstraNode Class | CBPRS.Routing Namespace


Weight Property

City Based Parking and Routing System API Documentation

DijkstraNode.Weight Property

Gets or sets the weight of the current node.

public float Weight {get; set;}

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode Methods

The methods of the DijkstraNode class are listed below. For a complete list of DijkstraNode class members, see the DijkstraNode Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset | Reverts the node to its post-constructor state.
ToString (inherited from Object) | Returns a String that represents the current Object.
Visit | Overloaded.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode.Reset Method

Reverts the node to its post-constructor state.

public void Reset();

See Also

DijkstraNode Class | CBPRS.Routing Namespace


Visit Method

City Based Parking and Routing System API Documentation

DijkstraNode.Visit Method

Overload List

public void Visit(0, Culture=neutral, PublicKeyToken=null]]);

public void Visit(0, Culture=neutral, PublicKeyToken=null]],RoadPosition);

See Also

DijkstraNode Class | CBPRS.Routing Namespace


DijkstraNode.Visit Method (0, Culture=neutral, PublicKeyToken=null]])

public void Visit(
0, Culture=neutral, PublicKeyToken=null]] associations
);

See Also

DijkstraNode Class | CBPRS.Routing Namespace | DijkstraNode.Visit Overload List


DijkstraNode.Visit Method (0, Culture=neutral, PublicKeyToken=null]], RoadPosition)

public void Visit(
0, Culture=neutral, PublicKeyToken=null]] assoc,
RoadPosition position
);

See Also

DijkstraNode Class | CBPRS.Routing Namespace | DijkstraNode.Visit Overload List


DijkstraRoutingTable Class

The routing table used for the Dijkstra algorithm.

For a list of all members of this type, see DijkstraRoutingTable Members.

System.Object
CBPRS.Routing.DijkstraRoutingTable

public class DijkstraRoutingTable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This routing table works on the assumption that the intersections have consequtive numbers.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

DijkstraRoutingTable Members | CBPRS.Routing Namespace


DijkstraRoutingTable Members

DijkstraRoutingTable overview

Protected Static Fields

cMaxRoadsPerIntersection The maximum number of roads per intersection.

Public Instance Constructors

DijkstraRoutingTable Constructor Default constructor;

Public Instance Methods

AddRoute | Adds a route the collection of routes maintained for the specified road.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetRouteTo | Gets the direction the vehicle is supposed to make at the next intersection.
GetType (inherited from Object) | Gets the Type of the current instance.
Intialize | Initializes the routing table by creating entry for all roads on the intersection
PositionHasRoutingTable | Determines if a routing table is present for the current position.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

_Table The collection of routing tables.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable Constructor

Default constructor;

public DijkstraRoutingTable();

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable Fields

The fields of the DijkstraRoutingTable class are listed below. For a complete list of DijkstraRoutingTable class members, see the DijkstraRoutingTable Members topic.

Protected Static Fields

cMaxRoadsPerIntersection The maximum number of roads per intersection.

Protected Instance Fields

_Table The collection of routing tables.

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable._Table Field

The collection of routing tables.

protected BitArray[] _Table;

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable.cMaxRoadsPerIntersection Field

The maximum number of roads per intersection.

protected const int cMaxRoadsPerIntersection = 4;

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable Methods

The methods of the DijkstraRoutingTable class are listed below. For a complete list of DijkstraRoutingTable class members, see the DijkstraRoutingTable Members topic.

Public Instance Methods

AddRoute | Adds a route the collection of routes maintained for the specified road.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetRouteTo | Gets the direction the vehicle is supposed to make at the next intersection.
GetType (inherited from Object) | Gets the Type of the current instance.
Intialize | Initializes the routing table by creating entry for all roads on the intersection
PositionHasRoutingTable | Determines if a routing table is present for the current position.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable.AddRoute Method

Adds a route the collection of routes maintained for the specified road.

public void AddRoute(
RoadPosition position,
int destination,
DirectionTypes direction
);

Parameters

position
The RoadPosition of the road that is the parent of the incoming lane.
destination
The id of the intersection that is the destination of the route.
direction
The DirectionTypes in which the vehicle is allowed to turn.

Exceptions

Exception Type | Condition
ArgumentException | Thrown if the direction is ambiguous.

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable.GetRouteTo Method

Gets the direction the vehicle is supposed to make at the next intersection.

public DirectionTypes GetRouteTo(
RoadPosition position,
int destination
);

Parameters

position
The road position of the lane the vehicle is currently driving on.
destination
The destination of the vehicle.

Return Value

The direction in which the vehicle is supposed to turn.

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable.Intialize Method

Initializes the routing table by creating entry for all roads on the intersection

public void Intialize(
IIntersection intersection,
int destinations
);

Parameters

intersection
The intersection this routing table belongs to.
destinations
The destinations, i.e. the number of intersection (this one inclusive) in the simulation.

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraRoutingTable.PositionHasRoutingTable Method

Determines if a routing table is present for the current position.

public bool PositionHasRoutingTable(
RoadPosition position
);

Parameters

position
The position to check for connection.

Return Value

True if the position has a routing table; Otherwise, false.

See Also

DijkstraRoutingTable Class | CBPRS.Routing Namespace


DijkstraVehicle Class

Vehicle that uses the Dijkstra algorithm for routing.

For a list of all members of this type, see DijkstraVehicle Members.

System.Object
CBPRS.Infrastructure.Vehicle
CBPRS.Routing.DijkstraVehicle

public class DijkstraVehicle : Vehicle

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

DijkstraVehicle Members | CBPRS.Routing Namespace


DijkstraVehicle Members

DijkstraVehicle overview

Public Static Methods

Create The factory creation method.

Public Instance Constructors

DijkstraVehicle Constructor Default constructor

Public Instance Properties

Behind (inherited from CBPRS.Infrastructure.Vehicle) |
Color | Gets the vehicle color
Id (inherited from CBPRS.Infrastructure.Vehicle) |
IsBraking (inherited from CBPRS.Infrastructure.Vehicle) |
Lane (inherited from CBPRS.Infrastructure.Vehicle) |
Length | Gets the length of the current vehicle.
MaxSpeed | Gets the maximum speed at which this vehicle can travel.
MustChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
Position (inherited from CBPRS.Infrastructure.Vehicle) |
Route (inherited from CBPRS.Infrastructure.Vehicle) |
Speed (inherited from CBPRS.Infrastructure.Vehicle) |
TurnIndicator (inherited from CBPRS.Infrastructure.Vehicle) |

Public Instance Methods

BackwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeTo (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToLeft (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToRight (inherited from CBPRS.Infrastructure.Vehicle) |
CriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
ForwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IntializeRoute | Initialize the route.
Move (inherited from CBPRS.Infrastructure.Vehicle) |
PreCriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Reset (inherited from CBPRS.Infrastructure.Vehicle) |
ResolveLaneChangeDeadLock (inherited from CBPRS.Infrastructure.Vehicle) |
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateRoute | Updates the route of the vehicle by consulting the Dijkstra routing tables.

Protected Instance Fields

_Braking (inherited from CBPRS.Infrastructure.Vehicle)
_Id (inherited from CBPRS.Infrastructure.Vehicle)
_Lane (inherited from CBPRS.Infrastructure.Vehicle)
_MustChange (inherited from CBPRS.Infrastructure.Vehicle)
_Position (inherited from CBPRS.Infrastructure.Vehicle)
_Route (inherited from CBPRS.Infrastructure.Vehicle)
_Speed (inherited from CBPRS.Infrastructure.Vehicle)
_TailLight (inherited from CBPRS.Infrastructure.Vehicle)

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
MoveVehicle (inherited from CBPRS.Infrastructure.Vehicle) |
SetTailLight (inherited from CBPRS.Infrastructure.Vehicle) |

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


DijkstraVehicle Constructor

Default constructor

public DijkstraVehicle(
int id
);

Parameters

id
The id to be assigned to the vehicle

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


DijkstraVehicle Properties

The properties of the DijkstraVehicle class are listed below. For a complete list of DijkstraVehicle class members, see the DijkstraVehicle Members topic.

Public Instance Properties

Behind (inherited from CBPRS.Infrastructure.Vehicle) |
Color | Gets the vehicle color
Id (inherited from CBPRS.Infrastructure.Vehicle) |
IsBraking (inherited from CBPRS.Infrastructure.Vehicle) |
Lane (inherited from CBPRS.Infrastructure.Vehicle) |
Length | Gets the length of the current vehicle.
MaxSpeed | Gets the maximum speed at which this vehicle can travel.
MustChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
Position (inherited from CBPRS.Infrastructure.Vehicle) |
Route (inherited from CBPRS.Infrastructure.Vehicle) |
Speed (inherited from CBPRS.Infrastructure.Vehicle) |
TurnIndicator (inherited from CBPRS.Infrastructure.Vehicle) |

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


Color Property

City Based Parking and Routing System API Documentation

DijkstraVehicle.Color Property

Gets the vehicle color

public override System.Drawing.Color Color {get;}

Implements

IVehicle.Color

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


Length Property

City Based Parking and Routing System API Documentation

DijkstraVehicle.Length Property

Gets the length of the current vehicle.

public override int Length {get;}

Implements

IVehicle.Length

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


MaxSpeed Property

City Based Parking and Routing System API Documentation

DijkstraVehicle.MaxSpeed Property

Gets the maximum speed at which this vehicle can travel.

public override int MaxSpeed {get;}

Implements

IVehicle.MaxSpeed

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


DijkstraVehicle Methods

The methods of the DijkstraVehicle class are listed below. For a complete list of DijkstraVehicle class members, see the DijkstraVehicle Members topic.

Public Static Methods

Create The factory creation method.

Public Instance Methods

BackwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeLanes (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeTo (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToLeft (inherited from CBPRS.Infrastructure.Vehicle) |
ChangeToRight (inherited from CBPRS.Infrastructure.Vehicle) |
CriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
ForwardGap (inherited from CBPRS.Infrastructure.Vehicle) |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IntializeRoute | Initialize the route.
Move (inherited from CBPRS.Infrastructure.Vehicle) |
PreCriticalZoneChange (inherited from CBPRS.Infrastructure.Vehicle) |
Reset (inherited from CBPRS.Infrastructure.Vehicle) |
ResolveLaneChangeDeadLock (inherited from CBPRS.Infrastructure.Vehicle) |
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateRoute | Updates the route of the vehicle by consulting the Dijkstra routing tables.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
MoveVehicle (inherited from CBPRS.Infrastructure.Vehicle) |
SetTailLight (inherited from CBPRS.Infrastructure.Vehicle) |

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


DijkstraVehicle.Create Method

The factory creation method.

public static IVehicle Create(
int id
);

Parameters

id
The id for the newly create vehicle.

Return Value

A newly created DijkstraVehicle with the specified id assigned.

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


DijkstraVehicle.IntializeRoute Method

Initialize the route.

public override void IntializeRoute(
IIntersection source,
uint step
);

Parameters

source
The intersection at which the route starts.
step
The current time step.

Implements

IVehicle.IntializeRoute

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


DijkstraVehicle.UpdateRoute Method

Updates the route of the vehicle by consulting the Dijkstra routing tables.

public override void UpdateRoute(
uint step
);

Parameters

step
The current time step.

Implements

IVehicle.UpdateRoute

Remarks

This function is called after the intersection has entered a new lane (i.e. is crossing the intersection). This function further assumes that DijkstraVehicles as implemented in the routing subsystem travel from generator to generator therefore once the destination is reached we do not update the route anymore but let the vehicle be consumed by the exit.

See Also

DijkstraVehicle Class | CBPRS.Routing Namespace


ForwardAnt Class

Forward ant implementation

For a list of all members of this type, see ForwardAnt Members.

System.Object
CBPRS.Routing.ForwardAnt

public class ForwardAnt : IAnt

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

ForwardAnt Members | CBPRS.Routing Namespace


ForwardAnt Members

ForwardAnt overview

Public Instance Constructors

ForwardAnt Overloaded. Initializes a new instance of the ForwardAnt class.

Public Instance Properties

Age | Gets the age of the current ant.
Colony | Gets or sets the colony id where the forward ant originated.
Destination | Gets or sets the destination id of the forward ant.
DestIsColony | Gets or sets a boolean that indicates if the destination is a colony.
IsTransmitted | Boolean that indicates if the node has been transmitted.
Origin | Gets or sets the origin node id of the current ant.

Public Instance Methods

AddVisitedColony | Adds the delay encountered to the destination colony of the current ant.
AddVisitedNode | Adds a visited node to the path
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetPreviousNode | Gets the id of the node last added to the path.
GetType (inherited from Object) | Gets the Type of the current instance.
SpawnBackwardAnt | Spawns a backward ant based on the information contained in the current ant.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Cycle | Determines if the addition of the specified id creates a cycle.
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt Constructor

Default constructor.

Overload List

Default constructor.

public ForwardAnt();

Extended constructor

public ForwardAnt(int,bool,int,int);

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt Constructor ()

Default constructor.

public ForwardAnt();

See Also

ForwardAnt Class | CBPRS.Routing Namespace | ForwardAnt Constructor Overload List


ForwardAnt Constructor (Int32, Boolean, Int32, Int32)

Extended constructor

public ForwardAnt(
int destination,
bool destIsColony,
int origin,
int colony
);

Parameters

destination
The destination id.
destIsColony
boolean value; True if destination is colony id; Otherwise, false.
origin
The origin node id.
colony
The id of the colony in which the ant originated.

See Also

ForwardAnt Class | CBPRS.Routing Namespace | ForwardAnt Constructor Overload List


ForwardAnt Properties

The properties of the ForwardAnt class are listed below. For a complete list of ForwardAnt class members, see the ForwardAnt Members topic.

Public Instance Properties

Age | Gets the age of the current ant.
Colony | Gets or sets the colony id where the forward ant originated.
Destination | Gets or sets the destination id of the forward ant.
DestIsColony | Gets or sets a boolean that indicates if the destination is a colony.
IsTransmitted | Boolean that indicates if the node has been transmitted.
Origin | Gets or sets the origin node id of the current ant.

See Also

ForwardAnt Class | CBPRS.Routing Namespace


Age Property

City Based Parking and Routing System API Documentation

ForwardAnt.Age Property

Gets the age of the current ant.

public int Age {get;}

Remarks

The age of ant is determined by the length of the path in its buffers.

See Also

ForwardAnt Class | CBPRS.Routing Namespace


Colony Property

City Based Parking and Routing System API Documentation

ForwardAnt.Colony Property

Gets or sets the colony id where the forward ant originated.

public int Colony {get; set;}

See Also

ForwardAnt Class | CBPRS.Routing Namespace


Destination Property

City Based Parking and Routing System API Documentation

ForwardAnt.Destination Property

Gets or sets the destination id of the forward ant.

public int Destination {get; set;}

Implements

IAnt.Destination

See Also

ForwardAnt Class | CBPRS.Routing Namespace


DestIsColony Property

City Based Parking and Routing System API Documentation

ForwardAnt.DestIsColony Property

Gets or sets a boolean that indicates if the destination is a colony.

public bool DestIsColony {get; set;}

See Also

ForwardAnt Class | CBPRS.Routing Namespace


IsTransmitted Property

City Based Parking and Routing System API Documentation

ForwardAnt.IsTransmitted Property

Boolean that indicates if the node has been transmitted.

public bool IsTransmitted {get; set;}

Implements

IAnt.IsTransmitted

See Also

ForwardAnt Class | CBPRS.Routing Namespace


Origin Property

City Based Parking and Routing System API Documentation

ForwardAnt.Origin Property

Gets or sets the origin node id of the current ant.

public int Origin {get; set;}

Implements

IAnt.Origin

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt Methods

The methods of the ForwardAnt class are listed below. For a complete list of ForwardAnt class members, see the ForwardAnt Members topic.

Public Instance Methods

AddVisitedColony | Adds the delay encountered to the destination colony of the current ant.
AddVisitedNode | Adds a visited node to the path
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetPreviousNode | Gets the id of the node last added to the path.
GetType (inherited from Object) | Gets the Type of the current instance.
SpawnBackwardAnt | Spawns a backward ant based on the information contained in the current ant.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Cycle | Determines if the addition of the specified id creates a cycle.
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt.AddVisitedColony Method

Adds the delay encountered to the destination colony of the current ant.

public void AddVisitedColony(
int colonyId,
float delay
);

Parameters

colonyId
The colony id of the visited colony.
delay
The delay incurred when traveling to the specified colony.

Remarks

After this method is called the ant should be transformed to a backward ant!

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt.AddVisitedNode Method

Adds a visited node to the path

public bool AddVisitedNode(
int nodeId,
float delay
);

Parameters

nodeId
The node id of the visited node.
delay
The delay incurred when traveling the specified id.

Return Value

True if the id and delay where added to memory; Otherwise, false.

Remarks

If this function returns false the forward ant should be destroyed since a cycle longer than half the ants age was detected.

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt.Cycle Method

Determines if the addition of the specified id creates a cycle.

protected bool Cycle(
int nodeId
);

Parameters

nodeId
The node id of the node to be added.

Return Value

True if a cycle was detected and could not be resolved; Otherwise false.

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt.GetPreviousNode Method

Gets the id of the node last added to the path.

public int GetPreviousNode();

Return Value

The node id last added

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardAnt.SpawnBackwardAnt Method

Spawns a backward ant based on the information contained in the current ant.

public BackwardAnt SpawnBackwardAnt();

Return Value

A BackwardAnt that is the reverse of the current forward ant.

Remarks

Afters spawning a backward ant the forward ant should be destroyed!

See Also

ForwardAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt Class

Ant that discovers routes towards other colonies

For a list of all members of this type, see ForwardExploringAnt Members.

System.Object
CBPRS.Routing.ForwardExploringAnt

public class ForwardExploringAnt : IAnt

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

ForwardExploringAnt Members | CBPRS.Routing Namespace


ForwardExploringAnt Members

ForwardExploringAnt overview

Protected Static Fields

cDefaultPathLength The default path length used for the path array's

Public Instance Constructors

ForwardExploringAnt Constructor Default constructor

Public Instance Properties

Age | Gets the age of the ant.
Destination | Gets or sets the destination Colony of the FEant
IsTransmitted | Gets or sets the value indicating if the FEant has been transmitted this step.
Origin | Gets or sets the node at which the FEant originated.

Public Instance Methods

AddVisitedNode | Adds a visited node to the path of visited nodes.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetPreviousNode | Gets the id of node previously visited by the ant.
GetType (inherited from Object) | Gets the Type of the current instance.
IsOriginatingColony | Determines if the specified ColonyId is an originating colony of this FEant.
SpawnBackwardExploringAnt | Transforms the FEant into a BEant.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

_ColoniesTable | The relation between colonies and the nodes at which they where encountered.
_Desination | The destination colony of the FEant.
_IsTransmitted | Boolean indicating whether or not the node has been transmitted.
_NodePath | The path along which FEant traveled to reach its destination.
_OriginColonies | The collection of colonies known to the spawning node.
_OriginNode | The node at which the FEant originated.

Protected Instance Methods

Cycle | Determines if the addition of the specified id creates a cycle.
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt Constructor

Default constructor

public ForwardExploringAnt(
int OriginNodeId,
int[] OriginColonies,
int Destination
);

Parameters

OriginNodeId
The id of the node at which this ant originated.
OriginColonies
The colonies of which the originating node is a member.
Destination
The destination colony Id.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt Fields

The fields of the ForwardExploringAnt class are listed below. For a complete list of ForwardExploringAnt class members, see the ForwardExploringAnt Members topic.

Protected Static Fields

cDefaultPathLength The default path length used for the path array's

Protected Instance Fields

_ColoniesTable | The relation between colonies and the nodes at which they where encountered.
_Desination | The destination colony of the FEant.
_IsTransmitted | Boolean indicating whether or not the node has been transmitted.
_NodePath | The path along which FEant traveled to reach its destination.
_OriginColonies | The collection of colonies known to the spawning node.
_OriginNode | The node at which the FEant originated.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt._ColoniesTable Field

The relation between colonies and the nodes at which they where encountered.

protected 0, Culture=neutral, PublicKeyToken=null]] _ColoniesTable;

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt._Desination Field

The destination colony of the FEant.

protected int _Desination;

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt._IsTransmitted Field

Boolean indicating whether or not the node has been transmitted.

protected bool _IsTransmitted;

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt._NodePath Field

The path along which FEant traveled to reach its destination.

protected 0, Culture=neutral, PublicKeyToken=null]] _NodePath;

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt._OriginColonies Field

The collection of colonies known to the spawning node.

protected int[] _OriginColonies;

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt._OriginNode Field

The node at which the FEant originated.

protected int _OriginNode;

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt.cDefaultPathLength Field

The default path length used for the path array's

protected const int cDefaultPathLength = 5;

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt Properties

The properties of the ForwardExploringAnt class are listed below. For a complete list of ForwardExploringAnt class members, see the ForwardExploringAnt Members topic.

Public Instance Properties

Age | Gets the age of the ant.
Destination | Gets or sets the destination Colony of the FEant
IsTransmitted | Gets or sets the value indicating if the FEant has been transmitted this step.
Origin | Gets or sets the node at which the FEant originated.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


Age Property

City Based Parking and Routing System API Documentation

ForwardExploringAnt.Age Property

Gets the age of the ant.

public int Age {get;}

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


Destination Property

City Based Parking and Routing System API Documentation

ForwardExploringAnt.Destination Property

Gets or sets the destination Colony of the FEant

public int Destination {get; set;}

Implements

IAnt.Destination

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


IsTransmitted Property

City Based Parking and Routing System API Documentation

ForwardExploringAnt.IsTransmitted Property

Gets or sets the value indicating if the FEant has been transmitted this step.

public bool IsTransmitted {get; set;}

Implements

IAnt.IsTransmitted

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


Origin Property

City Based Parking and Routing System API Documentation

ForwardExploringAnt.Origin Property

Gets or sets the node at which the FEant originated.

public int Origin {get; set;}

Implements

IAnt.Origin

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt Methods

The methods of the ForwardExploringAnt class are listed below. For a complete list of ForwardExploringAnt class members, see the ForwardExploringAnt Members topic.

Public Instance Methods

AddVisitedNode | Adds a visited node to the path of visited nodes.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetPreviousNode | Gets the id of node previously visited by the ant.
GetType (inherited from Object) | Gets the Type of the current instance.
IsOriginatingColony | Determines if the specified ColonyId is an originating colony of this FEant.
SpawnBackwardExploringAnt | Transforms the FEant into a BEant.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Cycle | Determines if the addition of the specified id creates a cycle.
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt.AddVisitedNode Method

Adds a visited node to the path of visited nodes.

public bool AddVisitedNode(
int NodeId,
int[] Colonies,
float Delay
);

Parameters

NodeId
The id of the node to add.
Colonies
The colonies of which the node is a member.
Delay
The delay encountered between the previous and current node.

Return Value

True if the node was added to the collection; Otherwise, false: indicating a non-recoverable cycle.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt.Cycle Method

Determines if the addition of the specified id creates a cycle.

protected bool Cycle(
int NodeId
);

Parameters

NodeId
The node id of the node to be added.

Return Value

True if a cycle was detected and could not be resolved; Otherwise false.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt.GetPreviousNode Method

Gets the id of node previously visited by the ant.

public int GetPreviousNode();

Return Value

The id of the ant previously visited.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt.IsOriginatingColony Method

Determines if the specified ColonyId is an originating colony of this FEant.

public bool IsOriginatingColony(
int ColonyId
);

Parameters

ColonyId
The colony id to test.

Return Value

True if the ant originated in the specified ColonyId; Otherwise, false.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


ForwardExploringAnt.SpawnBackwardExploringAnt Method

Transforms the FEant into a BEant.

public BackwardExploringAnt SpawnBackwardExploringAnt();

Return Value

BEant containing the memory of the FEant.

See Also

ForwardExploringAnt Class | CBPRS.Routing Namespace


IAnt Interface

Basic ant interface.

For a list of all members of this type, see IAnt Members.

public interface IAnt

Types that implement IAnt

Type | Description
BackwardAnt | Backward ant
BackwardExploringAnt | Backward exploring ant updates routes between colonies.
ForwardAnt | Forward ant implementation
ForwardExploringAnt | Ant that discovers routes towards other colonies

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

IAnt Members | CBPRS.Routing Namespace


IAnt Members

IAnt overview

Public Instance Properties

Destination | Gets or sets the destination node/colony of the ant.
IsTransmitted | Gets or set a boolean that indicates if the ant has been transmitted.
Origin | Gets or sets the origin node/colony of the ant.

See Also

IAnt Interface | CBPRS.Routing Namespace


IAnt Properties

The properties of the IAnt interface are listed below. For a complete list of IAnt interface members, see the IAnt Members topic.

Public Instance Properties

Destination | Gets or sets the destination node/colony of the ant.
IsTransmitted | Gets or set a boolean that indicates if the ant has been transmitted.
Origin | Gets or sets the origin node/colony of the ant.

See Also

IAnt Interface | CBPRS.Routing Namespace


Destination Property

City Based Parking and Routing System API Documentation

IAnt.Destination Property

Gets or sets the destination node/colony of the ant.

int Destination {get; set;}

See Also

IAnt Interface | CBPRS.Routing Namespace


IsTransmitted Property

City Based Parking and Routing System API Documentation

IAnt.IsTransmitted Property

Gets or set a boolean that indicates if the ant has been transmitted.

bool IsTransmitted {get; set;}

See Also

IAnt Interface | CBPRS.Routing Namespace


Origin Property

City Based Parking and Routing System API Documentation

IAnt.Origin Property

Gets or sets the origin node/colony of the ant.

int Origin {get; set;}

See Also

IAnt Interface | CBPRS.Routing Namespace


NodeInfo Class

Structure contain information about a node and its delay.

For a list of all members of this type, see NodeInfo Members.

System.Object
CBPRS.Routing.NodeInfo

public class NodeInfo

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

NodeInfo Members | CBPRS.Routing Namespace


NodeInfo Members

NodeInfo overview

Public Instance Constructors

NodeInfo Constructor Default Constructor

Public Instance Fields

Delay | The delay encountered to the current node.
Node | The id of the node stored.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

NodeInfo Class | CBPRS.Routing Namespace


NodeInfo Constructor

Default Constructor

public NodeInfo(
int node,
float delay
);

Parameters

node
The node id to store.
delay
The delay associated with the node.

See Also

NodeInfo Class | CBPRS.Routing Namespace


NodeInfo Fields

The fields of the NodeInfo class are listed below. For a complete list of NodeInfo class members, see the NodeInfo Members topic.

Public Instance Fields

Delay | The delay encountered to the current node.
Node | The id of the node stored.

See Also

NodeInfo Class | CBPRS.Routing Namespace


NodeInfo.Delay Field

The delay encountered to the current node.

public float Delay;

See Also

NodeInfo Class | CBPRS.Routing Namespace


NodeInfo.Node Field

The id of the node stored.

public int Node;

See Also

NodeInfo Class | CBPRS.Routing Namespace


RoutingSystem Class

Routing subsystem class

For a list of all members of this type, see RoutingSystem Members.

System.Object
CBPRS.Routing.RoutingSystem

public sealed class RoutingSystem : ISubSystem

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

RoutingSystem Members | CBPRS.Routing Namespace


RoutingSystem Members

RoutingSystem overview

Public Static Methods

GetInstance Singleton accessor

Public Instance Properties

AntNodes | Gets the total number of ant nodes in the routing system.
Colonies | Returns the number of sectors in the ant network.
GenerateForwardAnt | Gets or sets a boolean that indicates if during the simulation process forward ants are generates automatically.
GetAntNodeEnumerator | Returns an enumerator over all available ants
GetLayer | Gets the piccolo drawing layer.
RoutingNodes | Determines the number of routing nodes.

Public Instance Methods

CalculateShortestPaths |
CreateAntNetwork |
CreateAntNode | Creates and ant node and adds it to the managed collection.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetAntLink | Attempts to retrieve the ant link for a specified road.
GetAntNode | Gets an AntNode from the collection of ant nodes.
GetAntNodesInColony | Gets the list of all nodes in the current colony.
GetAntNodesOfSector | Gets all nodes of the specified sector.
GetDijkstraRoutingTable | Retrieves the routing table associated with the specified id.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNodeSectorMemberships | Gets the collection of sector to which the specified node belongs.
GetObjectData | Populates a SerializationInfo with the data needed to serialize the target object.
GetType (inherited from Object) | Gets the Type of the current instance.
InitializeAntNetwork |
IsNodeMemberOfSector | Determines if the specified node is a member of the specified sector.
RegisterSurrogate | Registers a surrogate with the specified surrogate selector
RemoveAntNode | Removes an node from the managed collection of ant nodes.
Reset | Resets the routing subsystem.
ResetAntNetwork | Resets the ant network by clearing all nodes and routing tables.
ResetDijkstra | Resets all dijkstra routing related objects
SetColoniesProbabilities | Sets default probabilities in the specified ant node for the given. colony.
SetDefaultProbalities | Sets default probabilities in the ant tables according to dijkstra's results.
SetObjectData | Populates the singleton with the data stored in the SerializationInfo class.
TextDumpAntLinks | Dumps all ant link delay information to file.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem Properties

The properties of the RoutingSystem class are listed below. For a complete list of RoutingSystem class members, see the RoutingSystem Members topic.

Public Instance Properties

AntNodes | Gets the total number of ant nodes in the routing system.
Colonies | Returns the number of sectors in the ant network.
GenerateForwardAnt | Gets or sets a boolean that indicates if during the simulation process forward ants are generates automatically.
GetAntNodeEnumerator | Returns an enumerator over all available ants
GetLayer | Gets the piccolo drawing layer.
RoutingNodes | Determines the number of routing nodes.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


AntNodes Property

City Based Parking and Routing System API Documentation

RoutingSystem.AntNodes Property

Gets the total number of ant nodes in the routing system.

public int AntNodes {get;}

See Also

RoutingSystem Class | CBPRS.Routing Namespace


Colonies Property

City Based Parking and Routing System API Documentation

RoutingSystem.Colonies Property

Returns the number of sectors in the ant network.

public int Colonies {get;}

See Also

RoutingSystem Class | CBPRS.Routing Namespace


GenerateForwardAnt Property

City Based Parking and Routing System API Documentation

RoutingSystem.GenerateForwardAnt Property

Gets or sets a boolean that indicates if during the simulation process forward ants are generates automatically.

public bool GenerateForwardAnt {get; set;}

See Also

RoutingSystem Class | CBPRS.Routing Namespace


GetAntNodeEnumerator Property

City Based Parking and Routing System API Documentation

RoutingSystem.GetAntNodeEnumerator Property

Returns an enumerator over all available ants

public AntNode, CBPRS.Routing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] GetAntNodeEnumerator {get;}

See Also

RoutingSystem Class | CBPRS.Routing Namespace


GetLayer Property

City Based Parking and Routing System API Documentation

RoutingSystem.GetLayer Property

Gets the piccolo drawing layer.

public UMD.HCIL.Piccolo.PLayer GetLayer {get;}

Implements

ISubSystem.GetLayer

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingNodes Property

City Based Parking and Routing System API Documentation

RoutingSystem.RoutingNodes Property

Determines the number of routing nodes.

public int RoutingNodes {get;}

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem Methods

The methods of the RoutingSystem class are listed below. For a complete list of RoutingSystem class members, see the RoutingSystem Members topic.

Public Static Methods

GetInstance Singleton accessor

Public Instance Methods

CalculateShortestPaths |
CreateAntNetwork |
CreateAntNode | Creates and ant node and adds it to the managed collection.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetAntLink | Attempts to retrieve the ant link for a specified road.
GetAntNode | Gets an AntNode from the collection of ant nodes.
GetAntNodesInColony | Gets the list of all nodes in the current colony.
GetAntNodesOfSector | Gets all nodes of the specified sector.
GetDijkstraRoutingTable | Retrieves the routing table associated with the specified id.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetNodeSectorMemberships | Gets the collection of sector to which the specified node belongs.
GetObjectData | Populates a SerializationInfo with the data needed to serialize the target object.
GetType (inherited from Object) | Gets the Type of the current instance.
InitializeAntNetwork |
IsNodeMemberOfSector | Determines if the specified node is a member of the specified sector.
RegisterSurrogate | Registers a surrogate with the specified surrogate selector
RemoveAntNode | Removes an node from the managed collection of ant nodes.
Reset | Resets the routing subsystem.
ResetAntNetwork | Resets the ant network by clearing all nodes and routing tables.
ResetDijkstra | Resets all dijkstra routing related objects
SetColoniesProbabilities | Sets default probabilities in the specified ant node for the given. colony.
SetDefaultProbalities | Sets default probabilities in the ant tables according to dijkstra's results.
SetObjectData | Populates the singleton with the data stored in the SerializationInfo class.
TextDumpAntLinks | Dumps all ant link delay information to file.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.CalculateShortestPaths Method

public bool CalculateShortestPaths(
0, Culture=neutral, PublicKeyToken=null]] intersections
);

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.CreateAntNetwork Method

public bool CreateAntNetwork(
0, Culture=neutral, PublicKeyToken=null]] intersections
);

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.CreateAntNode Method

Creates and ant node and adds it to the managed collection.

public AntNode CreateAntNode(
int id
);

Parameters

id
The id of the new ant node.

Return Value

An new AntNode object with the specified id associated.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetAntLink Method

Attempts to retrieve the ant link for a specified road.

public AntLink GetAntLink(
int id
);

Parameters

id
The id of the road for which to retrieve the ant link.

Return Value

The AntLink is found; Ohterwise, null.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetAntNode Method

Gets an AntNode from the collection of ant nodes.

public AntNode GetAntNode(
int id
);

Parameters

id
The id of the ant node.

Return Value

The antnode object.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetAntNodesInColony Method

Gets the list of all nodes in the current colony.

public 0, Culture=neutral, PublicKeyToken=null]] GetAntNodesInColony(
int colonyId
);

Parameters

colonyId
The colony id for which to retrieve the nodes.

Return Value

The list containing all ant nodes of the specified colonyId.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetAntNodesOfSector Method

Gets all nodes of the specified sector.

public 0, Culture=neutral, PublicKeyToken=null]] GetAntNodesOfSector(
int sector
);

Parameters

sector
The id of the sector.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetDijkstraRoutingTable Method

Retrieves the routing table associated with the specified id.

public DijkstraRoutingTable GetDijkstraRoutingTable(
int id
);

Parameters

id
The node id of the intersection to which the routing table is associated.

Return Value

A Routing table if one is associated with the id; Otherwise, null

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetInstance Method

Singleton accessor

public static RoutingSystem GetInstance();

Return Value

The unique routing instance object.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetNodeSectorMemberships Method

Gets the collection of sector to which the specified node belongs.

public int[] GetNodeSectorMemberships(
int node
);

Parameters

node
The node id of the node to query.

Return Value

An array of uints containing the sectors to which the node belongs.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.GetObjectData Method

Populates a SerializationInfo with the data needed to serialize the target object.

public void GetObjectData(
SerializationInfo info,
StreamingContext context
);

Implements

ISubSystem.GetObjectData

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.InitializeAntNetwork Method

public bool InitializeAntNetwork(
0, Culture=neutral, PublicKeyToken=null]] intersections
);

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.IsNodeMemberOfSector Method

Determines if the specified node is a member of the specified sector.

public bool IsNodeMemberOfSector(
int node,
int sector
);

Parameters

node
The node id.
sector
The sector id.

Return Value

True if the node lies within the specified sector; Ohterwise, false.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.RegisterSurrogate Method

Registers a surrogate with the specified surrogate selector

public void RegisterSurrogate(
SurrogateSelector selector
);

Parameters

selector
The global surrogate selector

Implements

ISubSystem.RegisterSurrogate

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.RemoveAntNode Method

Removes an node from the managed collection of ant nodes.

public bool RemoveAntNode(
int id
);

Parameters

id
The id of the ant node to remove.

Return Value

True if the ant node was sucessfully removed; Otherwise, false

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.Reset Method

Resets the routing subsystem.

public void Reset();

Implements

ISubSystem.Reset

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.ResetAntNetwork Method

Resets the ant network by clearing all nodes and routing tables.

public void ResetAntNetwork();

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.ResetDijkstra Method

Resets all dijkstra routing related objects

public void ResetDijkstra();

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.SetColoniesProbabilities Method

Sets default probabilities in the specified ant node for the given. colony.

public void SetColoniesProbabilities(
AntNode CurrentNode,
int Colony
);

Parameters

CurrentNode
The node for which to set default probabilities.
Colony
The colony for which to set default probabilities.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.SetDefaultProbalities Method

Sets default probabilities in the ant tables according to dijkstra's results.

public bool SetDefaultProbalities();

Return Value

True if probabilities where set; Otherwise, false.

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.SetObjectData Method

Populates the singleton with the data stored in the SerializationInfo class.

public void SetObjectData(
SerializationInfo info,
StreamingContext context
);

Implements

ISubSystem.SetObjectData

See Also

RoutingSystem Class | CBPRS.Routing Namespace


RoutingSystem.TextDumpAntLinks Method

Dumps all ant link delay information to file.

public void TextDumpAntLinks(
Stream output,
string seperator
);

Parameters

output
seperator

See Also

RoutingSystem Class | CBPRS.Routing Namespace


CBPRS.Routing.Surrogates

City Based Parking and Routing System API Documentation

CBPRS.Routing.Surrogates Namespace

Namespace hierarchy

Classes

Class | Description
RoutingSurrogate | Surrogate class for RoutingSystem de- / serialization.


RoutingSurrogate Class

Surrogate class for RoutingSystem de- / serialization.

For a list of all members of this type, see RoutingSurrogate Members.

System.Object
CBPRS.Routing.Surrogates.RoutingSurrogate

public sealed class RoutingSurrogate : ISerializationSurrogate

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: CBPRS.Routing.Surrogates

Assembly: CBPRS.Routing (in CBPRS.Routing.dll)

See Also

RoutingSurrogate Members | CBPRS.Routing.Surrogates Namespace


RoutingSurrogate Members

RoutingSurrogate overview

Public Instance Constructors

RoutingSurrogate Constructor Initializes a new instance of the RoutingSurrogate class.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetObjectData | Populates a SerializationInfo with the data needed to serialize the target object.
GetType (inherited from Object) | Gets the Type of the current instance.
SetObjectData | Populates the singleton with the data stored in the SerializationInfo class.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

RoutingSurrogate Class | CBPRS.Routing.Surrogates Namespace


RoutingSurrogate Constructor

Initializes a new instance of the RoutingSurrogate class.

public RoutingSurrogate();

See Also

RoutingSurrogate Class | CBPRS.Routing.Surrogates Namespace


RoutingSurrogate Methods

The methods of the RoutingSurrogate class are listed below. For a complete list of RoutingSurrogate class members, see the RoutingSurrogate Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetObjectData | Populates a SerializationInfo with the data needed to serialize the target object.
GetType (inherited from Object) | Gets the Type of the current instance.
SetObjectData | Populates the singleton with the data stored in the SerializationInfo class.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

RoutingSurrogate Class | CBPRS.Routing.Surrogates Namespace


RoutingSurrogate.GetObjectData Method

Populates a SerializationInfo with the data needed to serialize the target object.

public void GetObjectData(
object obj,
SerializationInfo info,
StreamingContext context
);

Implements

ISerializationSurrogate.GetObjectData

See Also

RoutingSurrogate Class | CBPRS.Routing.Surrogates Namespace


RoutingSurrogate.SetObjectData Method

Populates the singleton with the data stored in the SerializationInfo class.

public object SetObjectData(
object obj,
SerializationInfo info,
StreamingContext context,
ISurrogateSelector selector
);

Return Value

A reference to the RoutingSystem class.

Implements

ISerializationSurrogate.SetObjectData

See Also

RoutingSurrogate Class | CBPRS.Routing.Surrogates Namespace


CBPRS.Routing.SurrogatesHierarchy

City Based Parking and Routing System API Documentation

CBPRS.Routing.Surrogates Hierarchy

System.Object
CBPRS.Routing.Surrogates.RoutingSurrogate ---- System.Runtime.Serialization.ISerializationSurrogate

See Also

CBPRS.Routing.Surrogates Namespace


CBPRS.RoutingHierarchy

City Based Parking and Routing System API Documentation

CBPRS.Routing Hierarchy

System.Object
CBPRS.Infrastructure.Route ---- CBPRS.Infrastructure.IRoute
CBPRS.Routing.AntRoute
CBPRS.Infrastructure.Vehicle ---- CBPRS.Infrastructure.IVehicle, CBPRS.Simulation.ISimObject
CBPRS.Routing.AntVehicle
CBPRS.Routing.DijkstraVehicle
CBPRS.Routing.AntLink
CBPRS.Routing.AntNode ---- CBPRS.Simulation.ISimObject
CBPRS.Routing.AntRouteEntry
CBPRS.Routing.AntRoutingTable
CBPRS.Routing.BackwardAnt ---- CBPRS.Routing.IAnt
CBPRS.Routing.BackwardExploringAnt ---- CBPRS.Routing.IAnt
CBPRS.Routing.Dijkstra
CBPRS.Routing.DijkstraNode
CBPRS.Routing.DijkstraRoutingTable
CBPRS.Routing.ForwardAnt ---- CBPRS.Routing.IAnt
CBPRS.Routing.ForwardExploringAnt ---- CBPRS.Routing.IAnt
CBPRS.Routing.IAnt
CBPRS.Routing.NodeInfo
CBPRS.Routing.RoutingSystem ---- CBPRS.Simulation.ISubSystem
System.ValueType
CBPRS.Routing.ColonyInfo
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
CBPRS.Routing.AntNodeTypes

See Also

CBPRS.Routing Namespace