@rizadh/scheduler
Generate course schedules
Last updated 2 years ago by rizadh .
Unlicense · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @rizadh/scheduler 
SYNC missed versions from official npm registry.

Scheduler Build Status

A simple course auto-scheduler. Feed in an array describing each course (format below) and receive a set of possible non-conflicting course sections.

Note: TypeScript-style type annotations and syntax will be used throughout this document

Format

interface RawCourse {
    code: string,
    sections: {
        identifier: string,
        sessions: {
            day: number,
            location: {
                building: string,
                room: string,
            },
            start: {
                hour: number,
                minute: number
            },
            end: {
                hour: number,
                minute: number
            }
        }[]
    }[]
}

Usage

Import the parser

CommonJS

// Using pre-ES2015 property access
const scheduler = require('course-scheduler');
const parseCourses = scheduler.parseCourses;
const Course = scheduler.Course;

// Using ES2015 array destructuring
const { Course, parseCourses } = require('course-scheduler')

ES Modules

import { parseCourses, Course } from 'course-scheduler';

Parse the array of courses

const rawCourses: RawCourse[] = /* some array */;

const parsedCourses: Set<Course> = parseCourses(rawCourses);

const sectionCombinations: Set<Map<Course, Section>> = Course.possibleSectionCombinations(parsedCourses);

More details about how to proceed with the return sectionCombinations will be added soon

Current Tags

  • 1.1.1                                ...           latest (2 years ago)

10 Versions

  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 11
Last Month 4
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |