| 25 | using namespace sml; |
| 26 | |
| 27 | bool CommandLineInterface::DoWMA(const char pOp, const std::string* pAttr, const std::string* pVal) |
| 28 | { |
| 29 | agent* thisAgent = m_pAgentSML->GetSoarAgent(); |
| 30 | if (!pOp) |
| 31 | { |
| 32 | std::string temp; |
| 33 | char* temp2; |
| 34 | |
| 35 | if (m_RawOutput) |
| 36 | { |
| 37 | m_Result << "\n"; |
| 38 | } |
| 39 | else |
| 40 | { |
| 41 | AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, ""); |
| 42 | } |
| 43 | |
| 44 | temp = "WMA activation: "; |
| 45 | temp2 = thisAgent->wma_params->activation->get_string(); |
| 46 | temp += temp2; |
| 47 | delete temp2; |
| 48 | if (m_RawOutput) |
| 49 | { |
| 50 | m_Result << temp << "\n\n"; |
| 51 | } |
| 52 | else |
| 53 | { |
| 54 | AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, temp.c_str()); |
| 55 | AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, ""); |
| 56 | } |
| 57 | |
| 58 | temp = "Activation"; |
| 59 | if (m_RawOutput) |
| 60 | { |
| 61 | m_Result << temp << "\n"; |
| 62 | } |
| 63 | else |
| 64 | { |
| 65 | AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, temp.c_str()); |
| 66 | } |
| 67 | temp = "----------"; |
| 68 | if (m_RawOutput) |
| 69 | { |
| 70 | m_Result << temp << "\n"; |
| 71 | } |
| 72 | else |
| 73 | { |
| 74 | AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, temp.c_str()); |
| 75 | } |
| 76 | |
| 77 | temp = "decay-rate: "; |
| 78 | temp2 = thisAgent->wma_params->decay_rate->get_string(); |
| 79 | temp += temp2; |
| 80 | delete temp2; |
| 81 | if (m_RawOutput) |
| 82 | { |
| 83 | m_Result << temp << "\n"; |
| 84 | } |
no test coverage detected