integer constraints in lp format do not seem to be respected

Bug #1334411 reported by Dhakir
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lp-solve (Ubuntu)
New
Undecided
Unassigned

Bug Description

Inequality constraints and integer variables give clearly incorrect results, which are not explicitly mentioned in the documentation.

For instance, trying to solve the following program in lp format:

min: x;

x > 0;

int x;

Results in:

Value of objective function: 0

Actual values of the variables:
x 0

Which is clearly incorrect.
The solution, which involves using some artificial boundaries such as "x > 0.00000001" instead of "x > 0", is NOT intuitive and nowhere mentioned in the documentation. This is extremely frustrating for novice users.

If there are limitations which prevent lp_solve from correctly parsing the given input program without having to add some residual value to "0", then at least it should be mentioned in the documentation.

Revision history for this message
Martin Pokorny (martin-truffulatree) wrote :

This is actually described in the lp_solve documentation under the description of the LP file format, where it states:

<constraint> is an optional constraint name followed by a colon plus
  a linear combination of variables and constants or (just one)
  constraint name followed by a colon (a range) or (just one) variable
  name without a colon (a bound), followed by a relational operator,
  followed again by a linear combination of variables and constants,
  ending with a semicolon. The relational operator can be any of the
  following: "<" "<=" "=" ">" ">=". There is no semantic difference
  between "<" and "<=" nor between ">" and ">=" (even for integer
  variables!).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.