Opened 6 years ago

Closed 5 months ago

#105 closed defect (migrated)

Double line breaks in MOSEK Osi interface

Reported by: PetterS Owned by: mjs
Priority: minor Milestone:
Component: OsiMsk Version: 0.104
Keywords: Cc:

Description

On my computer (Windows 8, 64-bit), OsiMskSolverInterface? prints two line breaks after each line.

The following modification to OsiMskStreamFuncLog? fixes the problem:

static 
void MSKAPI OsiMskStreamFuncLog(MSKuserhandle_t handle, MSKCONST char* str) {
	if (handle) {
		if (((CoinMessageHandler*)handle)->logLevel() >= 1) {
			std::string str_cpy(str);
			std::string::size_type len = str_cpy.length();
			if (len > 0 && str_cpy[len - 1] == '\n') {
				str_cpy[len - 1] = ' ';
			}
			((CoinMessageHandler*)handle)->message(0, "MSK", str_cpy.c_str(), ' ') << CoinMessageEol;
		}
	} else {
		printf(str);
		printf("\n");
	}
}

Change History (1)

comment:1 Changed 5 months ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there: https://github.com/coin-or/Osi/issues/105

Note: See TracTickets for help on using tickets.