Tools setup for Math 381

We will be using the following tools

Method 1: The Quickest Way:

Follow this guide. In particular install

  1. Docker for Windows/Mac. For linux read the guide above.
  2. Run docker run --rm -p 9001:9001 scipoptsuite/scipoptsuite:7.0.2-teach

Caveats: Docker is a very portable way to get started. However, each time you quit and restart docker, it resets everything. So you might have to download your files and upload. Read usage notes in the guide above.

Method 2: The slower but more permanent way:

Mathod 3: Google Colab way

Google Colab allows you a nice cloud computing (free) setup with python and jupyter. Unfortunately the PySCIPOpt module (for solving Linear Programs) does not come preinstalled.

!pip install -q condacolab
import condacolab
condacolab.install()
!conda install pyscipopt
from pyscipopt import Model
model = Model("Example")  # model name is optional
x = model.addVar("x")
y = model.addVar("y", vtype="INTEGER")
model.setObjective(x + y)
model.addCons(2*x - y*y >= 0)
model.optimize()
sol = model.getBestSol()
print("x: {}".format(sol[x]))
print("y: {}".format(sol[y]))

You should get the output

x: 0.0
y: 0.0

Some Remarks