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

Method writeOptions

highs/lp_data/Highs.cpp:210–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210HighsStatus Highs::writeOptions(const std::string& filename,
211 const bool report_only_deviations) {
212 this->logHeader();
213 HighsStatus return_status = HighsStatus::kOk;
214 FILE* file;
215 HighsFileType file_type;
216 return_status = interpretCallStatus(
217 options_.log_options,
218 openWriteFile(filename, "writeOptions", file, file_type), return_status,
219 "openWriteFile");
220 if (return_status == HighsStatus::kError) return return_status;
221 if (filename == "") file_type = HighsFileType::kMinimal;
222 // Report to user that options are being written to a file
223 if (filename != "")
224 highsLogUser(options_.log_options, HighsLogType::kInfo,
225 "Writing the option values to %s\n", filename.c_str());
226 return_status = interpretCallStatus(
227 options_.log_options,
228 writeOptionsToFile(file, options_.log_options, options_.records,
229 report_only_deviations, file_type),
230 return_status, "writeOptionsToFile");
231 if (file != stdout) fclose(file);
232 return return_status;
233}
234
235// HighsStatus Highs::getOptionType(const char* option, HighsOptionType* type)
236// const { return getOptionType(option, type);}

Callers 3

mainFunction · 0.45
highs_writeOptionsFunction · 0.45
TestOptions.cppFile · 0.45

Calls 5

logHeaderMethod · 0.95
interpretCallStatusFunction · 0.85
highsLogUserFunction · 0.85
writeOptionsToFileFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected