write

Write an OPTI object to a mathematical file.

Syntax

write(optiObj,filename)

write(optiObj,filename,filetype)

Description

Write an OPTI problem to a mathematical description file. Multiple file formats are supported.

write(optiObj,filename) writes the problem described by the OPTI object optiObj to the file filename. If you only supply a filename the file will be written to the current Matlab directory. Otherwise if you supply a full path + filename, it will be written to that location. You must supply the file extension using this method.

write(optiObj,filename,filetype) allows the user to enter just the filename (without an extension), and manually specify the file type (e.g. 'SDPA').

Available File Types

File Type Extension Supported Problems OPTI Function Notes
'MPS' .mps LP, MILP, QP, MIQP coinWrite  
'QPS' .qps LP, MILP, QP, MIQP coinWrite  
'LP' .lp LP, MILP coinWrite  
'SDPA-S' .dat-s LP, SDP sdpWrite Sparse Format
'SDPA' .dat LP, SDP sdpWrite Dense Format
'SeDuMi' .mat LP, SDP sdpWrite  
'GMS' .gms All but SDP, SNLE and NLS gamsWrite Remember GAMS uses 0-100 bounds on integer vars