|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Column Names lost in Write_MPS outputHello!
I've been reading this column for quite a while, and now, I have a puzzling problem: I usually build my models using the java library and after having added the constraint and the objective function, I use set_col_name() to uniquely name my variables. Afterwards, I let lp_solve write the lp model to both an LP file and an MPS file (using write_lp(), write_mps()). However, the column names are only present in the lp file, but not in the mps file; there the variables are named Cxxxx (x = arbitrary number). I set presolve parameters, and I write the model before I call solve(). I use lp_solve 5.5.0.14, WindowsXP. What could be the reason for the missing column names in the mps file? Thank you! Best regards Jörg Strebel |
|
|
RE: Column Names lost in Write_MPS outputThis seems strange. I just checked in the IDE and at the default I get funny
8 column names ok. Rows that did not have names become Rnnn . So check your code for http://lpsolve.sourceforge.net/5.5/set_use_names.htm Maybe you need to force TRUE,TRUE args. _____ From: lp_solve@... [mailto:lp_solve@...] On Behalf Of joerg_strebel Sent: Tuesday, September 22, 2009 10:16 AM To: lp_solve@... Subject: [lp_solve] Column Names lost in Write_MPS output Hello! I've been reading this column for quite a while, and now, I have a puzzling problem: I usually build my models using the java library and after having added the constraint and the objective function, I use set_col_name() to uniquely name my variables. Afterwards, I let lp_solve write the lp model to both an LP file and an MPS file (using write_lp(), write_mps()). However, the column names are only present in the lp file, but not in the mps file; there the variables are named Cxxxx (x = arbitrary number). I set presolve parameters, and I write the model before I call solve(). I use lp_solve 5.5.0.14, WindowsXP. What could be the reason for the missing column names in the mps file? Thank you! Best regards Jörg Strebel |
|
|
Re: Column Names lost in Write_MPS outputCould it be that these names are longer than 8 characters? The standard MPS format only allows a length of 8 for variable and constraint names. The MPS writer will use Rx and Cx if the name is longer.
To solve this, you can use the free MPS format. Peter From: William H. Patton Sent: Tuesday, September 29, 2009 06:37 To: lp_solve@... Subject: RE: [lp_solve] Column Names lost in Write_MPS output This seems strange. I just checked in the IDE and at the default I get funny 8 column names ok. Rows that did not have names become Rnnn.. So check your code for http://lpsolve.sourceforge.net/5.5/set_use_names.htm Maybe you need to force TRUE,TRUE args. -------------------------------------------------------------------------------- From: lp_solve@... [mailto:lp_solve@...] On Behalf Of joerg_strebel Sent: Tuesday, September 22, 2009 10:16 AM To: lp_solve@... Subject: [lp_solve] Column Names lost in Write_MPS output Hello! I've been reading this column for quite a while, and now, I have a puzzling problem: I usually build my models using the java library and after having added the constraint and the objective function, I use set_col_name() to uniquely name my variables. Afterwards, I let lp_solve write the lp model to both an LP file and an MPS file (using write_lp(), write_mps()). However, the column names are only present in the lp file, but not in the mps file; there the variables are named Cxxxx (x = arbitrary number). I set presolve parameters, and I write the model before I call solve(). I use lp_solve 5.5.0.14, WindowsXP. What could be the reason for the missing column names in the mps file? Thank you! Best regards Jörg Strebel |
| Free embeddable forum powered by Nabble | Forum Help |