Course materials · Slide PDF · Download complete student pack (ZIP)
LP and Duality: do it yourself
Return to narrated slides · Guided demo video
เริ่มจากดาวน์โหลด Notebook แล้วเปิดใน JupyterLab หรือโปรแกรมที่รองรับ .ipynb เลือก Python kernel จากนั้นกด Shift+Enter รันทีละ cell จากบนลงล่าง ฟังเสียงประกอบแล้วหยุดลองทำก่อนเปิดผลที่คาดหวัง
Download practice Notebook · Python demonstration · Independent exercises · Answer key · Demo PDF
Setup and troubleshooting
The selected Python environment needs NumPy and SciPy. The notebook runs without API keys or internet once these packages are installed. In a notebook cell, import sys; print(sys.executable) shows its interpreter path. If needed, use your environment's package manager, or run uv pip install --python "/absolute/path/printed/above" numpy scipy in a terminal and restart the kernel.
Run steps in order in the same session. A NameError usually means an earlier setup cell was skipped. At alternative optima, compare feasibility and objective values rather than requiring one exact production vector. Numerical zeros may print as negative zero.
Reveal the actual demonstration output
Predict → run in Python → compare → explain. This page displays the code; it does not execute Python in your browser.
Spoken explanation
Complete the six independent exercises before opening the answer key. Expect about 45–60 minutes for the practical work, depending on your Python experience.
The video is a narrated code walkthrough using verified outputs, not a live screen recording. The Notebook contains the executable cells.
Reference: SciPy HiGHS documentation. Tested with SciPy 1.18.1.