@@ -81,120 +81,83 @@ bool optionOffOnOk(const HighsLogOptions& report_log_options,
8181
8282bool optionSolverOk (const HighsLogOptions& report_log_options,
8383 const string& value) {
84- if (value == kHipoString && !HighsExternalDeps::isAvailable ()) {
85- if (HighsExternalDeps::isAvailableAtCompile ()) {
86- highsLogUser (
87- report_log_options, HighsLogType::kError ,
88- " The HiPO solver was requested via the \" %s\" option, but this build "
89- " was compiled without HiPO support. Reconfigure with FAST_BUILD=ON "
90- " and -DHIPO=ON to enable HiPO.\n " ,
91- kSolverString .c_str ());
92- } else {
93- highsLogUser (
94- report_log_options, HighsLogType::kError ,
95- " The HiPO solver was requested via the \" %s\" option, but the "
96- " HiPO dependencies are missing. Install with highspy[hipo] or "
97- " install "
98- " highspy-extras. Note, that using HiPO changes the HiGHS license "
99- " from "
100- " MIT to Apache, due to the dependencies' licensing.\n " ,
101- kSolverString .c_str ());
102- }
103- return false ;
104- }
10584 if (value == kHighsChooseString || value == kSimplexString ||
10685 value == kIpmString ||
10786 (value == kHipoString && HighsExternalDeps::isAvailable ()) ||
10887 value == kIpxString || value == kPdlpString || value == kQpAsmString ||
10988 value == kHiPdlpString )
11089 return true ;
111- highsLogUser (
112- report_log_options, HighsLogType::kWarning ,
113- " Value \" %s\" for LP solver option (\" %s\" ) is not one of "
114- " %s\" %s\" , \" %s\" , \" %s\" , \" %s\" or \" %s\"\n " ,
115- value.c_str (), kSolverString .c_str (),
116- HighsExternalDeps::isAvailable () ? (kHipoString + " \" , \" " ).c_str () : " " ,
117- kHighsChooseString .c_str (), kSimplexString .c_str (), kIpmString .c_str (),
118- kIpxString .c_str (), kPdlpString .c_str (), kQpAsmString .c_str (),
119- kHiPdlpString .c_str ());
120- return false ;
90+ else if (value == kHipoString && !HighsExternalDeps::isAvailable ()) {
91+ HighsExternalDeps::logUnavailable (
92+ report_log_options, HighsLogType::kError ,
93+ " The HiPO solver was requested via the \" %s\" option." ,
94+ kSolverString .c_str ());
95+ return false ;
96+ } else {
97+ highsLogUser (report_log_options, HighsLogType::kWarning ,
98+ " Value \" %s\" for LP solver option (\" %s\" ) is not one of "
99+ " %s\" %s\" , \" %s\" , \" %s\" , \" %s\" or \" %s\"\n " ,
100+ value.c_str (), kSolverString .c_str (),
101+ HighsExternalDeps::isAvailable ()
102+ ? (kHipoString + " \" , \" " ).c_str ()
103+ : " " ,
104+ kHighsChooseString .c_str (), kSimplexString .c_str (),
105+ kIpmString .c_str (), kIpxString .c_str (), kPdlpString .c_str (),
106+ kQpAsmString .c_str (), kHiPdlpString .c_str ());
107+ return false ;
108+ }
121109}
122110
123111bool optionMipLpSolverOk (const HighsLogOptions& report_log_options,
124112 const string& value) {
125- if (value == kHipoString && !HighsExternalDeps::isAvailable ()) {
126- if (HighsExternalDeps::isAvailableAtCompile ()) {
127- highsLogUser (
128- report_log_options, HighsLogType::kError ,
129- " The HiPO solver was requested via the \" %s\" option, but this build "
130- " was compiled without HiPO support. Reconfigure with FAST_BUILD=ON "
131- " and -DHIPO=ON to enable HiPO.\n " ,
132- kMipLpSolverString .c_str ());
133- } else {
134- highsLogUser (
135- report_log_options, HighsLogType::kError ,
136- " The HiPO solver was requested via the \" %s\" option, but the "
137- " HiPO dependencies are missing. Install with highspy[hipo] or "
138- " install "
139- " highspy-extras. Note, that using HiPO changes the HiGHS license "
140- " from "
141- " MIT to Apache, due to the dependencies' licensing.\n " ,
142- kMipLpSolverString .c_str ());
143- }
144- return false ;
145- }
146-
147113 if (value == kHighsChooseString || value == kSimplexString ||
148114 value == kIpmString ||
149115 (value == kHipoString && HighsExternalDeps::isAvailable ()) ||
150116 value == kIpxString )
151117 return true ;
152- highsLogUser (
153- report_log_options, HighsLogType::kError ,
154- " Value \" %s\" for MIP LP solver option (\" %s\" ) is not one of "
155- " %s\" %s\" , \" %s\" , \" %s\" or \" %s\"\n " ,
156- value.c_str (), kMipLpSolverString .c_str (),
157- HighsExternalDeps::isAvailable () ? (kHipoString + " \" , \" " ).c_str () : " " ,
158- kHighsChooseString .c_str (), kSimplexString .c_str (), kIpmString .c_str (),
159- kIpxString .c_str ());
160- return false ;
118+ else if (value == kHipoString && !HighsExternalDeps::isAvailable ()) {
119+ HighsExternalDeps::logUnavailable (
120+ report_log_options, HighsLogType::kError ,
121+ " The HiPO solver was requested via the \" %s\" option." ,
122+ kMipLpSolverString .c_str ());
123+ return false ;
124+ } else {
125+ highsLogUser (report_log_options, HighsLogType::kError ,
126+ " Value \" %s\" for MIP LP solver option (\" %s\" ) is not one of "
127+ " %s\" %s\" , \" %s\" , \" %s\" or \" %s\"\n " ,
128+ value.c_str (), kMipLpSolverString .c_str (),
129+ HighsExternalDeps::isAvailable ()
130+ ? (kHipoString + " \" , \" " ).c_str ()
131+ : " " ,
132+ kHighsChooseString .c_str (), kSimplexString .c_str (),
133+ kIpmString .c_str (), kIpxString .c_str ());
134+ return false ;
135+ }
161136}
162137
163138bool optionMipIpmSolverOk (const HighsLogOptions& report_log_options,
164139 const string& value) {
165- if (value == kHipoString && !HighsExternalDeps::isAvailable ()) {
166- if (HighsExternalDeps::isAvailableAtCompile ()) {
167- highsLogUser (
168- report_log_options, HighsLogType::kError ,
169- " The HiPO solver was requested via the \" %s\" option, but this build "
170- " was compiled without HiPO support. Reconfigure with FAST_BUILD=ON "
171- " and -DHIPO=ON to enable HiPO.\n " ,
172- kMipIpmSolverString .c_str ());
173- } else {
174- highsLogUser (
175- report_log_options, HighsLogType::kError ,
176- " The HiPO solver was requested via the \" %s\" option, but the "
177- " HiPO dependencies are missing. Install with highspy[hipo] or "
178- " install "
179- " highspy-extras. Note, that using HiPO changes the HiGHS license "
180- " from "
181- " MIT to Apache, due to the dependencies' licensing.\n " ,
182- kMipIpmSolverString .c_str ());
183- }
184- return false ;
185- }
186140 if (value == kHighsChooseString || value == kIpmString ||
187141 (value == kHipoString && HighsExternalDeps::isAvailable ()) ||
188142 value == kIpxString )
189143 return true ;
190- highsLogUser (
191- report_log_options, HighsLogType::kError ,
192- " Value \" %s\" for MIP IPM solver (\" %s\" ) option is not one of "
193- " %s\" %s\" , \" %s\" or \" %s\"\n " ,
194- value.c_str (), kMipIpmSolverString .c_str (),
195- HighsExternalDeps::isAvailable () ? (kHipoString + " \" , \" " ).c_str () : " " ,
196- kHighsChooseString .c_str (), kIpmString .c_str (), kIpxString .c_str ());
197- return false ;
144+ else if (value == kHipoString && !HighsExternalDeps::isAvailable ()) {
145+ HighsExternalDeps::logUnavailable (
146+ report_log_options, HighsLogType::kError ,
147+ " The HiPO solver was requested via the \" %s\" option." ,
148+ kMipIpmSolverString .c_str ());
149+ return false ;
150+ } else {
151+ highsLogUser (
152+ report_log_options, HighsLogType::kError ,
153+ " Value \" %s\" for MIP IPM solver (\" %s\" ) option is not one of "
154+ " %s\" %s\" , \" %s\" or \" %s\"\n " ,
155+ value.c_str (), kMipIpmSolverString .c_str (),
156+ HighsExternalDeps::isAvailable () ? (kHipoString + " \" , \" " ).c_str ()
157+ : " " ,
158+ kHighsChooseString .c_str (), kIpmString .c_str (), kIpxString .c_str ());
159+ return false ;
160+ }
198161}
199162
200163bool optionHipoParallelTypeOk (const HighsLogOptions& report_log_options,
@@ -389,11 +352,10 @@ OptionStatus checkOptions(const HighsLogOptions& report_log_options,
389352OptionStatus checkOption (const HighsLogOptions& report_log_options,
390353 const OptionRecordInt& option) {
391354 if (option.lower_bound > option.upper_bound ) {
392- highsLogUser (
393- report_log_options, HighsLogType::kError ,
394- " checkOption: Option \" %s\" has inconsistent bounds [%" HIGHSINT_FORMAT
395- " , %" HIGHSINT_FORMAT " ]\n " ,
396- option.name .c_str (), option.lower_bound , option.upper_bound );
355+ highsLogUser (report_log_options, HighsLogType::kError ,
356+ " checkOption: Option \" %s\" has inconsistent bounds "
357+ " [%" HIGHSINT_FORMAT " , %" HIGHSINT_FORMAT " ]\n " ,
358+ option.name .c_str (), option.lower_bound , option.upper_bound );
397359 return OptionStatus::kIllegalValue ;
398360 }
399361 if (option.default_value < option.lower_bound ||
@@ -614,10 +576,10 @@ OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
614576 bool value_bool;
615577 bool return_status = boolFromString (value_trim, value_bool);
616578 if (!return_status) {
617- highsLogUser (
618- report_log_options, HighsLogType:: kError ,
619- " setLocalOptionValue: Value \" %s \" cannot be interpreted as a bool\n " ,
620- value_trim.c_str ());
579+ highsLogUser (report_log_options, HighsLogType:: kError ,
580+ " setLocalOptionValue: Value \" %s \" cannot be interpreted "
581+ " as a bool\n " ,
582+ value_trim.c_str ());
621583 return OptionStatus::kIllegalValue ;
622584 }
623585 return setLocalOptionValue (((OptionRecordBool*)option_records[index])[0 ],
@@ -1135,13 +1097,13 @@ void reportOption(FILE* file, const HighsLogOptions& log_options,
11351097
11361098 if (!report_only_deviations || option.default_value != *option.value ) {
11371099 if (file_type == HighsFileType::kMd ) {
1138- fprintf (
1139- file,
1140- " ## [%s](@id option-%s) \n - %s \n - Type: string \n - Default: \" %s\"\n\n " ,
1141- highsInsertMdEscapes (option.name ).c_str (),
1142- highsInsertMdId (option.name ).c_str (),
1143- highsInsertMdEscapes (option.description ).c_str (),
1144- option.default_value .c_str ());
1100+ fprintf (file,
1101+ " ## [%s](@id option-%s) \n - %s \n - Type: string \n - Default: "
1102+ " \" %s\"\n\n " ,
1103+ highsInsertMdEscapes (option.name ).c_str (),
1104+ highsInsertMdId (option.name ).c_str (),
1105+ highsInsertMdEscapes (option.description ).c_str (),
1106+ option.default_value .c_str ());
11451107 } else if (file_type == HighsFileType::kFull ) {
11461108 fprintf (file, " \n # %s\n " , option.description .c_str ());
11471109 fprintf (file, " # [type: string, advanced: %s, default: \" %s\" ]\n " ,
0 commit comments