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

Function getLocalOptionValues

highs/lp_data/HighsOptions.cpp:834–855  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834OptionStatus getLocalOptionValues(
835 const HighsLogOptions& report_log_options, const std::string& option,
836 const std::vector<OptionRecord*>& option_records, bool* current_value,
837 bool* default_value) {
838 HighsInt index;
839 OptionStatus status =
840 getOptionIndex(report_log_options, option, option_records, index);
841 if (status != OptionStatus::kOk) return status;
842 HighsOptionType type = option_records[index]->type;
843 if (type != HighsOptionType::kBool) {
844 highsLogUser(report_log_options, HighsLogType::kError,
845 "getLocalOptionValue: Option \"%s\" requires value of type "
846 "%s, not bool\n",
847 option.c_str(), optionEntryTypeToString(type).c_str());
848 return OptionStatus::kIllegalValue;
849 }
850 OptionRecordBool& option_record =
851 ((OptionRecordBool*)option_records[index])[0];
852 if (current_value) *current_value = *(option_record.value);
853 if (default_value) *default_value = option_record.default_value;
854 return OptionStatus::kOk;
855}
856
857OptionStatus getLocalOptionValues(
858 const HighsLogOptions& report_log_options, const std::string& option,

Callers 5

getBoolOptionValuesMethod · 0.85
getIntOptionValuesMethod · 0.85
getDoubleOptionValuesMethod · 0.85
getStringOptionValuesMethod · 0.85
TestOptions.cppFile · 0.85

Calls 4

getOptionIndexFunction · 0.85
highsLogUserFunction · 0.85
optionEntryTypeToStringFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected