If you want to add any new features to the idedas section of the discussions tab and ill try to implement them.
The goal is to automatically solve the SBC using the currently available players in the club with the minimum cost.
The project utilizes tamper monkey script to output the users Club Player Data. Install the tampermonkey extension and then install the frontend script
This script implements a number of backend functions but the main feature is a Solve SBC button on each SBC that send players to the backend solver. The solver will attempt to use the current sbc solution as a starting point. This means subsequent solves ( pushing solve sbc button ) will use the previous solve as a starting point.
Players will also get SBC Lock button to not send use this player in the solution (if its a duplicate it will get sent)
Also a set the cost of this player to 0 button so it will get most likely get used if it can be fit into the SBC. This is useful to get rid of high rated duplicates or overpriced SBCS.
Check out the settings menu item for extra details!
Run pip3 install -r requirements.txt to install the required dependencies.
To run the backend (now packaged under backend/), run:
cd backend
python -m uvicorn main:app --reload
- Google OR-Tools
- Python 3.9
- pandas
- openpyxl
- fastapi
- uvicorn
The constraints used in the program are created in the optimize.py file based of the SBC requirements and the optimization problem is solved using Google CP-SAT solver.
build:
docker build -t auto-sbc:latest .
then run:
docker run --rm -p 8000:8000 auto-sbc
You can create a single-file executable with PyInstaller and then wrap it in a user-friendly Windows installer (Inno Setup) that asks the user where to install the backend service.
- Build the one-file executable:
pyinstaller --onefile --noconfirm --name AutoSBCBackend backend/main.py
- (Optional) Build an installer (requires Inno Setup
isccon PATH):
python installer/build_installer.py --version 1.0.0
This produces an installer in dist/installer/AutoSBCBackendSetup-<version>.exe that:
- Prompts for install directory
- Installs
AutoSBCBackend.exeand README - Optionally adds a desktop shortcut & startup (Run at login) entry
- Uninstaller cleans up state/log files generated at runtime.
You can adjust install icon (pictures/solveBtn.ico) or add more files by editing installer/AutoSBCBackendInstaller.iss.
Thanks to Regista6 for showing the way with the google OR tools

