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

Method GetStepCounter

Core/KernelSML/src/sml_OldRunScheduler.cpp:125–142  ·  view source on GitHub ↗

* @brief Agents maintain a number of counters (for how many phase, * decisions etc.) they have ever executed. * We use these counters to determine when a run should stop. *********************************************************************/

Source from the content-addressed store, hash-verified

123* We use these counters to determine when a run should stop.
124*********************************************************************/
125unsigned long RunScheduler::GetStepCounter(gSKI::IAgent* pAgent, egSKIRunType runStepSize)
126{
127 switch (runStepSize)
128 {
129 case gSKI_RUN_SMALLEST_STEP:
130 return pAgent->GetNumSmallestStepsExecuted();
131 case gSKI_RUN_PHASE:
132 return pAgent->GetNumPhasesExecuted();
133 case gSKI_RUN_ELABORATION_CYCLE:
134 return pAgent->GetNumElaborationsExecuted();
135 case gSKI_RUN_DECISION_CYCLE:
136 return pAgent->GetNumDecisionCyclesExecuted();
137 case gSKI_RUN_UNTIL_OUTPUT:
138 return pAgent->GetNumOutputsExecuted();
139 default:
140 return 0;
141 }
142}
143
144unsigned long RunScheduler::GetStepCounter(gSKI::IAgent* pAgent, egSKIInterleaveType stepSize)
145{

Callers

nothing calls this directly

Tested by

no test coverage detected