The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek

25.11.2015 Views

360 APPENDIX A. API REFERENCE A.2.272 Task.strtosk() sk = Task.strtosk(str) Obtains a status key. Arguments sk : int Status key corresponding to the string. str : str Status key string. Description: Obtains the status key corresponding to an explanatory string. A.2.273 Task.updatesolutioninfo() Task.updatesolutioninfo(whichsol) Update the information items related to the solution. Arguments whichsol : soltype Selects a solution. Description: Update the information items related to the solution. A.2.274 Task.writebranchpriorities() Task.writebranchpriorities(filename) Writes branching priority data to a file. Arguments filename : str Data is written to the file filename.

A.2. CLASS TASK 361 Description: Writes branching priority data to a file. See also • Task.readbranchpriorities Reads branching priority data from a file. A.2.275 Task.writedata() Task.writedata(filename) Writes problem data to a file. Arguments filename : str Data is written to the file filename if it is a nonempty string. Otherwise data is written to the file specified by sparam.data file name. Description: See also Writes problem data associated with the optimization task to a file in one of four formats: LP: A text based row oriented format. File extension .lp. See Appendix F.2. MPS: A text based column oriented format. File extension .mps. See Appendix F.1. OPF: A text based row oriented format. File extension .opf. Supports more problem types than MPS and LP. See Appendix F.3. TASK: A MOSEK specific binary format for fast reading and writing. File extension .task. By default the data file format is determined by the file name extension. This behaviour can be overridden by setting the iparam.write data format parameter. MOSEK is able to read and write files in a compressed format (gzip). To write in the compressed format append the extension ”.gz”. E.g to write a gzip compressed MPS file use the extension mps.gz. Please note that MPS, LP and OPF files require all variables to have unique names. If a task contains no names, it is possible to write the file with automaticly generated anonymous names by setting the iparam.write generic names parameter to onoffkey.on. Please note that if a general nonlinear function appears in the problem then such function cannot be written to file and MOSEK will issue a warning. • iparam.write data format Controls the output file format.

A.2. CLASS TASK 361<br />

Description:<br />

Writes branching priority data to a file.<br />

See also<br />

• Task.readbranchpriorities Reads branching priority data from a file.<br />

A.2.275<br />

Task.writedata()<br />

Task.writedata(filename)<br />

Writes problem data to a file.<br />

Arguments<br />

filename : str<br />

Data is written to the file filename if it is a nonempty string. Otherwise data is written<br />

to the file specified by sparam.data file name.<br />

Description:<br />

See also<br />

Writes problem data associated with the optimization task to a file in one of four formats:<br />

LP:<br />

A text based row oriented format. File extension .lp. See Appendix F.2.<br />

MPS:<br />

A text based column oriented format. File extension .mps. See Appendix F.1.<br />

OPF:<br />

A text based row oriented format. File extension .opf. Supports more problem types than<br />

MPS and LP. See Appendix F.3.<br />

TASK:<br />

A <strong>MOSEK</strong> specific binary format for fast reading and writing. File extension .task.<br />

By default the data file format is determined by the file name extension. This behaviour can be<br />

overridden by setting the iparam.write data format parameter.<br />

<strong>MOSEK</strong> is able to read and write files in a compressed format (gzip). To write in the compressed<br />

format append the extension ”.gz”. E.g to write a gzip compressed MPS file use the extension<br />

mps.gz.<br />

Please note that MPS, LP and OPF files require all variables to have unique names. If a task<br />

contains no names, it is possible to write the file with automaticly generated anonymous names<br />

by setting the iparam.write generic names parameter to onoffkey.on.<br />

Please note that if a general nonlinear function appears in the problem then such function cannot<br />

be written to file and <strong>MOSEK</strong> will issue a warning.<br />

• iparam.write data format Controls the output file format.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!