mazfil / lab-allocator

COMP3500 - Resource maximisation planning system for labs
3 stars 1 forks source link

The fitness does not improve along each generation #94

Closed Hexuan-Meng closed 2 months ago

Hexuan-Meng commented 3 months ago

I noticed that the fitness does not improve along each generation, which is result from more labs being allocated than enough. The root cause is that getCourseFromId(int id) method in CourseTable class returns the wrong course which does not match then given course id. It is not the idth course in the field Course[] courses of CourseTable class. I fixed this error by searching through all courses and comparing the given id with the course id. This makes our algorithm works again. The fitness will increase along each generation. I'll push my code in a new branch I created later. Let me know if anything is wrong.

alexdboxall commented 3 months ago

Sounds good! I see you've uploaded code to the branch backend-87&94 - if that code's done you can make a pull request into main.

matthewcawley02 commented 2 months ago

With Hexuan's commit (pull request #101), this issue is resolved and can be closed.