Variable and constraint names with spaces in Gurobi 6.0

1,177 views
Skip to first unread message

Hamish Waterer

unread,
Dec 4, 2014, 9:35:29 PM12/4/14
to gur...@googlegroups.com
Hi,

Using Gurobi 6.0 I am getting warnings about variable and constraint names using spaces when writing LP, MST, and SOL files. These warnings didn't occur with Gurobi 5.6.

Besides not containing spaces, are there any other rules for variable and constraint names? I couldn't find anything about this in the docs.

Thanks,
Hamish


Jakob Sch.

unread,
Dec 5, 2014, 4:31:13 AM12/5/14
to gur...@googlegroups.com
Hi Harmish,

LP, MPS and SOL files use spaces to separate the variables and coefficients, thus It should not be allowed to have spaces within constraint or variable names.
For specifications see: http://www.gurobi.com/documentation/6.0/reference-manual/lp_format and http://www.gurobi.com/documentation/6.0/reference-manual/mps_format

Best regards,
Jakob

Stuart Mitchell

unread,
Dec 8, 2014, 6:45:24 PM12/8/14
to gur...@googlegroups.com
I have found constraint names also shouldn't contain a ':', I also avoid \-+?  etc

The latest implementation of gurobi is stricter about testing the variable and constraint names, as before it would often output an LP file it would be able to read, but would represent a different problem then the one that generated the file.

For instance two variables that share the same name in the original problem would be combined in an LP file.

in Gurobi 6.0 the LP file generator will now throw that warning, and then change the Variable names in the LP file to a default unique string.

Stu

--

---
You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Stuart Mitchell
PhD Engineering Science
Extraordinary Freelance Programmer and Optimisation Guru
Reply all
Reply to author
Forward
0 new messages