Skip to content

Conversation

@Grufoony
Copy link
Collaborator

No description provided.

/// @param pItinerary An std::unique_prt to the itinerary
void m_updatePath(const std::unique_ptr<Itinerary>& pItinerary) {
auto const& file = std::format("{}it{}.dsmcache", g_cacheFolder, pItinerary->id());
if (std::filesystem::exists(file)) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
}
}

template <typename agent_t>

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
/// @param seed The seed for the random number generator (default is std::nullopt)
/// @param alpha The minimum speed rate (default is 0)
explicit FirstOrderDynamics(Graph& graph,
bool useCache = false,

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.8 rule Note

MISRA 17.8 rule
/// @param useCache If true, the cache is used (default is false)
/// @param seed The seed for the random number generator (default is std::nullopt)
RoadDynamics(Graph& graph,
bool useCache = false,

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.8 rule Note

MISRA 17.8 rule
RoadDynamics<delay_t>::RoadDynamics(Graph& graph,
bool useCache,
std::optional<unsigned int> seed)
: Dynamics<Agent<delay_t>>(graph, useCache, seed),

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
std::optional<unsigned int> seed,
double alpha)
: RoadDynamics<Delay>(graph, seed), m_alpha{alpha}, m_speedFluctuationSTD{0.} {
: RoadDynamics<Delay>(graph, useCache, seed),

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
double alpha)
: RoadDynamics<Delay>(graph, seed), m_alpha{alpha}, m_speedFluctuationSTD{0.} {
: RoadDynamics<Delay>(graph, useCache, seed),
m_alpha{alpha},

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
dynamics.evolve(false);
dynamics.evolve(false);
THEN("The agent has travelled the correct distance") {
CHECK_EQ(dynamics.agents().at(0)->time(), 8);

Check notice

Code scanning / Cppcheck (reported by Codacy)

time is Y2038-unsafe Note test

time is Y2038-unsafe
@Grufoony Grufoony merged commit f3a8393 into main Jan 31, 2025
16 checks passed
@Grufoony Grufoony deleted the pathCaching branch January 31, 2025 11:59
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