| 938 | } |
| 939 | |
| 940 | void 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 | |
| 962 | HighsStatus writeOptionsToFile(FILE* file, const HighsLogOptions& log_options, |
| 963 | const std::vector<OptionRecord*>& option_records, |