Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
All911Vertices Class Reference
Inheritance diagram for All911Vertices:
Collaboration diagram for All911Vertices:

Public Member Functions

virtual void setupVertices () override
 
virtual void createAllVertices (Layout &layout)
 
virtual void loadParameters ()
 
virtual void printParameters () const override
 
virtual string toString (int index) const
 
virtual void loadEpochInputsToVertices (uint64_t currentStep, uint64_t endStep) override
 
virtual void registerHistoryVariables () override
 unused virtual function placeholder
 
CircularBuffer< Call > & getQueue (int vIdx)
 
int & droppedCalls (int vIdx)
 
int & receivedCalls (int vIdx)
 
int busyServers (int vIdx) const
 
virtual void advanceVertices (AllEdges &edges, const EdgeIndexMap &edgeIndexMap) override
 Update internal state of the indexed vertex (called by every simulation step).
 
virtual void integrateVertexInputs (AllEdges &edges, EdgeIndexMap &edgeIndexMap) override
 
- Public Member Functions inherited from AllVertices
void loadEpochInputs (uint64_t currentStep, uint64_t endStep)
 
template<class Archive >
void serialize (Archive &archive)
 Cereal serialization method.
 

Static Public Member Functions

static AllVerticesCreate ()
 

Public Attributes

vector< int > vertexType_
 Index each vertex and record it's type.
 
vector< EventBuffer< uint64_t > > beginTimeHistory_
 The starting time for every call.
 
vector< EventBuffer< uint64_t > > answerTimeHistory_
 The answer time for every call.
 
vector< EventBuffer< uint64_t > > endTimeHistory_
 The end time for every call.
 
vector< EventBuffer< uint64_t > > wasAbandonedHistory_
 True if the call was abandoned.
 
vector< EventBuffer< uint64_t > > queueLengthHistory_
 The length of the waiting queue at every time-step.
 
vector< EventBuffer< float > > utilizationHistory_
 The portion of servers that are busy at every time-step.
 
vector< CircularBuffer< Call > > vertexQueues_
 These are the queues where calls will wait to be served.
 
RecordableVector< int > droppedCalls_
 The number of calls that have been dropped (got a busy signal)
 
RecordableVector< int > receivedCalls_
 The number of received calls.
 
vector< int > busyServers_
 Number of servers currently serving calls.
 
int maxNumberOfServers_
 
RecordableVector< int > numServers_
 
RecordableVector< int > numTrunks_
 Number of phone lines available. Only valid for PSAPs and Responders.
 
BGFLOAT redialP_
 The probability that a caller will redial after receiving the busy signal.
 
BGFLOAT avgDrivingSpeed_
 The average driving speed of a response unit in mph.
 
vector< vector< Call > > servingCall_
 Holds the calls being served by each server.
 
vector< vector< uint64_t > > answerTime_
 The time that the call being served was answered by the server.
 
vector< vector< int > > serverCountdown_
 The countdown until the server is available to take another call.
 
InputManager< CallinputManager_
 The InputManager holds all the Input Events for the simulation.
 
vector< int > vertexIdToNoiseIndex_
 

Protected Member Functions

BGSIZE getEdgeToClosestResponder (const Call &call, BGSIZE vertexIdx)
 

Protected Attributes

int numberOfVerticesNeedingDeviceNoise_
 
- Protected Attributes inherited from AllVertices
int size_
 Total number of vertices.
 
log4cplus::Logger fileLogger_
 
log4cplus::Logger vertexLogger_
 TODO: Should check to see if this file name "neurons" is hardcoded and change it to vertices.
 

Friends

class Xml911Recorder
 

Detailed Description

Definition at line 81 of file All911Vertices.h.

Member Function Documentation

◆ advanceVertices()

void All911Vertices::advanceVertices ( AllEdges & edges,
const EdgeIndexMap & edgeIndexMap )
overridevirtual

Update internal state of the indexed vertex (called by every simulation step).

Update internal state of the indexed Vertex (called by every simulation step). Notify outgoing edges if vertex has fired.

Parameters
edgesThe Edge list to search from.
edgeIndexMapReference to the EdgeIndexMap.
edgesReference to the allEdges struct on host memory.
allVerticesDeviceGPU address of the allVerticesDeviceProperties struct on device memory.
allEdgesDeviceGPU address of the allEdgesDeviceProperties struct on device memory.
randNoise
edgeIndexMapDeviceGPU address of the EdgeIndexMap on device memory.

Implements AllVertices.

Definition at line 309 of file All911Vertices.cpp.

◆ busyServers()

int All911Vertices::busyServers ( int vIdx) const

Accessor for the number of busy servers in a given vertex

Parameters
vIdxThe index of the vertex
Returns
The number of busy servers in the given vertex

Definition at line 229 of file All911Vertices.cpp.

◆ Create()

static AllVertices * All911Vertices::Create ( )
inlinestatic

Creates an instance of the class.

Returns
Reference to the instance of the class.

Definition at line 93 of file All911Vertices.h.

◆ createAllVertices()

void All911Vertices::createAllVertices ( Layout & layout)
virtual

Creates all the Vertices and assigns initial data for them.

Parameters
layoutLayout information of the network.

Implements AllVertices.

Definition at line 56 of file All911Vertices.cpp.

◆ droppedCalls()

int & All911Vertices::droppedCalls ( int vIdx)

Accessor for the droppedCalls counter of a vertex

Parameters
vIdxThe index of the vertex
Returns
A reference to the droppedCalls counter of the vertex

Definition at line 217 of file All911Vertices.cpp.

◆ getEdgeToClosestResponder()

BGSIZE All911Vertices::getEdgeToClosestResponder ( const Call & call,
BGSIZE vertexIdx )
protected

Finds the outgoing edge from the given vertex to the Responder closest to the emergency call location

Parameters
callThe call that needs a Responder
vertexIdxThe index of the vertex serving the call (A PSAP)
Returns
The index of the outgoing edge to the closest Responder

Finds the outgoing edge from the given vertex to the Responder closest to the emergency call location

Definition at line 599 of file All911Vertices.cpp.

◆ getQueue()

CircularBuffer< Call > & All911Vertices::getQueue ( int vIdx)

Accessor for the waiting queue of a vertex

Parameters
vIdxThe index of the vertex
Returns
The waiting queue for the given vertex

Definition at line 211 of file All911Vertices.cpp.

◆ integrateVertexInputs()

void All911Vertices::integrateVertexInputs ( AllEdges & edges,
EdgeIndexMap & edgeIndexMap )
overridevirtual

Performs an integration operation per vertex using the inputs to the vertex.

Parameters
edgesThe edge list to search from.
edgeIndexMapReference to the EdgeIndexMap.

Take a call from an edge and add it to the queue if the queue isn't full.

Parameters
allVerticesDeviceGPU address of the allVertices struct on device memory.
edgeIndexMapDeviceGPU address of the EdgeIndexMap on device memory.
allEdgesDeviceGPU address of the allEdges struct on device memory.

Implements AllVertices.

Definition at line 237 of file All911Vertices.cpp.

◆ loadEpochInputsToVertices()

void All911Vertices::loadEpochInputsToVertices ( uint64_t currentStep,
uint64_t endStep )
overridevirtual

Loads all inputs scheduled to occur in the upcoming epoch. These are inputs occurring in between curStep (inclusive) and endStep (exclusive)

Reimplemented from AllVertices.

Definition at line 152 of file All911Vertices.cpp.

◆ loadParameters()

void All911Vertices::loadParameters ( )
virtual

Load member variables from configuration file. Registered to OperationManager as Operation::loadParameters

Implements AllVertices.

Definition at line 132 of file All911Vertices.cpp.

◆ printParameters()

void All911Vertices::printParameters ( ) const
overridevirtual

Prints out all parameters of the vertices to logging file. Registered to OperationManager as Operation::printParameters

Reimplemented from AllVertices.

Definition at line 140 of file All911Vertices.cpp.

◆ receivedCalls()

int & All911Vertices::receivedCalls ( int vIdx)

Accessor for the receivedCalls counter of a vertex

Parameters
vIdxThe index of the vertex
Returns
A reference to the receivedCalls counter of the vertex

Definition at line 223 of file All911Vertices.cpp.

◆ registerHistoryVariables()

void All911Vertices::registerHistoryVariables ( )
overridevirtual

unused virtual function placeholder

Implements AllVertices.

Definition at line 169 of file All911Vertices.cpp.

◆ setupVertices()

void All911Vertices::setupVertices ( )
overridevirtual

Setup the internal structure of the class. Allocate memories to store all vertices' states.

Reimplemented from AllVertices.

Definition at line 18 of file All911Vertices.cpp.

◆ toString()

string All911Vertices::toString ( int index) const
virtual

Outputs state of the vertex chosen as a string.

Parameters
indexindex of the vertex (in vertices) to output info from.
Returns
the complete state of the vertex.

Implements AllVertices.

Definition at line 145 of file All911Vertices.cpp.

Friends And Related Symbol Documentation

◆ Xml911Recorder

friend class Xml911Recorder
friend

Definition at line 84 of file All911Vertices.h.

Member Data Documentation

◆ answerTime_

vector<vector<uint64_t> > All911Vertices::answerTime_

The time that the call being served was answered by the server.

Definition at line 199 of file All911Vertices.h.

◆ answerTimeHistory_

vector<EventBuffer<uint64_t> > All911Vertices::answerTimeHistory_

The answer time for every call.

Definition at line 158 of file All911Vertices.h.

◆ avgDrivingSpeed_

BGFLOAT All911Vertices::avgDrivingSpeed_

The average driving speed of a response unit in mph.

Definition at line 193 of file All911Vertices.h.

◆ beginTimeHistory_

vector<EventBuffer<uint64_t> > All911Vertices::beginTimeHistory_

The starting time for every call.

Definition at line 156 of file All911Vertices.h.

◆ busyServers_

vector<int> All911Vertices::busyServers_

Number of servers currently serving calls.

Definition at line 178 of file All911Vertices.h.

◆ droppedCalls_

RecordableVector<int> All911Vertices::droppedCalls_

The number of calls that have been dropped (got a busy signal)

Definition at line 172 of file All911Vertices.h.

◆ endTimeHistory_

vector<EventBuffer<uint64_t> > All911Vertices::endTimeHistory_

The end time for every call.

Definition at line 160 of file All911Vertices.h.

◆ inputManager_

InputManager<Call> All911Vertices::inputManager_

The InputManager holds all the Input Events for the simulation.

Definition at line 205 of file All911Vertices.h.

◆ maxNumberOfServers_

int All911Vertices::maxNumberOfServers_

Definition at line 181 of file All911Vertices.h.

◆ numberOfVerticesNeedingDeviceNoise_

int All911Vertices::numberOfVerticesNeedingDeviceNoise_
protected

The number of vertices that needs device noise. Only caller regions need noise for determining redial so this is meant to help save memory. A member variable is used so that we don't have to recompute this value multiple times.

Definition at line 225 of file All911Vertices.h.

◆ numServers_

RecordableVector<int> All911Vertices::numServers_

Number of servers. In a PSAP these are the call takers, in Responder nodes they are responder units

Definition at line 184 of file All911Vertices.h.

◆ numTrunks_

RecordableVector<int> All911Vertices::numTrunks_

Number of phone lines available. Only valid for PSAPs and Responders.

Definition at line 187 of file All911Vertices.h.

◆ queueLengthHistory_

vector<EventBuffer<uint64_t> > All911Vertices::queueLengthHistory_

The length of the waiting queue at every time-step.

Definition at line 164 of file All911Vertices.h.

◆ receivedCalls_

RecordableVector<int> All911Vertices::receivedCalls_

The number of received calls.

Definition at line 175 of file All911Vertices.h.

◆ redialP_

BGFLOAT All911Vertices::redialP_

The probability that a caller will redial after receiving the busy signal.

Definition at line 190 of file All911Vertices.h.

◆ serverCountdown_

vector<vector<int> > All911Vertices::serverCountdown_

The countdown until the server is available to take another call.

Definition at line 202 of file All911Vertices.h.

◆ servingCall_

vector<vector<Call> > All911Vertices::servingCall_

Holds the calls being served by each server.

Definition at line 196 of file All911Vertices.h.

◆ utilizationHistory_

vector<EventBuffer<float> > All911Vertices::utilizationHistory_

The portion of servers that are busy at every time-step.

Definition at line 166 of file All911Vertices.h.

◆ vertexIdToNoiseIndex_

vector<int> All911Vertices::vertexIdToNoiseIndex_

Mapping of the vertex ID to the index in the noise array. Only caller regions need noise for determining if a redial occurs. Caller regions have a value 0 to n where n is the number of caller regions. Non-caller regions have a value of -1.

Definition at line 211 of file All911Vertices.h.

◆ vertexQueues_

vector<CircularBuffer<Call> > All911Vertices::vertexQueues_

These are the queues where calls will wait to be served.

Definition at line 169 of file All911Vertices.h.

◆ vertexType_

vector<int> All911Vertices::vertexType_

Index each vertex and record it's type.

Definition at line 154 of file All911Vertices.h.

◆ wasAbandonedHistory_

vector<EventBuffer<uint64_t> > All911Vertices::wasAbandonedHistory_

True if the call was abandoned.

Definition at line 162 of file All911Vertices.h.


The documentation for this class was generated from the following files: