Traffic Flow Dynamics Model
VehicleType Class Reference

VehicleType class. More...

#include <VehicleType.hpp>

Public Member Functions

 VehicleType (int, int)
 Create a new VehicleType object. More...
 
uint16_t getSource () const noexcept
 Get the source node index. More...
 
uint16_t getDestination () const noexcept
 Get the destination node index. More...
 
void setTransMatrix (SparseMatrix< double > &)
 set the transition matrix More...
 
SparseMatrix< double > const & getTransMatrix () const
 Get the transition matrix. More...
 

Detailed Description

VehicleType class.

This class is used to represent a vehicle type. It contains the source and destination nodes, and the transition matrix.

Constructor & Destructor Documentation

◆ VehicleType()

VehicleType::VehicleType ( int  src,
int  dst 
)

Create a new VehicleType object.

Parameters
srcThe source node.
dstThe destination node.

Member Function Documentation

◆ getDestination()

uint16_t VehicleType::getDestination ( ) const
noexcept

Get the destination node index.

Returns
The destination node index.

◆ getSource()

uint16_t VehicleType::getSource ( ) const
noexcept

Get the source node index.

Returns
The source node index.

◆ getTransMatrix()

SparseMatrix< double > const & VehicleType::getTransMatrix ( ) const

Get the transition matrix.

Returns
The transition matrix.
Exceptions
std::runtime_errorIf the transition matrix is empty.

◆ setTransMatrix()

void VehicleType::setTransMatrix ( SparseMatrix< double > &  matrix)

set the transition matrix

Set the transition matrix.

Parameters
transMatrixThe transition matrix.

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