The Pareto Frontier, or Pareto set, is the set of choices which optimizes a system. This package calculates the optimal set of points in a 2D system.
For a given system, the Pareto frontier or Pareto set is the set of parameterizations (allocations) that are all Pareto efficient. Finding Pareto frontiers is particularly useful in engineering. By yielding all of the potentially optimal solutions, a designer can make focused tradeoffs within this constrained set of parameters, rather than needing to consider the full ranges of parameters.
The Pareto frontier, P(Y), may be more formally described as follows. Consider a system with function
We assume that the preferred directions of criteria values are known. A point
$ npm install --save pareto-frontier
For use in the browser, use browserify.
const pf = ;
Evaluates the Pareto Frontier.
graph must be an
array of points. Each point must be an array of length two (or more). Additional information can be stored in each point and will pass through. Eg:
[55, 42, 'red'].
Returned points are the Pareto Optimal set sorted to form a line.
const graph =55 4260 2283 2020 8141 3512 3229 1764 5547 3189 1068 6633 3572 4733 9049 25;const out = pf;/* returns:[[89, 10],[83, 20],[72, 47],[68, 66],[33, 90]]*/
Direction of Pareto Frontier
options object may be pass to
getParetoFrontier(graph, options) to specify which direction to optimize.
|Top Left Pareto Frontier|
|Top Right Pareto Frontier|
|Bottom Right Pareto Frontier|
|Bottom Left Pareto Frontier|
For non-wellformed inputs, a
TypeError will be thrown.
const graph =0-41 // Missing second dimension20;// Throws a TypeErrorconst out = pf;
$ npm test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
$ npm run test-cov
Istanbul creates a
./reports/coverage directory. To access an HTML version of the report,
Copyright © 2016. The pareto-frontier Authors.
Description text partially via Wikipedia.