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

Function resetLocalOptions

highs/lp_data/HighsOptions.cpp:940–960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938}
939
940void resetLocalOptions(std::vector<OptionRecord*>& option_records) {
941 HighsInt num_options = option_records.size();
942 for (HighsInt index = 0; index < num_options; index++) {
943 HighsOptionType type = option_records[index]->type;
944 if (type == HighsOptionType::kBool) {
945 OptionRecordBool& option = ((OptionRecordBool*)option_records[index])[0];
946 *(option.value) = option.default_value;
947 } else if (type == HighsOptionType::kInt) {
948 OptionRecordInt& option = ((OptionRecordInt*)option_records[index])[0];
949 *(option.value) = option.default_value;
950 } else if (type == HighsOptionType::kDouble) {
951 OptionRecordDouble& option =
952 ((OptionRecordDouble*)option_records[index])[0];
953 *(option.value) = option.default_value;
954 } else {
955 OptionRecordString& option =
956 ((OptionRecordString*)option_records[index])[0];
957 *(option.value) = option.default_value;
958 }
959 }
960}
961
962HighsStatus writeOptionsToFile(FILE* file, const HighsLogOptions& log_options,
963 const std::vector<OptionRecord*>& option_records,

Callers 1

resetOptionsMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected