MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / getLocalRunDataValue

Function getLocalRunDataValue

highs/lp_data/HighsRunData.cpp:68–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67#ifndef HIGHSINT64
68RunDataStatus getLocalRunDataValue(
69 const HighsLogOptions& report_log_options, const std::string& name,
70 const bool valid, const std::vector<RunDataRecord*>& run_data_records,
71 int64_t& value) {
72 HighsInt index;
73 RunDataStatus status =
74 getRunDataIndex(report_log_options, name, run_data_records, index);
75 if (status != RunDataStatus::kOk) return status;
76 if (!valid) return RunDataStatus::kUnavailable;
77 HighsRunDataType type = run_data_records[index]->type;
78 if (type != HighsRunDataType::kInt64) {
79 highsLogUser(report_log_options, HighsLogType::kError,
80 "getRunDataValue: RunData \"%s\" requires value of type %s, "
81 "not int64_t\n",
82 name.c_str(), run_dataEntryTypeToString(type).c_str());
83 return RunDataStatus::kIllegalValue;
84 }
85 RunDataRecordInt64 run_data =
86 ((RunDataRecordInt64*)run_data_records[index])[0];
87 value = *run_data.value;
88 return RunDataStatus::kOk;
89}
90#endif
91
92RunDataStatus getLocalRunDataValue(

Callers 1

getRunDataValueMethod · 0.85

Calls 4

getRunDataIndexFunction · 0.85
highsLogUserFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected