Traffic Flow Dynamics Model
VehicleType.hpp
1 #ifndef VEHICLE_TYPE_HPP
2 #define VEHICLE_TYPE_HPP
3 
4 #include "../utils/SparseMatrix.hpp"
5 #include <cstdint>
6 #include <vector>
7 
9 
12 
13 class VehicleType {
14 private:
15  uint16_t _trip[2]; // 0=source, 1=destination
16  SparseMatrix<double> _transMatrix; // transition matrix
17 
18 public:
19  VehicleType(int, int);
20  ~VehicleType() = default;
21 
22  uint16_t getSource() const noexcept;
23  uint16_t getDestination() const noexcept;
25  SparseMatrix<double> const &getTransMatrix() const;
26 };
27 
28 #endif
VehicleType class.
Definition: VehicleType.hpp:13
SparseMatrix< double > const & getTransMatrix() const
Get the transition matrix.
Definition: VehicleType.cpp:36
void setTransMatrix(SparseMatrix< double > &)
set the transition matrix
Definition: VehicleType.cpp:30
VehicleType(int, int)
Create a new VehicleType object.
Definition: VehicleType.cpp:8
uint16_t getSource() const noexcept
Get the source node index.
Definition: VehicleType.cpp:24
uint16_t getDestination() const noexcept
Get the destination node index.
Definition: VehicleType.cpp:27