diff options
Diffstat (limited to 'Master/texmf/asymptote/simplex.asy')
-rw-r--r-- | Master/texmf/asymptote/simplex.asy | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Master/texmf/asymptote/simplex.asy b/Master/texmf/asymptote/simplex.asy index bd9f69c9324..43920109ff4 100644 --- a/Master/texmf/asymptote/simplex.asy +++ b/Master/texmf/asymptote/simplex.asy @@ -184,8 +184,10 @@ struct problem { // Checks that constants are valid. bool validConstants() { for (int i = 0; i < rows.length; ++i) - if (rows[i].c < 0) - return false; + // Do not test the row for b, as it does not have a non-negativity + // condition. + if (i != VAR_B && rows[i].c < 0) + return false; return true; } |