Skip to main content
MyCourses MyCourses
  • Schools
    School of Arts, Design, and Architecture (ARTS) School of Business (BIZ) School of Chemical Engineering (CHEM) –sGuides for students (CHEM) – Instructions for report writing (CHEM) School of Electrical Engineering (ELEC) School of Engineering (ENG) School of Science (SCI) Language Centre Open University Library Aalto university pedagogical training program UNI (exams) Sandbox
  • CORONAVIRUS INFO
    Koronavirus - tietoa opiskelijalle Coronavirus - information for students Coronavirus - information för studerande Corona help for teachers
  • Service Links
    MyCourses - Instructions for Teachers - Teacher book your online session with a specialist - Digital tools for teaching - Personal data protection instructions for teachers - Instructions for Students - Workspace for thesis supervision Sisu Into portal for students Courses.aalto.fi Library Services - Resourcesguides - Imagoa / Open science and images IT Services Campus maps - Search spaces and see opening hours Restaurants in Otaniemi ASU Aalto Student Union Aalto Marketplace
  • ALLWELL?
    Study Skills Support for Studying Starting Point of Wellbeing About AllWell? study well-being questionnaire
  •   ‎(en)‎
      ‎(en)‎   ‎(fi)‎   ‎(sv)‎
  • Toggle Search menu
  • Hi guest! (Log in)

close

30E03500 - Data Science for Business II, 25.02.2019-11.04.2019

  1. Home
  2. Courses
  3. School of Business
  4. department of...
  5. 30e03500 - da...
  6. Sections
  7. Gurobi
 
Syllabus

