mobook / MO-book

Hands-On Optimization with Python
MIT License
153 stars 40 forks source link

Issue on page /notebooks/04/04-exam-room-scheduling.html #79

Closed jon-nowacki closed 3 months ago

jon-nowacki commented 8 months ago

Your issue content here.

I applied this fix and the software works

if 'google.colab' in sys.modules:
    %pip install pyomo >/dev/null 2>/dev/null
    %pip install highspy >/dev/null 2>/dev/null
    !apt-get install -y -qq coinor-cbc > coinor-cbc.log
    import sys
    solver = 'cbc'
    import pyomo.environ as pyo
    SOLVER = pyo.SolverFactory(solver, executable='/usr/bin/cbc')

assert SOLVER.available(), f"Solver {solver} is not available."
alessandrozocca commented 3 months ago

Thanks for spotting this error. The solver that should have been used should have been "appsi_highs" and not "cbc". The latest commit fixes it.