💻 Workshop exercises

Prerequisites:

  1. Sign up for a Nextmv account: cloud.nextmv.io/signup
  2. Verify your account
  3. Get a free trial of the Innovator plan

image (25).png

image (24).png

  1. Ensure you have Python and pip installed

Part 1: Run the AMPL model locally

  1. Download the “ampl-example” folder from Google Drive

    (or the files from “starting-state” in this GitHub repo)

    image.png

    Put the following 5 files in a directory named “ampl-example” on your computer:

  2. Add UUID to the ampl_license_uuid.txt file

    Paste this into the ampl_license_uuid.txt file and make sure to save the file. Note: The AMPL license has solver access until the end of September, and AMPL access until the end of October.

    15d1a67d-bd6c-4215-891d-bbdb92fb6e3c
    
  3. Install the requirements via terminal

    Note: Make sure you’re in the ampl-example directory you just created.

    Note: You may need to use “pip3” command depending on your setup

pip install -r requirements.txt
  1. Run the Python file via terminal to execute the model

    Note: You may need to use “python3” command depending on your setup

python pglib_uc.py

Part 2: Push an AMPL model to Nextmv