I recently bumped into an issue that HiGHS outputs information to std::cout when it is used (by MiniZinc) as a library. This interferes with our other tools that in certain mode expect all output on std::cout to be in JSON format.
In this case it turned out to be the code here: https://github.com/ERGO-Code/HiGHS/blob/master/src/simplex/HEkkPrimal.cpp#L115C12-L126, but I wonder whether there should be a more general look at the usage of print statements in HiGHS: e.g., https://github.com/search?q=repo%3AERGO-Code%2FHiGHS%20printf&type=code. Are the remaining results shielded from being executed in library mode?
Additionally, I wonder why the value set using setLogCallback isn't used.
I recently bumped into an issue that HiGHS outputs information to
std::coutwhen it is used (by MiniZinc) as a library. This interferes with our other tools that in certain mode expect all output onstd::coutto be in JSON format.In this case it turned out to be the code here: https://github.com/ERGO-Code/HiGHS/blob/master/src/simplex/HEkkPrimal.cpp#L115C12-L126, but I wonder whether there should be a more general look at the usage of print statements in HiGHS: e.g., https://github.com/search?q=repo%3AERGO-Code%2FHiGHS%20printf&type=code. Are the remaining results shielded from being executed in library mode?
Additionally, I wonder why the value set using
setLogCallbackisn't used.