Help
FAQ
Some questions which come up, well… frequently.
Preparation
What do I need from the maths prerequisites?
You should be comfortable with basic linear algebra (matrix and vector notation, visualisation, operators, transpose, rank, and solving linear systems) and with partial derivatives and vector calculus, including first and second derivatives and gradients using the ∇ operator. See Books and links below for suggested resources.
Where can I sign up for labs?
No sign-up is required. If your assigned session clashes with something else, you may join the other session instead.
PuLP
Can't import pulp: package not found
Running from the command line, use python3, not python (which links to Python 2). In an IDE, check the interpreter/environment points at the right Python install: on the SoCo Linux image that's /usr/bin/python3. The Anaconda environment doesn't have PuLP installed.
Importing pulp gives an ImportError about "clock" from "time"
A version mismatch: Python 3.8 deprecated something PuLP 1.6.x relies on. Install a more recent version of PuLP to fix it.
Getting help
If you're feeling lost, that's fine: the lecturer and tutors want to help, so ask. Course-content questions belong on Ed Discussions; for anything more private, email Felipe Trevizan directly (see Getting in touch in Policies for what counts as private).
CECS Student Experience
ANU CS Students' Association
Course feedback (anonymous) goes to the course rep, or directly via cecs.anu.edu.au/course-feedback.
Software setup
The SoCo Linux image runs python3 3.12, PuLP 2.7.0 and the cbc 2.10.12 solver from week 2. Assignments are tested only against these versions, so check your own setup against the SoCo Linux environment before submitting.
Where to run it
- SoCo Linux labs (CSIT and Hanna Neumann buildings)
- Virtual Desktop Infrastructure (VDI): remote access
- A virtual machine running the SoCo Linux image
- SSH to the
partchstudent server - A native install on your own computer
Set up the VDI as a backup even if you use one of the other options: a native or bespoke setup won't get troubleshooting support.
Virtual machine
Based on the SoCo Ubuntu image; VirtualBox is recommended, with at least 8 GB RAM if you're running other programs at the same time.
sudo apt-get update
sudo apt-get install comp4691SSH to partch
Connect to partch.anu.edu.au. Add this to ~/.ssh/config:
Host partch
User uXXXXXXX
HostName partch.anu.edu.authen connect with ssh partch (add -X to tunnel a GUI session, though expect some lag). Copy files across with:
rsync local-file-to-copy partch:path/to/put/file/tmux is worth learning for terminal multiplexing over SSH.
Native install
Only the cbc backend solver is needed alongside PuLP. Three ways to install it:
Poetry
mkdir project
cd project
poetry init
poetry add pulp
poetry run pulptest
poetry run pythonthen, inside the Python prompt, import pulp. Reuse the same pyproject.toml across projects with poetry install; pyenv helps manage different Python versions alongside it.
Anaconda
conda install -c conda-forge pulpTest with import pulp in a Python console. The conda build of PuLP doesn't bundle cbc, so it falls back to the glpk solver unless you install cbc separately and put it on your path.
Ubuntu (apt)
sudo apt-get update
sudo apt-get install coinor-cbc python3-pulpThis apt build of PuLP is older and might be missing features we use in class: verify your code still runs on the VDI or partch before you submit.
Editors and IDEs
PuLP is pre-installed system-wide on SoCo Linux. Plain-text editors like gedit, vim and emacs all work fine, as does Codium (open-source VS Code, pre-installed); install its Python extension on first use, and check the interpreter in the bottom-left corner is set to /usr/bin/python3. Spyder and PyCharm work too, though PyCharm may need pointing at that same interpreter path. Run scripts from the command line with:
python3 file-to-run-that-imports-pulp.pyBooks and links
Maths prerequisites
Extra help with linear algebra or vector calculus:
- Linear Algebra (3rd edition, 3rd edition update, or 4th edition), by David Lay
- Essential Calculus (2nd edition), by James Stewart
- Elementary Linear Algebra: Applications Version (10th or 11th edition), by Howard Anton and Chris Rorres
Linear and mixed-integer programming
- AIMMS Optimization Modeling, by Johannes Bisschop, freely available online.
- A number of other linear and integer programming books are in the Hancock library basement, with single copies to browse.
Convex optimisation
- Convex Optimisation, by Stephen Boyd and Lieven Vandenberghe, freely available online. Familiar territory if you've done COMP4680/8650.