Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code and comments disagree #56

Open
simoncozens opened this issue Jul 30, 2014 · 0 comments
Open

Code and comments disagree #56

simoncozens opened this issue Jul 30, 2014 · 0 comments

Comments

@simoncozens
Copy link

Lines 758-768 of SimplexSolver.js read like this:

      // Find the most negative coefficient in the objective function (ignoring
      // the non-pivotable dummy variables). If all coefficients are positive
      // we're done
      terms.escapingEach(function(v, c) {
        if (v.isPivotable && c < objectiveCoeff) {
          objectiveCoeff = c;
          entryVar = v;
          // Break on success
          return { brk: 1 };
        }
      }, this);

Unless I'm misreading the code, this find the first negative coefficient and then breaks, not the most negative coefficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant