You will use Jupyter Notebook, Julia (v1.8.5), and Xpress throughout the course. Please follow the installation guidance below sequentially. Note that the screenshots in this instruction set are from an earlier version of Julia.
- If you already have Jupyter Notebook installed, go ahead and install Julia (jump right into the next step)
- If you don’t have Jupyter Notebook on your local machine, install Anaconda
-
Download Julia V1.8.5 and install: follow the installation instructions
-
Open Julia Command-Line: type in 'Julia' in the search bar and click on 'Julia 1.8.5'
-
In Julia Command-Line, type the following commands one after another
-
Now let's create your first Julia notebook!
-
Run jupyter notebook. (If you are not familiar with Jupyter Notebook, follow the short instruction here)
-
Click on the “New” button at the top right of your local jupyter notebook server, then choose “Julia 1.8.5”
-
Once a new jupyter notebook is set up, you should see Julia’s icon on the top right of the new notebook
-
- Go to the Xpress Community License application website and fill in your information to apply for a community license
- Once submit, you'll be directed to a download page. Choose the Xpress (Workbench, Mosel & Solver) installation package that suits your operation system
-
Run the installation file once downloaded. Choose 'continue to install' or 'trust' or 'open' this app on receipt of security warning
-
Installation begins
-
For Windows
-
Click on 'setup' if prompted (see instructions here)
-
Follow the instructions, choose the 'Community License' when asked
-
When you see the 'Choose Destination Location' page, make sure you know where Xpress is installed. The path will come handy for you at a later stage.
-
-
For Mac
- Follow the instructions here
-
-
Tick the box “Yes, install the Xpress Kalis Mosel addon” when asked
-
Add the Xpress path to the environment variables (Important!)
-
For Windows
-
Manually add the 'XPRESSDIR\bin' to the Windows environment path
You can directly type in 'system properties' in your search bar or open your control panel. Then follow the below instrucction to change your system variables.
Control panel -> system -> advanced system settings -> system properties -> environment variables -> change system variables -> add YOUR_XPRESS_INSTALLATION_DIRECTORY (e.g. C:\xpressmp\bin)
(see here for a step-by-step illustration)
-
Restart your laptop
-
Now you are good to move to the next step!
-
-
For Mac
-
Open your terminal
-
Type in
export XPRESSDIR=YOUR_XPRESS_INSTALL_DIRECTORY
and press Enterreplace the
YOUR_XPRESS_INSTALL_DIRECTORY
with your own Xpress installation pathThe default path is "/Applications/FICO Xpress/Xpress Workbench.app/Contents/Recourses/xpressmp".
So the command for you can be
export XPRESSDIR="/Applications/FICO Xpress/Xpress Workbench.app/Contents/Recourses/xpressmp"
One some Macs with Intel Chips, the path can be "/Applications/FICO Xpress/xpressmp" so you may have to type
export XPRESSDIR="/Applications/FICO Xpress/xpressmp"
You may have to navigate the directories to find out where xpressmp directory is located on your machine and use the appropriate path
-
Check whether the path is set by typing in
echo $XPRESSDIR
and press EnterIf you see your Xpress installation path echoed, you are good to move to the next step
-
Keep this window open when you move to the next step!
-
-
The wrapper allows you to use Xpress in your jupyter notebook
-
Open Julia Command-Line
-
for Windows
- Type 'Julia' in the windows search bar and then click on 'Julia 1.8.5'
-
for Mac
- Please use the same terminal window from the last step (when you add the path to the environment variable)
- Type in
exec '/Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia'
and press Enter to start Julia - Then follow the following steps
-
-
Type in
import Pkg
and press Enter -
Type in
Pkg.add("Xpress")
and press Enter. Wait for a while (reference) -
Type in
Pkg.add("JuMP")
and press Enter. Wait for a while (reference) -
Type in
Pkg.build("Xpress")
and press Enter. Wait for a while -
Test if installed by typing
using JuMP, Xpress
. If you see the return saying 'found lincense file', you are good to go!