* @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. *********************************************************************/
| 123 | * We use these counters to determine when a run should stop. |
| 124 | *********************************************************************/ |
| 125 | unsigned 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 | |
| 144 | unsigned long RunScheduler::GetStepCounter(gSKI::IAgent* pAgent, egSKIInterleaveType stepSize) |
| 145 | { |
nothing calls this directly
no test coverage detected