@@ -26,7 +26,7 @@ namespace dsf::mobility {
2626 int m_capacity;
2727 double m_transportCapacity;
2828 std::string m_name;
29- int m_priority ;
29+ bool m_hasPriority = false ;
3030 std::set<Id> m_forbiddenTurns; // Stores the forbidden turns (road ids)
3131 std::optional<RoadType> m_roadType{std::nullopt };
3232
@@ -70,9 +70,8 @@ namespace dsf::mobility {
7070 // / @param transportCapacity The transport capacity
7171 // / @throws std::invalid_argument If the transport capacity is less or equal to 0
7272 void setTransportCapacity (double transportCapacity);
73- // / @brief Set the road's priority
74- // / @param priority The road's priority
75- void setPriority (int priority);
73+ // / @brief Set the road's priority to true
74+ inline void setPriority () { m_hasPriority = true ; }
7675 // / @brief Add a road id to the forbidden turns
7776 // / @param roadId The road id to add
7877 void addForbiddenTurn (Id roadId);
@@ -102,8 +101,8 @@ namespace dsf::mobility {
102101 // / @return std::string The name
103102 inline auto const & name () const noexcept { return m_name; }
104103 // / @brief Get the priority
105- // / @return int The priority
106- inline auto priority () const noexcept { return m_priority ; }
104+ // / @return bool Whether the road has priority
105+ inline auto hasPriority () const noexcept { return m_hasPriority ; }
107106 // / @brief Get the road's forbidden turns
108107 // / @return std::set<Id> The road's forbidden turns
109108 // / @details The forbidden turns are the road ids that are not allowed to be used by the agents
0 commit comments