Skip to content

Conversation

@Grufoony
Copy link
Collaborator

No description provided.

const auto& street{this->m_graph.streetSet()[agent->streetId().value()]};
double speed{street->maxSpeed() *
(1. - this->m_minSpeedRateo * street->normDensity())};
(1. - this->m_minSpeedRateo * street->density(true))};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule

double Street::density(bool normalized) const {
return normalized ? nAgents() / static_cast<double>(m_capacity)
: nAgents() / (m_len * m_nLanes);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 10.4 rule Note

MISRA 10.4 rule
/// @brief Get the street's normalized density
/// @return double, The street's normalized density
double normDensity() const { return nAgents() / static_cast<double>(m_capacity); }
double density(bool normalized = false) const;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 13.4 rule Note

MISRA 13.4 rule
/// @brief Get the street's normalized density
/// @return double, The street's normalized density
double normDensity() const { return nAgents() / static_cast<double>(m_capacity); }
double density(bool normalized = false) const;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.8 rule Note

MISRA 17.8 rule
@Grufoony Grufoony merged commit 362e2c5 into main Nov 15, 2024
24 checks passed
@Grufoony Grufoony deleted the rework_streetDensity branch November 15, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants