Last active
March 26, 2025 10:19
-
-
Save mtearle/c2bfbf8350d77e3f113936bdbb31a90e to your computer and use it in GitHub Desktop.
Outer Core Station Selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from collections import deque | |
# Requirements | |
# | |
requirements = {} | |
# Southern Arm S1 CPF 2 | |
# S2 CPF 3 | |
# S3 CPF 2 | |
# S4 CPF 3 | |
# | |
requirements["S1"] = 2 | |
requirements["S2"] = 3 | |
requirements["S3"] = 2 | |
requirements["S4"] = 3 | |
# Northern Arm N1 CPF 2 | |
# N2 CPF 3 | |
# N3 CPF 3 | |
# N4 CPF 3 | |
# | |
requirements["N1"] = 2 | |
requirements["N2"] = 3 | |
requirements["N3"] = 3 | |
requirements["N4"] = 3 | |
# Eastern Arm E1 CPF 2 | |
# E2 CPF 3 | |
# E3 CPF 3 | |
# E4 CPF 3 | |
# | |
requirements["E1"] = 2 | |
requirements["E2"] = 3 | |
requirements["E3"] = 3 | |
requirements["E4"] = 3 | |
stationmap = {} | |
stationmap["FS225"] = "E1-1" | |
stationmap["FS226"] = "E1-2" | |
stationmap["FS227"] = "E1-3" | |
stationmap["FS228"] = "E1-4" | |
stationmap["FS229"] = "E1-5" | |
stationmap["FS230"] = "E1-6" | |
stationmap["FS231"] = "E2-1" | |
stationmap["FS232"] = "E2-2" | |
stationmap["FS233"] = "E2-3" | |
stationmap["FS234"] = "E2-4" | |
stationmap["FS235"] = "E2-5" | |
stationmap["FS236"] = "E2-6" | |
stationmap["FS237"] = "E3-1" | |
stationmap["FS238"] = "E3-2" | |
stationmap["FS239"] = "E3-3" | |
stationmap["FS240"] = "E3-4" | |
stationmap["FS241"] = "E3-5" | |
stationmap["FS242"] = "E3-6" | |
stationmap["FS243"] = "E4-1" | |
stationmap["FS244"] = "E4-2" | |
stationmap["FS245"] = "E4-3" | |
stationmap["FS246"] = "E4-4" | |
stationmap["FS247"] = "E4-5" | |
stationmap["FS248"] = "E4-6" | |
stationmap["FS249"] = "N1-1" | |
stationmap["FS250"] = "N1-2" | |
stationmap["FS251"] = "N1-3" | |
stationmap["FS252"] = "N1-4" | |
stationmap["FS253"] = "N1-5" | |
stationmap["FS254"] = "N1-6" | |
stationmap["FS255"] = "N2-1" | |
stationmap["FS256"] = "N2-2" | |
stationmap["FS257"] = "N2-3" | |
stationmap["FS258"] = "N2-4" | |
stationmap["FS259"] = "N2-5" | |
stationmap["FS260"] = "N2-6" | |
stationmap["FS261"] = "N3-1" | |
stationmap["FS262"] = "N3-2" | |
stationmap["FS263"] = "N3-3" | |
stationmap["FS264"] = "N3-4" | |
stationmap["FS265"] = "N3-5" | |
stationmap["FS266"] = "N3-6" | |
stationmap["FS267"] = "N4-1" | |
stationmap["FS268"] = "N4-2" | |
stationmap["FS269"] = "N4-3" | |
stationmap["FS270"] = "N4-4" | |
stationmap["FS271"] = "N4-5" | |
stationmap["FS272"] = "N4-6" | |
stationmap["FS273"] = "S1-1" | |
stationmap["FS274"] = "S1-2" | |
stationmap["FS275"] = "S1-3" | |
stationmap["FS276"] = "S1-4" | |
stationmap["FS277"] = "S1-5" | |
stationmap["FS278"] = "S1-6" | |
stationmap["FS279"] = "S2-1" | |
stationmap["FS280"] = "S2-2" | |
stationmap["FS281"] = "S2-3" | |
stationmap["FS282"] = "S2-4" | |
stationmap["FS283"] = "S2-5" | |
stationmap["FS284"] = "S2-6" | |
stationmap["FS285"] = "S3-1" | |
stationmap["FS286"] = "S3-2" | |
stationmap["FS287"] = "S3-3" | |
stationmap["FS288"] = "S3-4" | |
stationmap["FS289"] = "S3-5" | |
stationmap["FS290"] = "S3-6" | |
stationmap["FS291"] = "S4-1" | |
stationmap["FS292"] = "S4-2" | |
stationmap["FS293"] = "S4-3" | |
stationmap["FS294"] = "S4-4" | |
stationmap["FS295"] = "S4-5" | |
stationmap["FS296"] = "S4-5" | |
def get_step(): | |
return 19 | |
def extract_cluster(station): | |
return station[0:2] | |
stations = deque(list(stationmap.keys())) | |
picked = 0 | |
last_station = stations[-1] | |
current_station = stations[0] | |
station_picks = [] | |
while (picked < 32): | |
for x in range(0, get_step()): | |
current_station = stations.popleft() | |
stations.append(last_station) | |
last_station=current_station | |
if requirements[extract_cluster(stationmap[current_station])] > 0: | |
#print(current_station) | |
#print(stationmap[current_station]) | |
#print(extract_cluster(stationmap[current_station])) | |
#print("%s %s" % (stationmap[current_station], current_station)) | |
station_picks.append("%s %s" % (stationmap[current_station], current_station)) | |
requirements[extract_cluster(stationmap[current_station])] += -1 | |
picked += 1 | |
station_picks.sort() | |
for pick in station_picks: | |
print(pick) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment