knapsack scheduling algorithm

This commit is contained in:
2026-07-12 14:19:58 -04:00
parent 031da48ddd
commit 9e100d60d0
56 changed files with 1936 additions and 1286 deletions
+23 -18
View File
@@ -7,7 +7,7 @@ A test scheduler for the NJTH which compiles a best schedule according to the ru
- DUT test result directory path, REF test result directory path
- Estimated runtime for each type of test for calculations
- Rotation definition
- Test config definition
- Test exclusions
- Top priority tests
- Allow user to manually override and enter tests that needs to be run tonight
@@ -15,23 +15,30 @@ A test scheduler for the NJTH which compiles a best schedule according to the ru
## Output
### Backend
- Compile a schedule that would require the lowest amount of time in total according to the following rules and priority:
- Compile a schedule that would require the lowest amount of time and least amount of wasted time in total according to the following rules and priority:
- **Rules**
- Can be run in the same night
- Same rotation and same test point P2P/COE tests
- COERXBE002: T1F -> STA63, T2A -> STA56, T3E -> STA4, R3
- COERXBE003: T1F -> STA63, T2A -> STA56, T3E -> STA4, R3
- Different rotations but all stations are at same testpoints
- R2 P2PRXAC003 5G T1C -> STA4
- R1 P2PRXAC012 2G T1C -> STA4
- Same rotation and same test point P3P tests
- Needs to be run back to back
- Test Windows
- Weekday night time test window: Monday - Thursday
- Starts 5PM of that day, ends 9AM the next day
- Capcity: 17 hrs (16hrs + 1hr margin)
- Ex. Monday 6/29 5PM - Tuesday 6/30 9AM
- Weekday day time test window: Monday-Thursday
- Starts 9AM - 5PM of that day
- Capacity: 8 hrs
- Weekend test window: Friday - Sunday
- Starts Friday 5PM, ends Monday 9AM
- Capcity: 65 hrs (64hrs + 1hr margin)
- Holiday test window
- All tests in the same test window needs to have the same test config
- Tests are performed on one device in each test window, unless overrides by user
- Some tests needs to be run back to back
- P2P COE pairings
- Run P2P first then its COE pairings
- P2P up link (RX) and down link (TX)
- Ex. P2PRXAX001 and P2PTXAX001
- COE P2P bundle
- DUT and REF tests
- P3P throttled(TH) and unthrottled(UT)
- Same tests, different devices(DUT, REF) needs to be run in back to back test windows
- Ex. Monday
- **Priority**
- Default priority: COE P2P pair -> P2P only -> P3P
- 1: highest priority (must run tonight)
@@ -40,8 +47,6 @@ A test scheduler for the NJTH which compiles a best schedule according to the ru
- 4: P3P
- 5: lowest priority
- Priority 1 and 5 needs to be entered manually
- Same test points and same rotation will be run first
- Same test points but different will run if there is still remaining testing time for the day
- **Calculation**
- Use the estimate run time for each type of test to fit as many tests as possible in a shift of testing.
- Weekdays are 16hrs, weekends are 24 hours with 1hr margin
@@ -137,7 +142,7 @@ build_test_bundles():
- Create bundles of tests that needs to be run back to back
- Types of test bundles and their order
1. Failed tests rerun if exist
2. The base is P2P and has COE pairs: P2P on DUT -> COE pairings on DUT -> P2P on REF -> COE pairings on REF
2. The P2P and COE pairs: P2P -> COE pairings
3. P2P tests without COE pairs: P2PRX on DUT -> P2PTX on DUT -> P2PRX on REF -> P2PTX on REF
4. P3P tests (ALL ROT's)
```