| 152 | } |
| 153 | |
| 154 | bool loadOptions(const CLI::App& app, const HighsLogOptions& report_log_options, |
| 155 | const HighsCommandLineOptions& c, HighsOptions& options) { |
| 156 | if (c.cmd_version || c.cmd_notice) { |
| 157 | std::cout << "HiGHS version " << HIGHS_VERSION_MAJOR << "." |
| 158 | << HIGHS_VERSION_MINOR << "." << HIGHS_VERSION_PATCH; |
| 159 | std::cout << " Githash " << HIGHS_GITHASH << ". "; |
| 160 | std::cout << kHighsCopyrightStatement << std::endl; |
| 161 | std::cout << HighsExternalApi::thirdPartyNoticeHeader() << std::endl; |
| 162 | |
| 163 | if (c.cmd_notice) { |
| 164 | std::cout << std::endl |
| 165 | << HighsExternalApi::getThirdPartyNotice<HighsExtras::appAll>() |
| 166 | << std::endl; |
| 167 | } |
| 168 | |
| 169 | exit(0); |
| 170 | } |
| 171 | |
| 172 | // Options file. |
| 173 | if (c.options_file != "") { |
| 174 | switch (loadOptionsFromFile(report_log_options, options, c.options_file)) { |
| 175 | case HighsLoadOptionsStatus::kError: |
| 176 | return false; |
| 177 | case HighsLoadOptionsStatus::kEmpty: |
| 178 | writeOptionsToFile(stdout, options.log_options, options.records); |
| 179 | return false; |
| 180 | default: |
| 181 | break; |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | // Read solution file option. |
| 186 | if (c.cmd_read_solution_file != "") { |
| 187 | if (setLocalOptionValue(report_log_options, kReadSolutionFileString, |
| 188 | options.log_options, options.records, |
| 189 | c.cmd_read_solution_file) != OptionStatus::kOk) |
| 190 | return false; |
| 191 | } |
| 192 | |
| 193 | // Read basis file option. |
| 194 | if (c.cmd_read_basis_file != "") { |
| 195 | if (setLocalOptionValue(report_log_options, kReadBasisFileString, |
| 196 | options.log_options, options.records, |
| 197 | c.cmd_read_basis_file) != OptionStatus::kOk) |
| 198 | return false; |
| 199 | } |
| 200 | |
| 201 | // Write model file option. |
| 202 | if (c.cmd_write_model_file != "") { |
| 203 | if (setLocalOptionValue(report_log_options, kWriteModelFileString, |
| 204 | options.log_options, options.records, |
| 205 | c.cmd_write_model_file) != OptionStatus::kOk) |
| 206 | return false; |
| 207 | } |
| 208 | |
| 209 | // Write solution file option. |
| 210 | if (c.cmd_write_solution_file != "") { |
| 211 | if (setLocalOptionValue(report_log_options, kWriteSolutionFileString, |
no test coverage detected