Skip to content

London | 26-Jul-SDC | Alex Jamshidi | Sprint 5 | Implement laptop allocation - #685

Open
Alex-Jamshidi wants to merge 6 commits into
CodeYourFuture:mainfrom
Alex-Jamshidi:implement-laptop-allocation
Open

Alex-Jamshidi wants to merge 6 commits into
CodeYourFuture:mainfrom
Alex-Jamshidi:implement-laptop-allocation

Conversation

@Alex-Jamshidi

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1156

Changelist

Program to assign laptops to people in the most effective way possible.
Uses Hungarian Algorithm to assign.
Contains simulation for different scenarios.
Can handle when there are more people than laptops.

Alex-Jamshidi and others added 6 commits September 2, 2026 01:52
This README provides an overview of the Laptop Allocation Program, including its purpose, specifications, running instructions, and details about the allocation and simulation processes.
Corrected spelling of 'allocate' and removed extra newline.
@Alex-Jamshidi Alex-Jamshidi added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 5 Assigned during Week 5 of this module Module-Tools The name of the module. labels Sep 3, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Your PR included an an unrecognised Task ID.

Make sure you have put the correct Task ID in its description.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 7, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay in the review.

You've gone into a lot of detail preparing this, good work.

I've got a few questions to assess your understanding of the code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for writing this readme, it's always good to see programs documented well like this.

name: str
age: int
# Sorted in order of preference, most preferred is first.
preferred_operating_systems: tuple[OperatingSystem, ...]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you use a tuple here? Is there an advantage of that over another type of structure?

person_costs.append(sadness)
cost_matrix.append(person_costs)

row_ind, col_ind = linear_sum_assignment(cost_matrix)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this algorithm is a good way of optimising laptop assignment. I have a couple of questions:

  1. What do you think the complexity of this approach is?
  2. Does this algorithm have any drawbacks or limitations?
  3. Do you understand how this algorithms works? Can you briefly describe it?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Your PR included an an unrecognised Task ID.

Make sure you have put the correct Task ID in its description.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@LonMcGregor

Copy link
Copy Markdown
Contributor

We've updated the tasks for the next SDC that is running, so you can ignore what the bot is telling you about a missing task code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Tools The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 5 Assigned during Week 5 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants