LP file - read problem when using UniqueShortNames

39 views
Skip to first unread message

Sascha B

unread,
Apr 3, 2020, 10:48:32 AM4/3/20
to OPTANO Modeling
Hello again,

I'm using Optano.Modeling 3.3.0.474 and Optano.Modeling.Gurobi 9.0.1.23 with Gurobi 9.0.1 and implemented it in a .NET Core 2.1 Console App.


When I use NameHandlingStyle.UniqueShortNames (which I really appreciate, that's very handy!! :) ), LP files I export with the LPExporter are not readable for gurobi_cl or SCIP.

Here's the error message of SCIP, when  I try to read in a LP file created by Optano:

read problem </scratch/hpc-prf-nltp/sascha/scip/dickert_ma05_64_0_3_3_0_65_6_391.lp>
============
[/local/kel/SCIP/scipoptsuite-6.0.2/scip/src/scip/reader_lp.c:160] ERROR: Syntax error in line 1805 ('inF'): two consecutive values. 
  input:  hzd: 750 inF - rc  <= 750
                     ^
[/local/kel/SCIP/scipoptsuite-6.0.2/scip/src/scip/reader_lp.c:3407] ERROR: Error <-2> in function call
error reading file </scratch/hpc-prf-nltp/sascha/scip/dickert_ma05_64_0_3_3_0_65_6_391.lp>


 
Gurobi already stops at line 103:
Error reading LP format file ../lp/dickert_ma05_64_0_3_3_0_65_6_391.lp at line 103
Incomplete constraint
Neighboring tokens: " BiN - Nz <= 750 wSd: UCJ - 0.007448 "
ERROR 10012: Unable to read file

 

If I otherwise use the NameHandlingStyle.Manual name handling, the created LP files can be read and solved without problems.

Thank you for the support!
Have a nice weekend :)


Best,
Sascha

Sascha B

unread,
Apr 3, 2020, 11:00:21 AM4/3/20
to OPTANO Modeling
Let me add, that I assume the automatically generated names represent lp file format keywords.

OPTANO Team

unread,
Jun 24, 2020, 5:19:05 AM6/24/20
to OPTANO Modeling
Hi,

this message has been marked as spam. Sorry for the delayed response.

We will add inf to the list of reserved names.

Best,
jp

Sascha B

unread,
Jun 24, 2020, 5:24:22 AM6/24/20
to OPTANO Modeling
Hi jp,

thanks for the answer. Maybe you can also check, if these strings are also on the list of reserved names and add them, if they're missing :)

  • min
  • max
  • such
  • st
  • free
  • end
  • bin
  • sos
  • gen
  • semi
  • semis
Best,
Sascha

Sascha B

unread,
Aug 5, 2020, 2:41:04 AM8/5/20
to OPTANO Modeling
Hey jp,

have you read my last answer?

Best,
Sascha

OPTANO Team

unread,
Aug 5, 2020, 3:13:50 AM8/5/20
to OPTANO Modeling
Hi,

thanks for following up. I am out of the office and have forwarded your message to the dev team. Jannick will get back to you asap.

best,
jp

Jannick Lange

unread,
Aug 20, 2020, 10:33:57 AM8/20/20
to OPTANO Modeling
Hi Sasha,

I just uploaded a pre-release of OPTANO Modeling to nuget, that should solve your issue.

Please read the changelog for further information:

Version 3.4.1 (2020-08-20)
  • Feature: Prevent ModelScope from generating short names that are used as keywords in the LP file format.
    • The following words are blocked by default: "min", "max", "such", "st", "free", "end", "bin", "sos", "gen", "semi", "semis", "minimize", "maximize", "bounds", "binary"
    • This includes all different capitalizations, such as "miN", "MiN", etc.
    • A list of the blocked words is available via ModelScope.BlockedShortNames
  • Feature: Add methods for custom (Un-)blocking of unwanted shortnames:
    • ModelScope.AddInvalidShortName and ModelScope.RemoveInvalidShortName
    • Note: Both methods do have a bool-flag that indicates whether only the exact casing that is given as "word to block" should be (un-)blocked, or all capitalizations. 
      This also gives the opportunity to re-allow any combination of short names that are blocked by default.
Please let me know if this fix works for you.

Best Regards
Jannick

Sascha B

unread,
Aug 21, 2020, 3:19:44 AM8/21/20
to OPTANO Modeling
Hi Jannick,

thanks for the update.
I recommend to also ban the following strings: "bound", "inf", "nan"

Cheers,
Sascha

Reply all
Reply to author
Forward
0 new messages