Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
ae75a89
prerequisite scraping
whitnotmax Nov 2, 2024
78894a5
documentation
whitnotmax Nov 2, 2024
b9873dc
Clean up code
whitnotmax Nov 11, 2024
06446cf
Simplified approach to storing prereq courses
whitnotmax Nov 12, 2024
b26add2
handles complex class titles
whitnotmax Nov 12, 2024
7a4f829
fixes
whitnotmax Nov 12, 2024
152ee2c
"pre or corequisite" and "corequisite"
whitnotmax Nov 18, 2024
baffecf
documentation
whitnotmax Nov 18, 2024
cdf3a1a
added generateValidSchedulesWithBlanketSearch method
GriffRob1 Feb 27, 2025
e86fc07
modified javadocs for generateValidSchedulesWithBlanketSearch
GriffRob1 Feb 27, 2025
61d8c7d
Merge remote-tracking branch 'origin/dev' into dev
GriffRob1 Mar 10, 2025
c04eef6
can get the rmp id for a professor name
whitnotmax Mar 10, 2025
dcdc7f4
added methods computeStartTime, computeEndTime, and computeGapDay
GriffRob1 Mar 12, 2025
4a04996
deleted generateValidSchedulesWithBlanketSearch
GriffRob1 Mar 12, 2025
a32e504
deleted generateValidSchedulesWithBlanketSearch
GriffRob1 Mar 12, 2025
4d37540
deleted generateValidSchedulesWithBlanketSearch
GriffRob1 Mar 12, 2025
564696e
added }
GriffRob1 Mar 12, 2025
3d7f2d1
setting ignore to course-information
KadeStyron Mar 12, 2025
97baa47
template application property
KadeStyron Mar 13, 2025
fa5421d
changed application.properties to a template
KadeStyron Mar 13, 2025
5a8d6e3
synced with main branch
GriffRob1 Mar 13, 2025
e43699a
Merge branch 'dev' of https://github.com/GriffRob1/Optimal-Schedule-B…
GriffRob1 Mar 13, 2025
da9b92b
added computeStartTime, computeEndTime, and computeGapDay methods
GriffRob1 Mar 13, 2025
a4458ef
Array
hilton326 Mar 14, 2025
571da47
New saved plan design under way!
hilton326 Mar 15, 2025
2302546
scraping works
whitnotmax Mar 17, 2025
04cca4e
Update RateMyProfessorScraper.java
whitnotmax Mar 17, 2025
549deed
Deleted enpoints and methods
Vekromion Mar 17, 2025
2daa3a2
Fixing pnpm build warnings
SidhantDash Mar 17, 2025
92eeef9
in meeting work
BryantMonahan Mar 17, 2025
6ca09d8
Merge pull request #640 from BryantMonahan/dev
KadeStyron Mar 17, 2025
67848cc
Added getCoordinates
akira23456 Mar 17, 2025
842eaad
Merge pull request #639 from SidhantDash/dev
garrett-plumlee Mar 17, 2025
8ea7d6f
Fixed spring boot from crashing
BryantMonahan Mar 18, 2025
9c441ea
Merge pull request #646 from BryantMonahan/dev
KadeStyron Mar 18, 2025
5e4b797
Merge branch 'dev' into dev
KadeStyron Mar 18, 2025
a30fa02
Merge pull request #642 from akira23456/dev
KadeStyron Mar 18, 2025
238c1e5
Merge branch 'dev' of https://github.com/KadeStyron/Kade-Optimal-Sche…
KadeStyron Mar 18, 2025
3379f76
Revert "Merge pull request #642 from akira23456/dev"
KadeStyron Mar 18, 2025
a401cfb
Merge pull request #647 from KadeStyron/dev
KadeStyron Mar 18, 2025
641006b
Icons added!
hilton326 Mar 18, 2025
36813f3
Merge pull request #616 from GriffRob1/dev
Garrett-M-code Mar 18, 2025
3ba7b9e
Fixed Bugs in BruteForceUtil
Garrett-M-code Mar 18, 2025
469ef9b
Cleaned up code in BruteForcePrototype and ScheduleUtil
Garrett-M-code Mar 18, 2025
c083384
Added distance computation based on coordinates.
Garrett-M-code Mar 18, 2025
08899e2
Fixed the conversion from webscraping to database obejcts but there …
BryantMonahan Mar 18, 2025
3ce8f7c
Merge pull request #650 from BryantMonahan/dev
KadeStyron Mar 18, 2025
107630d
worked on downloading the buildings
KadeStyron Mar 18, 2025
fe2e682
added buildings to database
KadeStyron Mar 18, 2025
56272d4
building data is live
KadeStyron Mar 19, 2025
8de9c5e
Merge pull request #651 from KadeStyron/dev
KadeStyron Mar 19, 2025
03f804c
Merge pull request #637 from Vekromion/deleting-uneeded-getenpoints/s…
JackHarrington3 Mar 19, 2025
7859782
added getSectionDetails back
JackHarrington3 Mar 19, 2025
fe85581
Merge pull request #653 from JackHarrington3/dev
JackHarrington3 Mar 19, 2025
b4f973a
Added location access for springboot
Garrett-M-code Mar 20, 2025
9383e9a
Relocated Algorithm into backend for easier access
Garrett-M-code Mar 20, 2025
ae395c6
Fixed old algorithm version to stop any syntax errors
Garrett-M-code Mar 20, 2025
8c6ab69
Corrected old dependencies
Garrett-M-code Mar 20, 2025
d8ab331
Merge pull request #655 from Garrett-M-code/dev
Garrett-M-code Mar 20, 2025
a7fe5a8
Added new TimeDistanceFilters component for Filters Component
ttn64681 Mar 20, 2025
8a8bcad
New Styling for Schedule View
adogins Mar 20, 2025
9d6a0e2
(Prettier issue) Added Time and Distance Filters Component
ttn64681 Mar 20, 2025
a06e85e
Update WeekSchedule.tsx
adogins Mar 20, 2025
021a322
Update page.tsx
adogins Mar 20, 2025
0565855
Update page.tsx
adogins Mar 20, 2025
9f3f376
Merge branch 'dev' into dev
ttn64681 Mar 20, 2025
2f4c761
Fixing Merge Commit Failed Check
ttn64681 Mar 20, 2025
96b37ea
Merge pull request #657 from ttn64681/dev
garrett-plumlee Mar 20, 2025
c2c1d39
fized duplicate building code bug
KadeStyron Mar 21, 2025
937706b
Merge pull request #658 from KadeStyron/dev
KadeStyron Mar 21, 2025
736b549
A SAVED PLAN IS PASSED INTO SCHEDULES LET'S GO
hilton326 Mar 22, 2025
b231756
Update page.tsx
adogins Mar 22, 2025
f4c5acf
LOCAL STORAGE IS WORKING
hilton326 Mar 22, 2025
5b7d052
Merge pull request #656 from adogins/dev
garrett-plumlee Mar 22, 2025
7ff172b
Corrected Compile errors
Garrett-M-code Mar 23, 2025
fc0e542
Removed depreciated file
Garrett-M-code Mar 23, 2025
9210ada
Merge pull request #662 from Garrett-M-code/dev
Garrett-M-code Mar 23, 2025
201bdba
added service method and endpoint for get course details by crn
bfuhriman Mar 23, 2025
465ac22
Schedule cycling implemented
hilton326 Mar 23, 2025
b847922
added getLatitude and getLongitude
JackHarrington3 Mar 24, 2025
6922277
Merge pull request #668 from JackHarrington3/dev
JackHarrington3 Mar 24, 2025
113c792
Merge pull request #669 from whitnotmax/rate-my-professor-scraping
KadeStyron Mar 24, 2025
0ded000
added meeting times and days to course section
KadeStyron Mar 24, 2025
558e758
Merge pull request #672 from KadeStyron/dev
KadeStyron Mar 24, 2025
6488037
fixed algo stuff
JackHarrington3 Mar 24, 2025
d4c17a9
Merge pull request #673 from JackHarrington3/dev
JackHarrington3 Mar 24, 2025
9f407bf
Fixed the CourseHour Display
akira23456 Mar 24, 2025
d5ea249
Merge branch 'dev' into dev
KadeStyron Mar 24, 2025
0f58051
Merge pull request #674 from akira23456/dev
KadeStyron Mar 24, 2025
66485a1
Fixed saved plans retrieving in wrong order
hilton326 Mar 24, 2025
b18901c
Prettier
hilton326 Mar 24, 2025
3e2a7d7
Revert "Fixed the CourseHour Display"
KadeStyron Mar 24, 2025
c8f0ce0
Merge pull request #681 from DevDogs-UGA/revert-674-dev
KadeStyron Mar 24, 2025
c60f713
Merge branch 'dev' into test
hilton326 Mar 24, 2025
10d301d
Added new WeekSchedule component
hilton326 Mar 24, 2025
27fbc40
Merge branch 'dev' into main
bfuhriman Mar 24, 2025
33a2bfd
fixed bugs and now database populates correctly
KadeStyron Mar 24, 2025
0345f72
Merge branch 'dev' into dev
KadeStyron Mar 24, 2025
79c41bc
Merge pull request #682 from KadeStyron/dev
KadeStyron Mar 24, 2025
f2b8a9d
fixed parsing error
KadeStyron Mar 25, 2025
00307aa
Merge branch 'dev' of https://github.com/KadeStyron/Kade-Optimal-Sche…
KadeStyron Mar 25, 2025
933fff2
Merge pull request #683 from KadeStyron/dev
KadeStyron Mar 25, 2025
5a02328
Fixed Webpage flows
Mustafa-K4 Mar 25, 2025
bb3d248
Transfer delete button work over to desktop PC
hilton326 Mar 25, 2025
0c56707
Removed Red button
Mustafa-K4 Mar 25, 2025
570329f
prittier
Mustafa-K4 Mar 25, 2025
608ee4b
Prettier intall
Mustafa-K4 Mar 25, 2025
74b7b7e
Plan deletion + deletion confirmation
hilton326 Mar 25, 2025
eeb1269
Prettier
hilton326 Mar 25, 2025
22d611d
Link wasn't imported correctly?
hilton326 Mar 25, 2025
19a47df
Deleted unused file
hilton326 Mar 25, 2025
d5a90a5
Installed ESLint for Vscode, hopefully the code is organized now
hilton326 Mar 25, 2025
a98998a
suspense boundary for searchparams
hilton326 Mar 25, 2025
9c75fd1
prettier AGAIN
hilton326 Mar 25, 2025
74de768
Stupid temp solution maybe
hilton326 Mar 25, 2025
c99ce98
prettier x3
hilton326 Mar 25, 2025
e419705
...
hilton326 Mar 25, 2025
6d7f374
prettier x4
hilton326 Mar 25, 2025
110edaa
ScheduleDisplay component
hilton326 Mar 25, 2025
bce41a8
Merge pull request #684 from MustafaK4/dev
garrett-plumlee Mar 25, 2025
a22c4a1
Merge pull request #663 from bfuhriman/main
JackHarrington3 Mar 25, 2025
4d38b70
Merge branch 'dev' into test
hilton326 Mar 26, 2025
078273f
Attempt to remove old saved plans page page
hilton326 Mar 26, 2025
69e7122
Merge pull request #685 from hilton326/test
garrett-plumlee Mar 27, 2025
abcdf9a
Schedule Pinning Implemented
hilton326 Mar 27, 2025
d4bb343
Here are the beginning steps. #545
Ig0rGon Mar 28, 2025
53a530f
Finished pinning functionality!
hilton326 Mar 28, 2025
d629848
Merge branch 'dev' into test
hilton326 Mar 28, 2025
9641b15
lowercase link, remember that...
hilton326 Mar 28, 2025
807f700
Merge branch 'dev' into bulletin-scraping
whitnotmax Mar 28, 2025
16d9088
Getting descriptions works on requirementgroup objects
whitnotmax Mar 28, 2025
2f9e533
standalone scraper
whitnotmax Mar 28, 2025
386becd
Fixed some bugs for credit hours
KadeStyron Mar 29, 2025
9136ed5
Merge pull request #689 from KadeStyron/dev
KadeStyron Mar 29, 2025
21e64ce
Merge pull request #687 from Ig0rGon/dev
KadeStyron Mar 29, 2025
92965aa
Added professor stars and number of reviews in CourseBlock
SidhantDash Mar 29, 2025
acb74b2
Merge pull request #688 from hilton326/test
garrett-plumlee Mar 30, 2025
114cc0c
Merge pull request #690 from SidhantDash/dev
garrett-plumlee Mar 30, 2025
5d51c4c
Renamed Pages
hilton326 Mar 30, 2025
6ee1893
Merge branch 'dev' into test
hilton326 Mar 30, 2025
4a20771
Merge pull request #691 from hilton326/test
garrett-plumlee Mar 30, 2025
7b778cd
Navbar and Footer (MVP Version) #670
ttn64681 Mar 31, 2025
3b6352f
(Prettier) Navbar and Footer (MVP Version) #670
ttn64681 Mar 31, 2025
e2059fe
Homepage Updates (MVP Version) #676
ttn64681 Mar 31, 2025
afe8460
Merge pull request #692 from ttn64681/dev
garrett-plumlee Mar 31, 2025
e96098e
changed getCoordinatesByBuildingNumber to getCoordinatesByBuildingCode
JackHarrington3 Mar 31, 2025
ee98bd2
Merge pull request #693 from JackHarrington3/dev
JackHarrington3 Mar 31, 2025
3586e7c
Merge branch 'dev' into bulletin-scraping
KadeStyron Mar 31, 2025
d914aa0
Merge pull request #694 from whitnotmax/bulletin-scraping
KadeStyron Mar 31, 2025
24863b5
Revert "Here are the beginning steps. #545"
KadeStyron Mar 31, 2025
f823929
Merge pull request #695 from DevDogs-UGA/revert-687-dev
KadeStyron Mar 31, 2025
c778df5
fix combobox overflow in chromium browsers
sloanfinger Mar 31, 2025
c29587f
course descriptions in DB
whitnotmax Mar 31, 2025
edd90d0
fix scrolling issue
sloanfinger Mar 31, 2025
bf359f9
fix formatting issues
sloanfinger Mar 31, 2025
a4b3d7a
Fixed arrows/schedule titles not centering properly on schedule selec…
hilton326 Mar 31, 2025
06b7062
prettier
hilton326 Mar 31, 2025
6f8b240
Merge pull request #703 from whitnotmax/add-course-description-to-db-…
KadeStyron Mar 31, 2025
872e256
Merge pull request #700 from hilton326/test
garrett-plumlee Apr 1, 2025
0c6d04c
Merge pull request #705 from sloanfinger/dev
garrett-plumlee Apr 1, 2025
bbad745
fixed Description Scraper stuff
KadeStyron Apr 3, 2025
952c5f6
Merge branch 'DevDogs-UGA:dev' into dev
KadeStyron Apr 3, 2025
0afd459
Merge pull request #714 from KadeStyron/dev
KadeStyron Apr 3, 2025
158be4c
Revert "Revert "Here are the beginning steps. #545""
KadeStyron Apr 3, 2025
a48dac6
Merge pull request #715 from DevDogs-UGA/revert-695-revert-687-dev
KadeStyron Apr 3, 2025
2f3b239
continued working on professor
KadeStyron Apr 3, 2025
30fcaef
slight update
KadeStyron Apr 3, 2025
ac2f5a0
Merge pull request #717 from KadeStyron/dev
KadeStyron Apr 3, 2025
8863dce
Removed Modify and Shuffle Buttons + Updated Front Page Design
ttn64681 Apr 3, 2025
b614d86
Merge pull request #718 from ttn64681/dev
garrett-plumlee Apr 3, 2025
e4a324c
Updated footer for mobile view, minor improved to responsive web desi…
SidhantDash Apr 4, 2025
b4a73e3
Merge branch 'dev' of https://github.com/SidhantDash/Optimal-Schedule…
SidhantDash Apr 4, 2025
d16be33
Fixed merge conflict with page, minor changes to footer
SidhantDash Apr 4, 2025
a49246f
Merge pull request #722 from SidhantDash/dev
garrett-plumlee Apr 4, 2025
11fb557
fixed border colors for course blocks
hilton326 Apr 4, 2025
b0b2bfd
Changed Lab courses to have the same colors as the corresponding class
hilton326 Apr 4, 2025
3d854a8
Merge pull request #724 from hilton326/test
garrett-plumlee Apr 5, 2025
3107bd9
Restyle Timestamps for WeekSchedule
SidhantDash Apr 6, 2025
8027133
uncommented getAllSubjects()
JackHarrington3 Apr 7, 2025
edb33c9
Merge pull request #729 from JackHarrington3/dev
JackHarrington3 Apr 7, 2025
338378e
Merge pull request #727 from SidhantDash/dev
garrett-plumlee Apr 7, 2025
dabb660
#680 Added Image Backgrounds to create, my plans, and schedule. + Not…
ttn64681 Apr 7, 2025
811352a
prettier changes
ttn64681 Apr 7, 2025
ab05087
Started fixing class Entity Sections and debugging and debugged some …
KadeStyron Apr 7, 2025
58e0e82
added algorithm service method
JackHarrington3 Apr 7, 2025
4c0bb80
Merge branch 'DevDogs-UGA:dev' into dev
JackHarrington3 Apr 7, 2025
8bfab54
Merge pull request #734 from JackHarrington3/dev
JackHarrington3 Apr 7, 2025
878e56e
oops I deleted the pom
KadeStyron Apr 7, 2025
79a8d6a
Merge pull request #735 from KadeStyron/dev
KadeStyron Apr 7, 2025
348049e
Merge branch 'DevDogs-UGA:dev' into dev
ttn64681 Apr 7, 2025
542eb66
getRecommendedSchedule endpoint created
Vekromion Apr 7, 2025
b82f404
fixed white space at top of schedules page
ttn64681 Apr 7, 2025
e232533
Merge pull request #737 from Vekromion/getRecommendedSchedules-endpoint
JackHarrington3 Apr 7, 2025
c937fe5
Merge branch 'DevDogs-UGA:dev' into dev
ttn64681 Apr 7, 2025
ceddd22
prettier update part 2
ttn64681 Apr 7, 2025
593fc96
Merge branch 'dev' of https://github.com/ttn64681/Optimal-Schedule-Bu…
ttn64681 Apr 7, 2025
c2c7b02
Merge pull request #739 from ttn64681/dev
garrett-plumlee Apr 7, 2025
eaa2a3f
Updated default pre/co reqs
Mustafa-K4 Apr 8, 2025
d83d925
Lots of changes, now everything works but the professor data
KadeStyron Apr 9, 2025
7fcba8c
Don't include this
KadeStyron Apr 9, 2025
6ee8f30
Merge pull request #742 from KadeStyron/dev
KadeStyron Apr 9, 2025
2802ce2
my plans updates
sloanfinger Apr 9, 2025
5c34820
Fixed overflowing schedule cards
hilton326 Apr 10, 2025
982a1bb
merge upstream, minor fixes
sloanfinger Apr 10, 2025
75ebb5c
prettier
sloanfinger Apr 10, 2025
255da8b
actually remove /my-plans
sloanfinger Apr 10, 2025
80cd35d
fix build issues
sloanfinger Apr 10, 2025
073f4e7
prettier 2
sloanfinger Apr 10, 2025
5c82ada
prettier 3
sloanfinger Apr 10, 2025
bda7af1
Updated to ubuntu 24.04
Mustafa-K4 Apr 10, 2025
d7c570f
Updated pnpm-lock.yaml
Mustafa-K4 Apr 10, 2025
2daefcc
Format Check added
Mustafa-K4 Apr 10, 2025
33628d0
Prettier call
Mustafa-K4 Apr 10, 2025
530b97f
Frontend pnpm-lock prettier
Mustafa-K4 Apr 10, 2025
be889a2
converted meeting Times to start and end
KadeStyron Apr 10, 2025
b1a46b9
changed time Strings to LocalTime and added parser
KadeStyron Apr 10, 2025
90386be
finalized time parser
KadeStyron Apr 10, 2025
18d2410
Merge pull request #744 from KadeStyron/dev
KadeStyron Apr 10, 2025
ad4d843
break before trying to change RMP Scraper format
KadeStyron Apr 10, 2025
4ea9091
Merge pull request #741 from MustafaK4/dev
garrett-plumlee Apr 11, 2025
5df6108
Merge branch 'dev' into dev
garrett-plumlee Apr 11, 2025
78c457c
Merge pull request #743 from sloanfinger/dev
garrett-plumlee Apr 11, 2025
bcd9b9b
Professor Rating is not going to work without API key
KadeStyron Apr 11, 2025
efc7321
Merge pull request #745 from KadeStyron/dev
KadeStyron Apr 11, 2025
1b30701
fixed algo endpoint, getLatitude, getLongitude
JackHarrington3 Apr 11, 2025
86b9a0f
Merge pull request #746 from JackHarrington3/dev
JackHarrington3 Apr 11, 2025
201d4d6
ACTUALLY restyled timestamps for WeekSchedule
SidhantDash Apr 11, 2025
8abfd56
Prettier fix
SidhantDash Apr 11, 2025
7da71a3
Shortened / bolded timestamps
SidhantDash Apr 11, 2025
d84bcbe
modified it, to optomize running in AWS
KadeStyron Apr 12, 2025
f68a387
fixed service after I changed how some variables are stored
KadeStyron Apr 12, 2025
186dfcc
begin filters page layout rework
sloanfinger Apr 12, 2025
a12f459
complete filters rework
sloanfinger Apr 13, 2025
cc47fda
Merge branch 'dev' of https://github.com/DevDogs-UGA/Optimal-Schedule…
sloanfinger Apr 13, 2025
4797bca
Merge pull request #1 from sloanfinger/wip/filters-mobile-view
sloanfinger Apr 13, 2025
243de8e
prettier ci compliance
sloanfinger Apr 13, 2025
6bfee70
Ensured there isn't infinite recursion and got it ready for integrati…
KadeStyron Apr 13, 2025
c2413b1
created jar snapshots up to 2.0.1, hopefully final
KadeStyron Apr 14, 2025
3b9ef0f
fixed issue where courseSections updateFrom didn't include seatsAvail…
KadeStyron Apr 14, 2025
52f1113
Merge pull request #750 from KadeStyron/dev
KadeStyron Apr 14, 2025
4708c09
Merge pull request #747 from SidhantDash/dev
garrett-plumlee Apr 14, 2025
9cb5129
Merge pull request #748 from sloanfinger/dev
garrett-plumlee Apr 14, 2025
7d1fcb0
Merge branch 'dev' into test
hilton326 Apr 14, 2025
0b9744f
fixed path for algorithm endpoint
JackHarrington3 Apr 14, 2025
c3c62f1
Merge pull request #756 from JackHarrington3/dev
JackHarrington3 Apr 14, 2025
3e28a96
Merge pull request #753 from hilton326/test
garrett-plumlee Apr 14, 2025
0fbcb8b
Updated Borders for Create Page (Again)
ttn64681 Apr 21, 2025
a2ed9c9
Changed Borders of Create Page (prettier update)
ttn64681 Apr 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ./frontend

name: Build and lint
steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ node_modules/
# Environment variables
.env
.env.*

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import edu.uga.devdogs.sampledataparser.records.SConstraints;
import edu.uga.devdogs.sampledataparser.records.Section;

import java.sql.Array;
import java.util.*;

public class BruteForcePrototype {
Expand Down Expand Up @@ -42,9 +41,6 @@ public static int[][] algorithmDriver(Set<Course> inputCourses, Map<String, Map<
return optimize(outputCourses, distances, softConstraints,false);
} catch (Exception e){
// If an exception arises from dataPreSoftFilter, we will call an overloaded version of optimize().
// The overloaded version is not written yet, so when it is actually implemented,
// this catch block will need updated accordingly.
System.out.println(e.getMessage());
//outputCourses = BruteForceUtil.dayOfWeekConvert(outputCourses);
return optimize(outputCourses, distances, softConstraints, true);
}
Expand Down Expand Up @@ -76,7 +72,7 @@ public static int[][] optimize(Set<Course> inputCourses, Map<String, Map<String,
List<Schedule> sortedSchedules = new ArrayList<>();
List<Double> sortedOverallObjectives = new ArrayList<>();


// Makeshift Priority Queue; An array sorted by a variable (in this case, overallObjective).
// Before an item is added, you find where it should be placed so that the List is still sorted correctly
// Without having to call a special sorting function.
Expand Down Expand Up @@ -167,8 +163,8 @@ private static void generateValidSchedulesRecursive(Set<Section> sections, List<
// Instantiates the set of sections for the next iteration
HashSet<Section> nextSections = new HashSet<>(sections);
nextSections.add(sectionToAdd);

generateValidSchedulesRecursive(nextSections, nextCoursesToAdd, validSchedules);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import edu.uga.devdogs.sampledataparser.records.*;
import edu.uga.devdogs.sampledataparser.records.Class;
import edu.uga.devdogs.bruteforceprototype.schedule.Schedule;

import java.time.DayOfWeek;
import java.util.ArrayList;
Expand Down Expand Up @@ -157,8 +158,9 @@ public static DayOfWeek daySwitch(String day) {
*
* @param inputCourses user inputted courses.
* @param validSchedules a set of valid generated schedules
* @throws Exception if {@code courseInSchedule} if true
*/
public static void ensureInitialCourses(Set<Course> inputCourses, Set<Schedules> validSchedules) {
public static void ensureInitialCourses(Set<Course> inputCourses, Set<Schedule> validSchedules) throws Exception {
boolean courseInSchedule = false;
// for every user inputted course
for (Course c : inputCourses) {
Expand All @@ -167,12 +169,12 @@ public static void ensureInitialCourses(Set<Course> inputCourses, Set<Schedules>
// for every section in said schedule
for (Section sect : s.sections()) {
// if the course the user inputted, c, is in the schedule, s
if (c.courseCode == sect.courseCode) {
if (c.courseCode().equals(sect.courseCode())) {
courseInSchedule = true;
} // if
} // for
if (!courseInSchedule) {
throw new Exception("Schedule does not contain specified course.")
throw new Exception("Schedule does not contain specified course.");
} // if
} // for
} // for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ public Set<Section> sections() {
public EnumMap<DayOfWeek, TreeSet<Class>> days() {
return days;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
import edu.uga.devdogs.sampledataparser.records.Class;
import edu.uga.devdogs.sampledataparser.records.HConstraints;

//import edu.uga.devdogs.course_information.service;
//import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.EnumMap;
import java.util.Set;

import java.time.DayOfWeek;
import java.time.LocalTime;



/**
* Utility class for performing operations and calculations related to a Schedule.
Expand All @@ -22,6 +30,10 @@
*/
public class ScheduleUtil {

// Used for bootstrap getting coords
//@Autowired
//private CourseInformationService courseInformationService;

/**
* Validates the given schedule by checking for any time conflicts between classes.
* A time conflict occurs when two classes overlap in their scheduled times.
Expand Down Expand Up @@ -86,7 +98,7 @@ public static double computeAverageProfessorQuality(Schedule schedule) {

/**
* Checks if schedule or constraints is null and throws an exception if it is.
*
*
* @param schedule the schedule to validate
* @param constraints the constraints to validate
*/
Expand Down Expand Up @@ -115,22 +127,46 @@ public static double computeMaxDistance(Schedule schedule, Map<String, Map<Strin
// Iterates over each day in the schedule
for (TreeSet<Class> day : schedule.days().values()) {
// Converts the TreeSet to List for direct indexing
// TODO: Replace TreeSet with a sorted List for days in Schedule
List<Class> dayList = new ArrayList<>(day);

// Iterates over consecutive class pairs
for (int i = 0; i < dayList.size() - 1; i++) {
Class currClass = dayList.get(i);
Class nextClass = dayList.get(i + 1);
double distance = distances.get(currClass.buildingName()).get(nextClass.buildingName());

double lat1 = 0.0;//courseInformationService.getLatitude(currClass.buildingNumber());
double lon1 = 0.0; //courseInformationService.getLongitude(currClass.buildingNumber());
double lon2 = 0.0; //courseInformationService.getLongitude(nextClass.buildingNumber());
double lat2 = 0.0; //courseInformationService.getLatitude(nextClass.buildingNumber());

// distance between latitudes and longitudes
double dLat = Math.toRadians(lat2 - lat1);
double dLon = Math.toRadians(lon2 - lon1);

// convert to radians
lat1 = Math.toRadians(lat1);
lat2 = Math.toRadians(lat2);

// apply Haversine formula
double a = Math.pow(Math.sin(dLat / 2), 2) +
Math.pow(Math.sin(dLon / 2), 2) *
Math.cos(lat1) *
Math.cos(lat2);

// Earth's radius in miles
double rad = 3960;
double c = 2 * Math.asin(Math.sqrt(a));
double distance = rad * c;

if (distance > maxDistance) {
maxDistance = distance;
}
}
}

return maxDistance;
// dimensional analysis. Average human walking speed is 3 miles per hour.
// miles * (hours/miles) * (minutes/hours)
return maxDistance * (1/3) * (60);
}

/**
Expand Down Expand Up @@ -174,6 +210,63 @@ public static double computeAverageIdleTime(Schedule schedule) {
return (double) sumOfTimeGaps / countOfClassGaps;
}



/**
* Computes the earliest start time of all classes in a schedule
*
* @param schedule the schedule for which to compute the earliest start time
* @return the earliest start time (in hours) as a double. For example, 4:30 pm would be represented as 16.5
*/
public static double computeStartTime(Schedule schedule) {
LocalTime earliestStartTime = LocalTime.of(23,59,59);
for (Section eachSection : schedule.sections()) {
for (Class eachClass : eachSection.classes()) {
if (eachClass.startTime().isBefore(earliestStartTime)) {
earliestStartTime = eachClass.startTime();
}
}
}
return earliestStartTime.getHour() + (double) earliestStartTime.getMinute() / 60;
}



/**
* Computes the latest start time of all classes in a schedule
*
* @param schedule the schedule for which to compute the latest start time
* @return the latest start time (in hours) as a double. For example, 4:30 pm would be represented as 16.5
*/
private static double computeEndTime(Schedule schedule) {
LocalTime latestStartTime = LocalTime.of(0,0,0);
for (Section eachSection : schedule.sections()) {
for (Class eachClass : eachSection.classes()) {
if (eachClass.startTime().isAfter(latestStartTime)) {
latestStartTime = eachClass.startTime();
}
}
}
return latestStartTime.getHour() + (double) latestStartTime.getMinute() / 60;
}



/**
* Determines whether a given schedule has zero classes on a given day
*
* @param schedule the schedule for which to compute whether it has a gap day or not
* @param gapDay the day that is being checked as a gap day or not
* @return {@code true} if the given schedule has no classes on the given day, {@code false} if it has at least one class
*/
private static boolean computeGapDay(Schedule schedule, DayOfWeek gapDay) {
EnumMap<DayOfWeek, TreeSet<Class>> days = schedule.days();
TreeSet<Class> classes = days.get(gapDay);
return classes.isEmpty();
}



/**
* Computes the overall objective score for the given schedule based on weighted objectives.
* This method computes each objective, normalizes their values using min-max normalization, and computes a weighted sum.
Expand All @@ -185,10 +278,10 @@ public static double computeAverageIdleTime(Schedule schedule) {
* @return the overall objective score for the schedule
*/
public static double computeOverallObjective(Schedule schedule, Map<String, Map<String, Double>> distances) {
// Checks if the parameters are valid
if (schedule == null || distances == null) {
throw new IllegalArgumentException("Parameters cannot be null");
}
// Checks if the parameters are valid
if (schedule == null || distances == null) {
throw new IllegalArgumentException("Parameters cannot be null");
}

// The minimum rating on rate my professor is 1.0(if they have ratings).
final double professorQualityMinimum = 1.0;
Expand Down Expand Up @@ -251,7 +344,7 @@ public static double computeOverallObjectiveExtended(Schedule schedule, Map<Stri
possSConstraintsCount++;
}
if (softConstraints.prefStartTime() != null) {
possSConstraintScore += normalizeValue(computeStartTime(schedule), prefTimeMinimum, prefTimeMaximum);;
possSConstraintScore += normalizeValue(computeStartTime(schedule), prefTimeMinimum, prefTimeMaximum);
possSConstraintsCount++;
}
if (softConstraints.prefEndTime() != null) {
Expand Down Expand Up @@ -310,4 +403,4 @@ public static int[] sectionsToInts(Set<Section> sections) {
return output;
}

}
}
Binary file not shown.
Loading