GithubHelp home page GithubHelp logo

marcolanaro / js-pert Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 2.0 500 KB

PERT - Program evaluation and review technique

Home Page: https://marcolanaro.github.io/js-pert

License: MIT License

TypeScript 91.15% HTML 7.54% CSS 1.32%
pert project-management network-analysis probability-distributions estimation

js-pert's Introduction

js-pert

Program evaluation and review technique

Given a set of activities with pessimistic, optimistic, probable times and the set of dependencies, will provide:

  • expected time for every activity
  • variance for every activity
  • the description of the activity on node [AON] network diagram with predecessors and successors
  • earliest start [ES] times for every node
  • earliest finish [EF] times for every node
  • latest start [LS] times for every node
  • latest finish [LF] times for every node
  • slack for every node
  • critical path description

With the pert description will also provide a function to calculate the probability to complete the project in x days.

Install

npm install js-pert --save

Example

Please look at this example.

Documentation

jsPERT

The default exported function allow you to retrieve the description of the PERT network.

Given activities:

{
  [key: string]: {
    id: string;
    optimisticTime: number;
    mostLikelyTime: number;
    pessimisticTime: number;
    predecessors: string[];
  };
}

You can use jsPERT as follow:

import jsPERT from 'js-pert';

const pert = jsPERT(activities);

console.log('PERT', pert);

Should log the PERT description in following shape:

{
  activitiesParams: {
    [key: string]: {
      expectedTime: number;
      variance: number;
    };
  };
  network: {
    [key: string]: {
      successors: string[];
      predecessors: string[];
    };
  };
  earliestFinishTimes: {
    [key: string]: number;
  };
  latestStartTimes: {
    [key: string]: number;
  };
  earliestStartTimes: {
    [key: string]: number;
  };
  latestFinishTimes: {
    [key: string]: number;
  };
  slack: {
    [key: string]: number;
  };
  criticalPath: string[];
}

pertProbability

You can get the probability of completing the project in less than x days submitting the PERT description and x in the pertProbability ancillary function.

import { pertProbability } from 'js-pert';

const Pz = pertProbability(pert, 22);

console.log('P(x<22):', Pz);

License

See the LICENSE file for license rights and limitations (MIT).

js-pert's People

Contributors

marcolanaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.