Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-713

Negative value with restrictNonNegative

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 3.0
    • commons-math-2.2

    Description

      Problem: commons-math-2.2 SimplexSolver.

      A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
      SimplexSolver.optimize(function, constraints, GoalType.MINIMIZE, true);

      Function
      1 * x + 1 * y + 0

      Constraints:
      1 * x + 0 * y = 1

      Result:
      x = 1; y = -1;

      Probably variables with 0 coefficients are omitted at some point of computation and because of that the restrictions do not affect their values.

      Attachments

        1. MATH-713.patch
          2 kB
          Thomas Neidhart

        Activity

          People

            Unassigned Unassigned
            mskrzypczak MichaƂ Skrzypczak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified