The MOSEK command line tool Version 7.0 (Revision 141)
The MOSEK command line tool. Version 7.0 ... - Documentation The MOSEK command line tool. Version 7.0 ... - Documentation
294 CHAPTER 14. THE LP FILE FORMAT The algorithm for making names LP valid works as follows: The name is interpreted as an utf-8 string. For a unicode character c: • If c==‘ ’ (underscore), the output is ‘ ’ (two underscores). • If c is a valid LP name character, the output is just c. • If c is another character in the ASCII range, the output is XX, where XX is the hexadecimal code for the character. • If c is a character in the range 127—65535, the output is uXXXX, where XXXX is the hexadecimal code for the character. • If c is a character above 65535, the output is UXXXXXXXX, where XXXXXXXX is the hexadecimal code for the character. Invalid utf-8 substrings are escaped as ‘ XX’, and if a name starts with a period, ‘e’ or ‘E’, that character is escaped as ‘ XX’. 14.2.3 Variable bounds Specifying several upper or lower bounds on one variable is possible but MOSEK uses only the tightest bounds. If a variable is fixed (with =), then it is considered the tightest bound. 14.2.4 MOSEK specific extensions to the LP format Some optimization software packages employ a more strict definition of the LP format that the one used by MOSEK. The limitations imposed by the strict LP format are the following: • Quadratic terms in the constraints are not allowed. • Names can be only 16 characters long. • Lines must not exceed 255 characters in length. If an LP formatted file created by MOSEK should satisfies the strict definition, then the parameter MSK IPAR WRITE LP STRICT FORMAT should be set; note, however, that some problems cannot be written correctly as a strict LP formatted file. For instance, all names are truncated to 16 characters and hence they may loose their uniqueness and change the problem. To get around some of the inconveniences converting from other problem formats, MOSEK allows lines to contain 1024 characters and names may have any length (shorter than the 1024 characters). Internally in MOSEK names may contain any (printable) character, many of which cannot be used in LP names. Setting the parameters
14.3. THE STRICT LP FORMAT 295 MSK IPAR READ LP QUOTED NAMES and MSK IPAR WRITE LP QUOTED NAMES allows MOSEK to use quoted names. The first parameter tells MOSEK to remove quotes from quoted names e.g, "x1", when reading LP formatted files. The second parameter tells MOSEK to put quotes around any semi-illegal name (names beginning with a number or a period) and fully illegal name (containing illegal characters). As double quote is a legal character in the LP format, quoting semiillegal names makes them legal in the pure LP format as long as they are still shorter than 16 characters. Fully illegal names are still illegal in a pure LP file. 14.3 The strict LP format The LP format is not a formal standard and different vendors have slightly different interpretations of the LP format. To make MOSEK’s definition of the LP format more compatible with the definitions of other vendors, use the parameter setting MSK IPAR WRITE LP STRICT FORMAT = MSK ON This setting may lead to truncation of some names and hence to an invalid LP file. The simple solution to this problem is to use the parameter setting MSK IPAR WRITE GENERIC NAMES = MSK ON which will cause all names to be renamed systematically in the output file. 14.4 Formatting of an LP file A few parameters control the visual formatting of LP files written by MOSEK in order to make it easier to read the files. These parameters are MSK IPAR WRITE LP LINE WIDTH MSK IPAR WRITE LP TERMS PER LINE The first parameter sets the maximum number of characters on a single line. The default value is 80 corresponding roughly to the width of a standard text document. The second parameter sets the maximum number of terms per line; a term means a sign, a coefficient, and a name (for example ”+ 42 elephants”). The default value is 0, meaning that there is no maximum.
- Page 259 and 260: 11.6. TYPES OF CONVEXITY CHECKS. 24
- Page 261 and 262: 11.10. DOUBLE INFORMATION ITEMS 245
- Page 263 and 264: 11.10. DOUBLE INFORMATION ITEMS 247
- Page 265 and 266: 11.11. FEASIBILITY REPAIR TYPES 249
- Page 267 and 268: 11.13. INTEGER INFORMATION ITEMS. 2
- Page 269 and 270: 11.13. INTEGER INFORMATION ITEMS. 2
- Page 271 and 272: 11.13. INTEGER INFORMATION ITEMS. 2
- Page 273 and 274: 11.17. LANGUAGE SELECTION CONSTANTS
- Page 275 and 276: 11.22. MIXED-INTEGER NODE SELECTION
- Page 277 and 278: 11.29. ORDERING STRATEGIES 261 MSK
- Page 279 and 280: 11.34. PROBLEM STATUS KEYS 263 MSK
- Page 281 and 282: 11.38. SENSITIVITY TYPES 265 MSK SC
- Page 283 and 284: 11.44. SOLUTION ITEMS 267 MSK SIM S
- Page 285 and 286: 11.46. SOLUTION TYPES 269 11.46 Sol
- Page 287 and 288: 11.52. INTEGER VALUES 271 11.52 Int
- Page 289 and 290: Chapter 12 MOSEK Command line tool
- Page 291 and 292: 12.3. THE PARAMETER FILE 275 -min F
- Page 293 and 294: Chapter 13 The MPS file format MOSE
- Page 295 and 296: 13.1. MPS FILE STRUCTURE 279 Extens
- Page 297 and 298: 13.1. MPS FILE STRUCTURE 281 [vname
- Page 299 and 300: 13.1. MPS FILE STRUCTURE 283 Field
- Page 301 and 302: 13.1. MPS FILE STRUCTURE 285 Next d
- Page 303 and 304: 13.2. INTEGER VARIABLES 287 13.2 In
- Page 305 and 306: Chapter 14 The LP file format MOSEK
- Page 307 and 308: 14.1. THE SECTIONS 291 x1 * x2 Ther
- Page 309: 14.2. LP FORMAT PECULIARITIES 293 1
- Page 313 and 314: Chapter 15 The OPF format The Optim
- Page 315 and 316: 15.2. THE FILE FORMAT 299 [con ’c
- Page 317 and 318: 15.2. THE FILE FORMAT 301 - ‘NEAR
- Page 319 and 320: 15.4. WRITING OPF FILES FROM MOSEK
- Page 321 and 322: 15.5. EXAMPLES 305 [/hints] [variab
- Page 323 and 324: 15.5. EXAMPLES 307 x1 x2 [/integer]
- Page 325 and 326: Chapter 16 The XML (OSiL) format MO
- Page 327 and 328: Chapter 17 The solution file format
- Page 329 and 330: 17.2. THE INTEGER SOLUTION FILE 313
- Page 331 and 332: Chapter 18 Problem analyzer example
- Page 333 and 334: 18.2. ARKI001 317 2 476 45.42 48.19
- Page 335 and 336: 18.4. PROBLEM WITH BOTH LINEAR AND
- Page 337 and 338: Bibliography [1] R. Fourer and D. M
- Page 339 and 340: Index AMPL outlev, 13 wantsol, 13 a
- Page 341 and 342: INDEX 325 MSK RES ERR FEASREPAIR IN
- Page 343 and 344: INDEX 327 MSK RES ERR MPS NULL VAR
- Page 345 and 346: INDEX 329 MSK RES TRM MAX TIME, 226
294 CHAPTER 14. THE LP FILE FORMAT<br />
<strong>The</strong> algorithm for making names LP valid works as follows: <strong>The</strong> name is interpreted as an utf-8<br />
string. For a unicode character c:<br />
• If c==‘ ’ (underscore), the output is ‘<br />
’ (two underscores).<br />
• If c is a valid LP name character, the output is just c.<br />
• If c is another character in the ASCII range, the output is XX, where XX is the hexadecimal code<br />
for the character.<br />
• If c is a character in the range 127—65535, the output is uXXXX, where XXXX is the hexadecimal<br />
code for the character.<br />
• If c is a character above 65535, the output is UXXXXXXXX, where XXXXXXXX is the hexadecimal<br />
code for the character.<br />
Invalid utf-8 substrings are escaped as ‘ XX’, and if a name starts with a period, ‘e’ or ‘E’, that<br />
character is escaped as ‘ XX’.<br />
14.2.3 Variable bounds<br />
Specifying several upper or lower bounds on one variable is possible but <strong>MOSEK</strong> uses only the tightest<br />
bounds. If a variable is fixed (with =), then it is considered the tightest bound.<br />
14.2.4 <strong>MOSEK</strong> specific extensions to the LP format<br />
Some optimization software packages employ a more strict definition of the LP format that the one<br />
used by <strong>MOSEK</strong>. <strong>The</strong> limitations imposed by the strict LP format are the following:<br />
• Quadratic terms in the constraints are not allowed.<br />
• Names can be only 16 characters long.<br />
• Lines must not exceed 255 characters in length.<br />
If an LP formatted file created by <strong>MOSEK</strong> should satisfies the strict definition, then the parameter<br />
MSK IPAR WRITE LP STRICT FORMAT<br />
should be set; note, however, that some problems cannot be written correctly as a strict LP formatted<br />
file. For instance, all names are truncated to 16 characters and hence they may loose their uniqueness<br />
and change the problem.<br />
To get around some of the inconveniences converting from other problem formats, <strong>MOSEK</strong> allows <strong>line</strong>s<br />
to contain 1024 characters and names may have any length (shorter than the 1024 characters).<br />
Internally in <strong>MOSEK</strong> names may contain any (printable) character, many of which cannot be used in<br />
LP names. Setting the parameters