Sat4j
  1. Sat4j
  2. SAT-21

Error in method toString() of OPBStringSolver for negative literals

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.1
    • Component/s: pseudo
    • Security Level: Public (Everybody can see)
    • Labels:
      None

      Description

      When adding a constraint with negative literals to an OPBStringSolver , its method toString() generates a opb file with unexpected indices for these negative literals.
      More precisely, instead of generating -1 x1 +1 x2 as it could be expected in the attached example, it generates +1 x-1 +1 x2.

      1. TestBug.java
        0.8 kB
        Stéphanie ROUSSEL

        Activity

        Hide
        Daniel Le Berre added a comment -

        Fixed in r943 on HEAD.

        Show
        Daniel Le Berre added a comment - Fixed in r943 on HEAD.
        Hide
        Daniel Le Berre (Inactive) added a comment -

        It looks like the issue is not properly solved.

        A constraint like

        -x1 + x2 >= 0

        becomes

        not x1 + x2 >= -1

        Show
        Daniel Le Berre (Inactive) added a comment - It looks like the issue is not properly solved. A constraint like -x1 + x2 >= 0 becomes not x1 + x2 >= -1

          People

          • Assignee:
            Daniel Le Berre
            Reporter:
            Stéphanie ROUSSEL
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development