Skip to content

suryalovesjs/roster-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROSTER ALGORITHM BuildStatus CircleCI

Simple Algorithm to Generate Roster for your team

DEMO

https://plnkr.co/edit/kk7tcf?p=preview

FEATURES

  • Generates Roster for any number of weeks(can be specified).
  • Any number of shifts can be provided.
  • Define frequency of shift rotation.
  • Define shuffle intensity.
  • Define probability of different shifts for members.

DATA

Create a object with members name in below structure

{

  "members": [{
      "id": 1,
      "name": "John"
    },
    {
      "id": 2,
      "name": "Paul"
    },
    {
      "id": 3,
      "name": "Simon"
    }]
}

CONFIG

Now, its time to configure!

{
  // Number of Weeks you want to generate Roster
  noWeeks : 52,
  // Number of Working days per week.
  noOfDaysPerWeek : 5,
  // List of Shifts
  shifts : ['morning','noon','night'],
  // Required Probability of shifts ( rate out of 10 )
  // For Below ,
  // Morning - 2
  // Noon - 5
  // Night - 3
  weights : ['2','5','3'],
  // Intensity of shuffle.
  shuffleIntensity : 1,
  // How frequent you want to rotate shifts
  changeFrequency: 2
}

Instantiation

To start with, using the below snippet.

roster = new Roster(config,data);
roster.getRosterPlan();

More Info

About

Generate Roster for a team

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published