Skip to content

Commit

Permalink
Merge pull request #50 from erik-sth/main
Browse files Browse the repository at this point in the history
Dev bring up to date.
  • Loading branch information
erik-sth authored Oct 29, 2023
2 parents 59f3371 + b56bd0f commit e12284e
Show file tree
Hide file tree
Showing 65 changed files with 20,070 additions and 2,346 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# /node_modules/* in the project root is ignored by default
# build artefacts
dist/*

# custom definition files
/src/types/
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
indent: ['error', 4],
'linebreak-style': ['error', 'windows'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
};
File renamed without changes.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"singleQuote": true
}
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug TypeScript",
"program": "${workspaceFolder}/src/index.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"sourceMaps": true
}
]
}
75 changes: 0 additions & 75 deletions Class/Graph.ts

This file was deleted.

39 changes: 0 additions & 39 deletions Class/Groups.ts

This file was deleted.

118 changes: 0 additions & 118 deletions Class/PriorityQueue.ts

This file was deleted.

84 changes: 0 additions & 84 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,4 @@
# Project Name

## Overview

This project facilitates efficient item allocation to students based on specified criteria. It utilizes a priority queue and a directed graph to optimize the allocation process, ensuring a streamlined and effective solution.

## Table of Contents

1. [Introduction](#introduction)
2. [Components](#components)
- [Classes](#classes)
- [Data Structures](#data-structures)
- [Functions](#functions)
3. [Usage](#usage)
4. [Commands](#commands)
- [Installation](#installation)
- [Testing](#testing)
- [Build](#build)
- [Start](#start)
5. [Notes](#notes)
6. [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation-1)
7. [Contributing](#contributing)
8. [License](#license)
9. [Acknowledgments](#acknowledgments)

## Introduction

Provide a brief introduction to the project, its goals, and the problems it solves.

## Components

1. **TimeDistributionAlg**: Distributes every student to a path

### Classes

1. **PriorityQueue**: Implementation of a priority queue to prioritize students based on extra items they can accommodate.
2. **DirectedGraph**: Graph representation for modeling relationships between items.
3. **GraphNode**: Represents a node in the directed graph, corresponding to an item.

### Data Structures

1. **Item**: Represents an item that students can be allocated to.
2. **PollQuestion**: Represents a poll question to gather information about students' preferences.
3. **Project**: Represents the overall project, including items required for all students.
4. **Student**: Represents a student, including information about the student and items they are already allocated.
5. **Groups**: Represent every individual id groups with all available paths with their students.

### Functions

1. **createGraph()**: Builds a directed graph based on provided items, creating edges between items with suitable time gaps.
2. **buildGroupsWithSamePaths()**:Finds every Poll Combination and returns groups
3. **findPathsForEachGroup()**: Finds every possible Path for each group
4. **allocateGroupsToItems()**: Allocates the groups to the items.
5. **distributeGroupsToPaths()**: Distributes every group to the individual paths and then checks every id
6. **getDefaultIds()**: Returns a list of item IDs required for all students.
7. **getVotingIds(studentId)**: Retrieves a list of extra item IDs based on a student's polls, caching the result for efficiency.

## Usage

Provide instructions on how to use the project. Include examples, if applicable.

## Commands

### Installation
Expand Down Expand Up @@ -95,29 +33,7 @@ To start the project, use:
npm start
```

## Notes

- Mention any assumptions, key strategies, and efficiency considerations.
- Highlight any customization options or parameters that users might want to adjust.

## Getting Started

### Prerequisites

List any prerequisites or dependencies that users need to have installed.

### Installation

Provide step-by-step instructions on how to install and set up the project.

## Contributing

Outline guidelines for contributing to the project. Include information on how to submit issues, suggest improvements, and propose new features.

## License

Only personal use.

## Acknowledgments

Give credit to any third-party libraries, resources, or inspirations used in the project.
Loading

0 comments on commit e12284e

Please sign in to comment.