File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1616#include " ../utility/Logger.hpp"
1717#include " ../utility/Typedef.hpp"
1818
19+ #include < cassert>
1920#include < concepts>
2021#include < limits>
2122#include < optional>
@@ -103,7 +104,7 @@ namespace dsm {
103104 Id id () const { return m_id; }
104105 // / @brief Get the agent's itinerary
105106 // / @return The agent's itinerary
106- Id itineraryId () const { return m_trip[m_itineraryIdx]; }
107+ Id itineraryId () const ;
107108 // / @brief Get the agent's trip
108109 // / @return The agent's trip
109110 std::vector<Id> const & trip () const { return m_trip; }
@@ -155,6 +156,13 @@ namespace dsm {
155156 m_time{0 },
156157 m_itineraryIdx{0 } {}
157158
159+ template <typename delay_t >
160+ requires (is_numeric_v<delay_t >)
161+ Id Agent<delay_t >::itineraryId() const {
162+ assert (m_itineraryIdx < m_trip.size ());
163+ return m_trip[m_itineraryIdx];
164+ }
165+
158166 template <typename delay_t >
159167 requires (is_numeric_v<delay_t >)
160168 void Agent<delay_t >::setSpeed(double speed) {
You can’t perform that action at this time.
0 commit comments