Skip to content

Commit

Permalink
Store original direction
Browse files Browse the repository at this point in the history
  • Loading branch information
octachrome committed Jun 23, 2014
1 parent 59c02fc commit bd11cc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/preproc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function canonical(prob) {
if (objective) {
if (objective.dir === 'minimise') {
objective.dir = 'maximise';
objective.originalDir = 'minimise';
negateExpr(objective.expr);
}
}
Expand Down
1 change: 1 addition & 0 deletions test/preprocSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ describe('preproc', function () {
expect(can).toEqual({
objective: {
dir: 'maximise',
originalDir: 'minimise',
expr: [{sym: 'x', coef: -1}, {sym: 'y', coef: 1}]
}
});
Expand Down

0 comments on commit bd11cc2

Please sign in to comment.