Gurobi

  • Gurobi

    Gurobi

    Gurobi Installation guide

    For optimization, we’ll use the Gurobi Solver, one of the best solvers available. Gurobi is a commercial product but offers free academic licenses. It has a Python API that can be used from within Python code. The reference manual is here: http://www.gurobi.com/documentation/8.1/refman/index.html


    Since many seem to have problems installing Gurobi, we made this step-by-step guide.


    Step 1: Make a Gurobi account

    Go to http://www.gurobi.com/index , make a new account and register (might not work with Safari browser). Wait for a confirmation email, confirm and set a password. Log-in with your email and newly set password. 


    Step 2: Get Gurobi license

    Gurobi is a licensed product, however it offers a free academic license. This setup is the reason why each student has to request a license individually. Aalto cannot do that in bulk on your behalf. Once you have an account and are logged-in, you need to request a license. On the front page, click on "get Gurobi". 


    Then click "Academic Licenses". 


    Tick both boxes and click "Request License". The next page will show your license details. KEEP THIS PAGE OPEN!


    Step 3: Get the Gurobi Optimizer 

    Once you have an account and a license, you need to download the Gurobi Optimizer. This is a "real" program, not just a Python package. Click and open the "Get Gurobi" button (top right) in a new tab. DONT CLOSE THE LICENSE WINDOW. You will see the familiar Download Center, but this time click "Gurobi Optimzer".


    Accept the End User License Agreement on the next page. Download the latest version of Gurobi depending on your system (Windows, MacOS, Linux).


    Step 4: Install Gurobi Optimizer

    Before opening the downloaded file, ensure that you are connected to the Aalto network! This is how Gurobi verifies that you eligible for the academic license. Either you are physically on the Aalto premise and connected to the Aalto wifi, or you use the Aalto VPN to connect to the Aalto network remotely. 

    Open the downloaded file and run the installation. Once the installation is finished a terminal window will open. If not, you need to open the Gurobi optimizer manually, which should trigger the terminal window to open. Obviously, this will look different on Windows, MacOS and Linux, but it will look something like this:

     

    Since you followed these instructions, your Gurobi License window is still open (right?). Copy the license without the grbgetkey part (only the actual key). Paste it into the terminal. Either pasting will trigger the process or you need to press enter. The installer will verify your license. 

    Next, it will ask you to specify a directory for storing your key. I highly recommend to specify nothing and simply keep the default directory. Just hit enter. If you feel like hackerman/hackergirl, decide to  change the directory and stuff doesn't work later: no support from our end. 


    The installer will run and output at some point [Process completed]. Congrats, you are not done yet! 


    Step 5: Install the Gurobi Python package 

    So far, you have only installed the actual Gurobi optimisation software on your machine. In this course, however, we want to use Gurobi in Python. Therefore you need to install the Gurobi Python package. In this guide, I'll only discuss how to install the package with Anaconda. If you prefer another package manager you are probably able to install a package yourself. 

    Go to https://www.gurobi.com/documentation/8.1/quickstart_mac/installing_the_anaconda_py.html and read the instructions. If you don't have Anaconda yet (or Python, really?), set it up. The internet is full of guides for this step. Once you have Anaconda running, open a Terminal. 

    First add the Gurobi channel so that conda knows where to look for the package: 

    conda config --add channels http://conda.anaconda.org/gurobi

    Next, install the Gurobi package:

    conda install gurobi


    Step 6: Verify that things work

    A simple of checking that Gurobi works is to create a new Jupyter notebook (.ipynb file) and to import the Gurobi libraries. Just type


    Into a new cell and run it. If this works, Gurobi is properly installed. Congrats! Now you are done!







    Previous section

    ◄JupyterHub

    Next section

    Week 1 - Predictive Modeling►
    Skip Upcoming events
    Upcoming events
    Loading
    Site event 20.6. MyCourses maintenance, service out of use
    Monday, 20 June, 09:00 » 16:00

    Go to calendar...
    • 30E03500 - Data Science for Business II, 25.02.2019-11.04.2019
    • Sections
    • General
    • Materials
    • JupyterHub
    • Gurobi
    • Week 1 - Predictive Modeling
    • Week 2 - Prescriptive Modeling
    • Week 3 - Sports Analytics
    • Week 4 - Prescriptive Analytics in Finance
    • Week 5 - From Data to Business Opportunities
    • Course Project
    • Course Grades
    • Home
    • Calendar
    • Learner Metrics

    Aalto logo

    Tuki / Support
    • MyCourses help
    • mycourses(at)aalto.fi
    Palvelusta
    • MyCourses rekisteriseloste
    • Tietosuojailmoitus
    • Palvelukuvaus
    • Saavutettavuusseloste
    About service
    • MyCourses protection of privacy
    • Privacy notice
    • Service description
    • Accessibility summary
    Service
    • MyCourses registerbeskrivining
    • Dataskyddsmeddelande
    • Beskrivining av tjänsten
    • Sammanfattning av tillgängligheten
    
    Hi guest! (Log in)
    • Schools
      • School of Arts, Design, and Architecture (ARTS)
      • School of Business (BIZ)
      • School of Chemical Engineering (CHEM)
      • –sGuides for students (CHEM)
      • – Instructions for report writing (CHEM)
      • School of Electrical Engineering (ELEC)
      • School of Engineering (ENG)
      • School of Science (SCI)
      • Language Centre
      • Open University
      • Library
      • Aalto university pedagogical training program
      • UNI (exams)
      • Sandbox
    • CORONAVIRUS INFO
      • Koronavirus - tietoa opiskelijalle
      • Coronavirus - information for students
      • Coronavirus - information för studerande
      • Corona help for teachers
    • Service Links
      • MyCourses
      • - Instructions for Teachers
      • - Teacher book your online session with a specialist
      • - Digital tools for teaching
      • - Personal data protection instructions for teachers
      • - Instructions for Students
      • - Workspace for thesis supervision
      • Sisu
      • Into portal for students
      • Courses.aalto.fi
      • Library Services
      • - Resourcesguides
      • - Imagoa / Open science and images
      • IT Services
      • Campus maps
      • - Search spaces and see opening hours
      • Restaurants in Otaniemi
      • ASU Aalto Student Union
      • Aalto Marketplace
    • ALLWELL?
      • Study Skills
      • Support for Studying
      • Starting Point of Wellbeing
      • About AllWell? study well-being questionnaire
    •   ‎(en)‎
      •   ‎(en)‎
      •   ‎(fi)‎
      •   ‎(sv)‎