MCPcopy Create free account
hub / github.com/SoarGroup/Soar / InitializeRunCounters

Method InitializeRunCounters

Core/KernelSML/src/sml_RunScheduler.cpp:333–347  ·  view source on GitHub ↗

The gSKI_Agent counters will maintain global values. The counters in SML are used locally within a single call to RunScheduledAgents

Source from the content-addressed store, hash-verified

331// The gSKI_Agent counters will maintain global values. The counters in SML
332// are used locally within a single call to RunScheduledAgents
333void RunScheduler::InitializeRunCounters(smlRunStepSize runStepSize)
334{
335 for (AgentMapIter iter = m_pKernelSML->m_AgentMap.begin() ; iter != m_pKernelSML->m_AgentMap.end() ; iter++)
336 {
337 AgentSML* pAgentSML = iter->second ;
338
339 if (pAgentSML->IsAgentScheduledToRun())
340 {
341 pAgentSML->ResetLastOutputCount() ;
342 uint64_t count = pAgentSML->GetRunCounter(runStepSize) ;
343 pAgentSML->SetInitialRunCount(count) ;
344 pAgentSML->ResetLocalRunCounters() ;
345 }
346 }
347}
348/********************************************************************
349* @brief Certain events are designed to fire "after the agents have done useful work".
350* We use these to update the environment.

Callers

nothing calls this directly

Calls 3

endMethod · 0.80
ResetLastOutputCountMethod · 0.80
GetRunCounterMethod · 0.45

Tested by

no test coverage detected